aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/profiling/timers.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/profiling/timers.c b/src/core/profiling/timers.c
index 7cc79bd22b..bd1700ffd8 100644
--- a/src/core/profiling/timers.c
+++ b/src/core/profiling/timers.c
@@ -40,10 +40,12 @@
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpc/support/sync.h>
+#include <grpc/support/thd.h>
#include <stdio.h>
typedef struct grpc_timer_entry {
grpc_precise_clock tm;
+ gpr_thd_id thd;
const char* tag;
void* id;
const char* file;
@@ -85,7 +87,7 @@ static void log_report_locked(grpc_timers_log* log) {
grpc_timer_entry* entry = &(log->log[i]);
fprintf(fp, "GRPC_LAT_PROF ");
grpc_precise_clock_print(&entry->tm, fp);
- fprintf(fp, " %s %p %s %d\n", entry->tag, entry->id, entry->file,
+ fprintf(fp, " %p %s %p %s %d\n", (void*)(gpr_intptr)entry->thd, entry->tag, entry->id, entry->file,
entry->line);
}
@@ -121,6 +123,7 @@ void grpc_timers_log_add(grpc_timers_log* log, const char* tag, void* id,
entry->id = id;
entry->file = file;
entry->line = line;
+ entry->thd = gpr_thd_currentid();
gpr_mu_unlock(&log->mu);
}