mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
24 lines
537 B
Plaintext
24 lines
537 B
Plaintext
|
# Generate "jeprof" tool.
|
||
|
|
||
|
cd contrib/jemalloc
|
||
|
./autogen.sh
|
||
|
|
||
|
# The tool is in /bin directory. Copy it somewhere or add it to PATH.
|
||
|
|
||
|
cp bin/jeprof ...
|
||
|
|
||
|
# Build ClickHouse in debug mode.
|
||
|
|
||
|
# Set environment variable to enable profiling.
|
||
|
|
||
|
export MALLOC_CONF="prof:true,prof_accum:true,lg_prof_interval:28"
|
||
|
|
||
|
# Run clickhouse-server.
|
||
|
|
||
|
# ClickHouse will generate profile dumps with names like jeprof*
|
||
|
# Use jeprof tool to analyze them:
|
||
|
|
||
|
./jeprof ./clickhouse-server jeprof.4017.0.f.heap
|
||
|
|
||
|
# It will spend a few minutes before displaying prompt.
|