Skip to content
Permalink
Browse files

Support CPU profiling sections of code (#3971)

Signed-off-by: Breezewish <breezewish@pingcap.com>
  • Loading branch information...
breeswish committed May 6, 2019
1 parent 9e02b2d commit 68802bbccf4df5acb808165442b8e6e64ab1e5d9

Some generated files are not rendered by default. Learn more.

@@ -15,6 +15,7 @@ jemalloc = ["tikv_alloc/jemalloc"]
portable = ["engine/portable"]
sse = ["engine/sse"]
mem-profiling = ["tikv_alloc/mem-profiling"]
profiling = ["profiler/profiling"]
no-fail = ["fail/no_fail"]

[lib]
@@ -115,6 +116,7 @@ hyper = { version = "0.12", default-features = false, features = ["runtime"] }
tokio-threadpool = "0.1.13"
vlog = "0.1.4"
twoway = "0.2.0"
profiler = { path = "components/profiler" }
cop_datatype = { path = "components/cop_datatype" }
panic_hook = { path = "components/panic_hook" }
tipb = { git = "https://github.com/pingcap/tipb.git" }
@@ -0,0 +1,21 @@
[package]
name = "profiler"
version = "0.0.1"
edition = "2018"
publish = false

[features]
profiling = ["lazy_static", "cpuprofiler", "callgrind", "valgrind_request"]

[dependencies]
tikv_alloc = { path = "../tikv_alloc" }

[target.'cfg(unix)'.dependencies]
lazy_static = { version = "1.3.0", optional = true }
cpuprofiler = { version = "0.0.3", optional = true }
callgrind = { version = "1.1.0", optional = true }
valgrind_request = { version = "1.1.0", optional = true }

[[example]]
name = "prime"
required-features = ["profiling"]

0 comments on commit 68802bb

Please sign in to comment.
You can’t perform that action at this time.