MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / prof_reset_ctl

Function prof_reset_ctl

deps/jemalloc/src/ctl.c:2740–2761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2738}
2739
2740static int
2741prof_reset_ctl(tsd_t *tsd, const size_t *mib, size_t miblen,
2742 void *oldp, size_t *oldlenp, void *newp, size_t newlen) {
2743 int ret;
2744 size_t lg_sample = lg_prof_sample;
2745
2746 if (!config_prof) {
2747 return ENOENT;
2748 }
2749
2750 WRITEONLY();
2751 WRITE(lg_sample, size_t);
2752 if (lg_sample >= (sizeof(uint64_t) << 3)) {
2753 lg_sample = (sizeof(uint64_t) << 3) - 1;
2754 }
2755
2756 prof_reset(tsd, lg_sample);
2757
2758 ret = 0;
2759label_return:
2760 return ret;
2761}
2762
2763CTL_RO_NL_CGEN(config_prof, prof_interval, prof_interval, uint64_t)
2764CTL_RO_NL_CGEN(config_prof, lg_prof_sample, lg_prof_sample, size_t)

Callers

nothing calls this directly

Calls 1

prof_resetFunction · 0.70

Tested by

no test coverage detected