summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2023-05-10 13:20:40 -0700
committerQi Wang <interwq@gmail.com>2023-05-11 09:10:57 -0700
commit94ace05832209543bde81d0a5f0e2a9660243abd (patch)
tree4048214fb4472a5832aacba950ba7ce9e7c02534
parent6ea8a7e928c86f7976c5e1356a22292509f8705b (diff)
downloadjemalloc-94ace05832209543bde81d0a5f0e2a9660243abd.tar.gz
Fix the prof thread_name reference in prof_recent dump.
As pointed out in #2434, the thread_name in prof_tdata_t was changed in #2407. This also requires an update for the prof_recent dump, specifically the emitter expects a "char **" which is fixed in this commit.
-rw-r--r--src/prof_recent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/prof_recent.c b/src/prof_recent.c
index 4c3c6296..e5b3fb17 100644
--- a/src/prof_recent.c
+++ b/src/prof_recent.c
@@ -496,8 +496,9 @@ prof_recent_alloc_dump_node(emitter_t *emitter, prof_recent_t *node) {
prof_tdata_t *alloc_tdata = node->alloc_tctx->tdata;
assert(alloc_tdata != NULL);
if (!prof_thread_name_empty(alloc_tdata)) {
+ const char *thread_name = alloc_tdata->thread_name;
emitter_json_kv(emitter, "alloc_thread_name",
- emitter_type_string, &alloc_tdata->thread_name);
+ emitter_type_string, &thread_name);
}
uint64_t alloc_time_ns = nstime_ns(&node->alloc_time);
emitter_json_kv(emitter, "alloc_time", emitter_type_uint64,
@@ -512,8 +513,9 @@ prof_recent_alloc_dump_node(emitter_t *emitter, prof_recent_t *node) {
prof_tdata_t *dalloc_tdata = node->dalloc_tctx->tdata;
assert(dalloc_tdata != NULL);
if (!prof_thread_name_empty(dalloc_tdata)) {
+ const char *thread_name = dalloc_tdata->thread_name;
emitter_json_kv(emitter, "dalloc_thread_name",
- emitter_type_string, &dalloc_tdata->thread_name);
+ emitter_type_string, &thread_name);
}
assert(!nstime_equals_zero(&node->dalloc_time));
uint64_t dalloc_time_ns = nstime_ns(&node->dalloc_time);