Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ C_SRCS := $(srcroot)src/jemalloc.c \
$(srcroot)src/prof_stack_range.c \
$(srcroot)src/prof_stats.c \
$(srcroot)src/prof_sys.c \
$(srcroot)src/prof_threshold.c \
$(srcroot)src/psset.c \
$(srcroot)src/rtree.c \
$(srcroot)src/safety_check.c \
Expand Down Expand Up @@ -270,8 +269,6 @@ TESTS_UNIT := \
$(srcroot)test/unit/prof_stats.c \
$(srcroot)test/unit/prof_tctx.c \
$(srcroot)test/unit/prof_thread_name.c \
$(srcroot)test/unit/prof_threshold.c \
$(srcroot)test/unit/prof_threshold_small.c \
$(srcroot)test/unit/prof_sys_thread_name.c \
$(srcroot)test/unit/psset.c \
$(srcroot)test/unit/ql.c \
Expand Down
5 changes: 0 additions & 5 deletions include/jemalloc/internal/prof_externs.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ extern bool opt_prof_active;
extern bool opt_prof_thread_active_init;
extern unsigned opt_prof_bt_max;
extern size_t opt_lg_prof_sample; /* Mean bytes between samples. */
extern size_t
opt_experimental_lg_prof_threshold; /* Mean bytes between thresholds. */
extern ssize_t opt_lg_prof_interval; /* lg(prof_interval). */
extern bool opt_prof_gdump; /* High-water memory dumping. */
extern bool opt_prof_final; /* Final profile dumping. */
Expand Down Expand Up @@ -70,9 +68,6 @@ prof_sample_hook_t prof_sample_hook_get(void);
void prof_sample_free_hook_set(prof_sample_free_hook_t hook);
prof_sample_free_hook_t prof_sample_free_hook_get(void);

void prof_threshold_hook_set(prof_threshold_hook_t hook);
prof_threshold_hook_t prof_threshold_hook_get(void);

/* Functions only accessed in prof_inlines.h */
prof_tdata_t *prof_tdata_init(tsd_t *tsd);
prof_tdata_t *prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata);
Expand Down
6 changes: 0 additions & 6 deletions include/jemalloc/internal/prof_hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,4 @@ typedef void (*prof_sample_hook_t)(const void *ptr, size_t size,
/* ptr, size */
typedef void (*prof_sample_free_hook_t)(const void *, size_t);

/*
* A callback hook that notifies when an allocation threshold has been crossed.
*/
typedef void (*prof_threshold_hook_t)(
uint64_t alloc, uint64_t dealloc, uint64_t peak);

#endif /* JEMALLOC_INTERNAL_PROF_HOOK_H */
8 changes: 0 additions & 8 deletions include/jemalloc/internal/prof_threshold.h

This file was deleted.

1 change: 0 additions & 1 deletion include/jemalloc/internal/thread_event_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ enum te_alloc_e {
te_alloc_stats_interval,
te_alloc_tcache_gc,
#ifdef JEMALLOC_STATS
te_alloc_prof_threshold,
te_alloc_peak,
#endif
te_alloc_user0,
Expand Down
1 change: 0 additions & 1 deletion msvc/projects/vc2015/jemalloc/jemalloc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<ClCompile Include="..\..\..\..\src\prof_recent.c" />
<ClCompile Include="..\..\..\..\src\prof_stats.c" />
<ClCompile Include="..\..\..\..\src\prof_sys.c" />
<ClCompile Include="..\..\..\..\src\prof_threshold.c" />
<ClCompile Include="..\..\..\..\src\psset.c" />
<ClCompile Include="..\..\..\..\src\rtree.c" />
<ClCompile Include="..\..\..\..\src\safety_check.c" />
Expand Down
3 changes: 0 additions & 3 deletions msvc/projects/vc2015/jemalloc/jemalloc.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@
<ClCompile Include="..\..\..\..\src\prof_sys.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\prof_threshold.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\psset.c">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down
1 change: 0 additions & 1 deletion msvc/projects/vc2017/jemalloc/jemalloc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<ClCompile Include="..\..\..\..\src\prof_recent.c" />
<ClCompile Include="..\..\..\..\src\prof_stats.c" />
<ClCompile Include="..\..\..\..\src\prof_sys.c" />
<ClCompile Include="..\..\..\..\src\prof_threshold.c" />
<ClCompile Include="..\..\..\..\src\psset.c" />
<ClCompile Include="..\..\..\..\src\rtree.c" />
<ClCompile Include="..\..\..\..\src\safety_check.c" />
Expand Down
3 changes: 0 additions & 3 deletions msvc/projects/vc2017/jemalloc/jemalloc.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@
<ClCompile Include="..\..\..\..\src\prof_sys.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\prof_threshold.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\psset.c">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down
1 change: 0 additions & 1 deletion msvc/projects/vc2019/jemalloc/jemalloc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<ClCompile Include="..\..\..\..\src\prof_recent.c" />
<ClCompile Include="..\..\..\..\src\prof_stats.c" />
<ClCompile Include="..\..\..\..\src\prof_sys.c" />
<ClCompile Include="..\..\..\..\src\prof_threshold.c" />
<ClCompile Include="..\..\..\..\src\psset.c" />
<ClCompile Include="..\..\..\..\src\rtree.c" />
<ClCompile Include="..\..\..\..\src\safety_check.c" />
Expand Down
3 changes: 0 additions & 3 deletions msvc/projects/vc2019/jemalloc/jemalloc.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@
<ClCompile Include="..\..\..\..\src\prof_sys.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\prof_threshold.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\psset.c">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down
1 change: 0 additions & 1 deletion msvc/projects/vc2022/jemalloc/jemalloc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<ClCompile Include="..\..\..\..\src\prof_recent.c" />
<ClCompile Include="..\..\..\..\src\prof_stats.c" />
<ClCompile Include="..\..\..\..\src\prof_sys.c" />
<ClCompile Include="..\..\..\..\src\prof_threshold.c" />
<ClCompile Include="..\..\..\..\src\psset.c" />
<ClCompile Include="..\..\..\..\src\rtree.c" />
<ClCompile Include="..\..\..\..\src\safety_check.c" />
Expand Down
3 changes: 0 additions & 3 deletions msvc/projects/vc2022/jemalloc/jemalloc.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@
<ClCompile Include="..\..\..\..\src\prof_sys.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\prof_threshold.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\psset.c">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down
30 changes: 0 additions & 30 deletions src/ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ CTL_PROTO(opt_prof_active)
CTL_PROTO(opt_prof_thread_active_init)
CTL_PROTO(opt_prof_bt_max)
CTL_PROTO(opt_lg_prof_sample)
CTL_PROTO(opt_experimental_lg_prof_threshold)
CTL_PROTO(opt_lg_prof_interval)
CTL_PROTO(opt_prof_gdump)
CTL_PROTO(opt_prof_final)
Expand Down Expand Up @@ -364,7 +363,6 @@ CTL_PROTO(experimental_hooks_prof_backtrace)
CTL_PROTO(experimental_hooks_prof_dump)
CTL_PROTO(experimental_hooks_prof_sample)
CTL_PROTO(experimental_hooks_prof_sample_free)
CTL_PROTO(experimental_hooks_prof_threshold)
CTL_PROTO(experimental_hooks_thread_event)
CTL_PROTO(experimental_hooks_safety_check_abort)
CTL_PROTO(experimental_thread_activity_callback)
Expand Down Expand Up @@ -527,8 +525,6 @@ static const ctl_named_node_t opt_node[] = {{NAME("abort"), CTL(opt_abort)},
{NAME("prof_thread_active_init"), CTL(opt_prof_thread_active_init)},
{NAME("prof_bt_max"), CTL(opt_prof_bt_max)},
{NAME("lg_prof_sample"), CTL(opt_lg_prof_sample)},
{NAME("experimental_lg_prof_threshold"),
CTL(opt_experimental_lg_prof_threshold)},
{NAME("lg_prof_interval"), CTL(opt_lg_prof_interval)},
{NAME("prof_gdump"), CTL(opt_prof_gdump)},
{NAME("prof_final"), CTL(opt_prof_final)},
Expand Down Expand Up @@ -890,7 +886,6 @@ static const ctl_named_node_t experimental_hooks_node[] = {
{NAME("prof_dump"), CTL(experimental_hooks_prof_dump)},
{NAME("prof_sample"), CTL(experimental_hooks_prof_sample)},
{NAME("prof_sample_free"), CTL(experimental_hooks_prof_sample_free)},
{NAME("prof_threshold"), CTL(experimental_hooks_prof_threshold)},
{NAME("safety_check_abort"), CTL(experimental_hooks_safety_check_abort)},
{NAME("thread_event"), CTL(experimental_hooks_thread_event)},
};
Expand Down Expand Up @@ -2236,8 +2231,6 @@ CTL_RO_NL_CGEN(
config_prof, opt_prof_thread_active_init, opt_prof_thread_active_init, bool)
CTL_RO_NL_CGEN(config_prof, opt_prof_bt_max, opt_prof_bt_max, unsigned)
CTL_RO_NL_CGEN(config_prof, opt_lg_prof_sample, opt_lg_prof_sample, size_t)
CTL_RO_NL_CGEN(config_prof, opt_experimental_lg_prof_threshold,
opt_experimental_lg_prof_threshold, size_t)
CTL_RO_NL_CGEN(config_prof, opt_prof_accum, opt_prof_accum, bool)
CTL_RO_NL_CGEN(
config_prof, opt_prof_pid_namespace, opt_prof_pid_namespace, bool)
Expand Down Expand Up @@ -3681,29 +3674,6 @@ experimental_hooks_prof_sample_free_ctl(tsd_t *tsd, const size_t *mib,
return ret;
}

static int
experimental_hooks_prof_threshold_ctl(tsd_t *tsd, const size_t *mib,
size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen) {
int ret;

if (oldp == NULL && newp == NULL) {
ret = EINVAL;
goto label_return;
}
if (oldp != NULL) {
prof_threshold_hook_t old_hook = prof_threshold_hook_get();
READ(old_hook, prof_threshold_hook_t);
}
if (newp != NULL) {
prof_threshold_hook_t new_hook JEMALLOC_CC_SILENCE_INIT(NULL);
WRITE(new_hook, prof_threshold_hook_t);
prof_threshold_hook_set(new_hook);
}
ret = 0;
label_return:
return ret;
}

static int
experimental_hooks_thread_event_ctl(tsd_t *tsd, const size_t *mib,
size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen) {
Expand Down
5 changes: 0 additions & 5 deletions src/jemalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1747,11 +1747,6 @@ malloc_conf_init_helper(sc_data_t *sc_data, unsigned bin_shard_sizes[SC_NBINS],
"lg_prof_sample", 0,
(sizeof(uint64_t) << 3) - 1,
CONF_DONT_CHECK_MIN, CONF_CHECK_MAX, true)
CONF_HANDLE_SIZE_T(
opt_experimental_lg_prof_threshold,
"experimental_lg_prof_threshold", 0,
(sizeof(uint64_t) << 3) - 1,
CONF_DONT_CHECK_MIN, CONF_CHECK_MAX, true)
CONF_HANDLE_BOOL(opt_prof_accum, "prof_accum")
CONF_HANDLE_UNSIGNED(opt_prof_bt_max,
"prof_bt_max", 1, PROF_BT_MAX_LIMIT,
Expand Down
69 changes: 0 additions & 69 deletions src/prof_threshold.c

This file was deleted.

9 changes: 0 additions & 9 deletions src/thread_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,6 @@ te_update_alloc_events(tsd_t *tsd, te_base_cb_t **to_trigger,
to_trigger[nto_trigger++] = te_alloc_handlers[te_alloc_peak];
}

assert(te_enabled_yes
== te_alloc_handlers[te_alloc_prof_threshold]->enabled());
if (te_update_wait(tsd, accumbytes, allow,
&waits[te_alloc_prof_threshold], wait,
te_alloc_handlers[te_alloc_prof_threshold],
1 << opt_experimental_lg_prof_threshold)) {
to_trigger[nto_trigger++] =
te_alloc_handlers[te_alloc_prof_threshold];
}
#endif

for (te_alloc_t ue = te_alloc_user0; ue <= te_alloc_user3; ue++) {
Expand Down
3 changes: 1 addition & 2 deletions src/thread_event_registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "jemalloc/internal/tcache_externs.h"
#include "jemalloc/internal/peak_event.h"
#include "jemalloc/internal/prof_externs.h"
#include "jemalloc/internal/prof_threshold.h"
#include "jemalloc/internal/stats.h"

static malloc_mutex_t uevents_mu;
Expand Down Expand Up @@ -149,7 +148,7 @@ te_base_cb_t *te_alloc_handlers[te_alloc_count] = {
#endif
&stats_interval_te_handler, &tcache_gc_te_handler,
#ifdef JEMALLOC_STATS
&prof_threshold_te_handler, &peak_te_handler,
&peak_te_handler,
#endif
&user_alloc_handler0, &user_alloc_handler1, &user_alloc_handler2,
&user_alloc_handler3};
Expand Down
1 change: 0 additions & 1 deletion test/unit/mallctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ TEST_BEGIN(test_mallctl_opt) {
TEST_MALLCTL_OPT(bool, prof_active, prof);
TEST_MALLCTL_OPT(unsigned, prof_bt_max, prof);
TEST_MALLCTL_OPT(ssize_t, lg_prof_sample, prof);
TEST_MALLCTL_OPT(ssize_t, experimental_lg_prof_threshold, prof);
TEST_MALLCTL_OPT(bool, prof_accum, prof);
TEST_MALLCTL_OPT(bool, prof_pid_namespace, prof);
TEST_MALLCTL_OPT(ssize_t, lg_prof_interval, prof);
Expand Down
Loading
Loading