LTTNG_EVENT_FUNCTION_ENTRY = 3,
LTTNG_EVENT_NOOP = 4,
LTTNG_EVENT_SYSCALL = 5,
+ LTTNG_EVENT_TRACEPOINT_LOGLEVEL = 6,
};
/*
*/
struct lttng_event {
char name[LTTNG_SYMBOL_NAME_LEN];
+ char loglevel[LTTNG_SYMBOL_NAME_LEN];
enum lttng_event_type type;
uint32_t enabled;
pid_t pid;
while ((ret = ustctl_tracepoint_list_get(app->key.sock, handle,
&iter)) != -ENOENT) {
- /* TODO : get loglevel too */
if (count >= nbmem) {
DBG2("Reallocating event list from %zu to %zu entries", nbmem,
2 * nbmem);
}
}
memcpy(tmp[count].name, iter.name, LTTNG_UST_SYM_NAME_LEN);
+ memcpy(tmp[count].loglevel, iter.loglevel, LTTNG_UST_SYM_NAME_LEN);
tmp[count].type = LTTNG_UST_TRACEPOINT;
tmp[count].pid = app->key.pid;
tmp[count].enabled = -1;
}
}
+static
+const char *loglevel_string_pre(const char *loglevel)
+{
+ if (loglevel[0] == '\0')
+ return "";
+ else
+ return " (loglevel: ";
+}
+
+static
+const char *loglevel_string_post(const char *loglevel)
+{
+ if (loglevel[0] == '\0')
+ return "";
+ else
+ return ")";
+}
+
/*
* Pretty print single event.
*/
{
switch (event->type) {
case LTTNG_EVENT_TRACEPOINT:
- MSG("%s%s (type: tracepoint)%s", indent6,
- event->name, enabled_string(event->enabled));
+ MSG("%s%s%s%s%s (type: tracepoint)%s", indent6,
+ event->name,
+ loglevel_string_pre(event->loglevel),
+ event->loglevel,
+ loglevel_string_post(event->loglevel),
+ enabled_string(event->enabled));
break;
case LTTNG_EVENT_PROBE:
MSG("%s%s (type: probe)%s", indent6,
MSG("%s (type: noop)%s", indent6,
enabled_string(event->enabled));
break;
+ case LTTNG_EVENT_TRACEPOINT_LOGLEVEL:
+ MSG("%s%s (type: tracepoint loglevel)%s", indent6,
+ event->name, enabled_string(event->enabled));
+ break;
case LTTNG_EVENT_ALL:
/* We should never have "all" events in list. */
assert(0);