MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / checkProfilingEnabled

Function checkProfilingEnabled

src/Common/Jemalloc.cpp:43–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void checkProfilingEnabled()
44{
45 bool active = true;
46 size_t active_size = sizeof(active);
47 je_mallctl("opt.prof", &active, &active_size, nullptr, 0);
48
49 if (!active)
50 throw Exception(
51 ErrorCodes::BAD_ARGUMENTS,
52 "ClickHouse was started without enabling profiling for jemalloc. To use jemalloc's profiler, following env variable should be "
53 "set: MALLOC_CONF=background_thread:true,prof:true");
54}
55
56std::string_view flushProfile(const char * file_prefix)
57{

Callers 2

handleRequestMethod · 0.85
flushProfileFunction · 0.85

Calls 1

ExceptionClass · 0.70

Tested by

no test coverage detected