MCPcopy Create free account
hub / github.com/apache/brpc / validate_je_prof_active

Function validate_je_prof_active

src/brpc/details/jemalloc_profiler.cpp:303–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303static bool validate_je_prof_active(const char*, bool enable) {
304 if (!HasJemalloc()) {
305 return true;
306 }
307
308 if (!HasInit(__func__)) {
309 return true;
310 }
311
312 if (JeProfileActive(enable) != 0) {
313 LOG(WARNING) << "JeControlSample err";
314 return false;
315 }
316
317 return true;
318}
319
320static bool validate_je_prof_dump(const char*, int32_t val) {
321 if (!HasJemalloc()) {

Callers

nothing calls this directly

Calls 3

HasJemallocFunction · 0.85
HasInitFunction · 0.85
JeProfileActiveFunction · 0.85

Tested by

no test coverage detected