lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list);
struct loglevel_entry *get_loglevel(const char *name);
+struct loglevel_entry *get_loglevel_value(int64_t value);
struct session_loglevel *add_loglevel(const char *name,
struct ltt_channel *chan,
struct lttng_ust_event *event_param);
#include <lttng/ust-events.h>
#include <assert.h>
#include <helper.h>
+#include <ctype.h>
#include "ltt-tracer-core.h"
#include "jhash.h"
return NULL;
}
+struct loglevel_entry *get_loglevel_value(int64_t value)
+{
+ char name[LTTNG_UST_SYM_NAME_LEN];
+ int ret;
+
+ ret = snprintf(name, LTTNG_UST_SYM_NAME_LEN, "%lld", (long long) value);
+ if (ret < 0)
+ return NULL;
+ return get_loglevel(name);
+}
+
/*
* marshall all probes/all events and create those that fit the
* loglevel. Add them to the events list as created.
for (i = 0; i < probe_desc->nr_events; i++) {
const struct tracepoint_loglevel_entry *ev_ll;
const struct lttng_event_desc *event_desc;
+ int match;
event_desc = probe_desc->event_desc[i];
if (!(event_desc->loglevel))
continue;
ev_ll = *event_desc->loglevel;
- if (!strcmp(ev_ll->identifier, entry->name)) {
+ if (isalpha(entry->name[0])) {
+ if (atoll(entry->name) == ev_ll->value) {
+ match = 1;
+ }
+ } else if (!strcmp(ev_ll->identifier, entry->name)) {
+ match = 1;
+ }
+
+ if (match) {
struct ltt_event *ev;
int ret;