+ switch (event->type) {
+ case LTTNG_EVENT_TRACEPOINT:
+ {
+ char ll_value[LTTNG_SYMBOL_NAME_LEN] = "";
+
+ if (event->loglevel[0] != '\0') {
+ int ret;
+
+ ret = snprintf(ll_value, LTTNG_SYMBOL_NAME_LEN,
+ ", %lld", (long long) event->loglevel_value);
+ if (ret < 0)
+ ERR("snprintf error");
+ }
+ MSG("%s%s%s%s%s%s (type: tracepoint)%s", indent6,
+ event->name,
+ loglevel_string_pre(event->loglevel),
+ event->loglevel,
+ ll_value,
+ loglevel_string_post(event->loglevel),
+ enabled_string(event->enabled));
+ break;
+ }
+ case LTTNG_EVENT_PROBE:
+ MSG("%s%s (type: probe)%s", indent6,
+ event->name, enabled_string(event->enabled));
+ if (event->attr.probe.addr != 0) {
+ MSG("%saddr: 0x%" PRIx64, indent8, event->attr.probe.addr);
+ } else {
+ MSG("%soffset: 0x%" PRIx64, indent8, event->attr.probe.offset);
+ MSG("%ssymbol: %s", indent8, event->attr.probe.symbol_name);
+ }
+ break;
+ case LTTNG_EVENT_FUNCTION:
+ case LTTNG_EVENT_FUNCTION_ENTRY:
+ MSG("%s%s (type: function)%s", indent6,
+ event->name, enabled_string(event->enabled));
+ MSG("%ssymbol: \"%s\"", indent8, event->attr.ftrace.symbol_name);
+ break;
+ case LTTNG_EVENT_SYSCALL:
+ MSG("%s (type: syscall)%s", indent6,
+ enabled_string(event->enabled));
+ break;
+ case LTTNG_EVENT_NOOP:
+ 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);
+ break;
+ }
+}