Skip to contentSkip to conversation

Introduce new libtracevent API: tep_override_comm()

PATCH New Tzvetomir Stoyanov 1 participant 1 message Oct 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Introduce new libtracevent API: tep_override_comm()

From: Tzvetomir Stoyanov <[email protected]>

Added a new API of tracevent library: tep_override_comm() It registers a pid / comm mapping. If a mapping with the same pid already exists, the entry is updated with the new comm.

---
 include/traceevent/event-parse.h |  1 +
 lib/traceevent/event-parse.c     | 69 +++++++++++++++++++++++++-------
 2 files changed, 55 insertions(+), 15 deletions(-)
include/traceevent/event-parse.h +1 -0
index 18652c8..147efbc 100644
@@ -435,6 +435,7 @@ int tep_set_function_resolver(struct tep_handle *pevent,
 			      tep_func_resolver_t *func, void *priv);
 void tep_reset_function_resolver(struct tep_handle *pevent);
 int tep_register_comm(struct tep_handle *pevent, const char *comm, int pid);
+int tep_override_comm(struct tep_handle *pevent, const char *comm, int pid);
 int tep_register_trace_clock(struct tep_handle *pevent, const char *trace_clock);
 int tep_register_function(struct tep_handle *pevent, char *name,
 			  unsigned long long addr, char *mod);
lib/traceevent/event-parse.c +54 -15

100 lines not on this page · raw message

Signature · 1 line
2.17.2