Fix: default loglevel is DEBUG
[lttng-ust.git] / liblttng-ust / lttng-events.c
index 6dc7bfcaf40d89b73fcce0c936a8e560e6b0f4f8..e44628dfcc02b8dc207232fe9d42ff836bc4edbd 100644 (file)
@@ -105,19 +105,19 @@ int lttng_loglevel_match(int loglevel,
        switch (req_type) {
        case LTTNG_UST_LOGLEVEL_RANGE:
                if (loglevel <= req_loglevel
-                               || (req_loglevel == -1 && loglevel <= TRACE_DEFAULT))
+                               || (req_loglevel == -1 && loglevel <= TRACE_DEBUG))
                        return 1;
                else
                        return 0;
        case LTTNG_UST_LOGLEVEL_SINGLE:
                if (loglevel == req_loglevel
-                               || (req_loglevel == -1 && loglevel <= TRACE_DEFAULT))
+                               || (req_loglevel == -1 && loglevel <= TRACE_DEBUG))
                        return 1;
                else
                        return 0;
        case LTTNG_UST_LOGLEVEL_ALL:
        default:
-               if (loglevel <= TRACE_DEFAULT)
+               if (loglevel <= TRACE_DEBUG)
                        return 1;
                else
                        return 0;
@@ -797,6 +797,17 @@ int lttng_attach_context(struct lttng_ust_context *context_param,
        switch (context_param->ctx) {
        case LTTNG_UST_CONTEXT_PTHREAD_ID:
                return lttng_add_pthread_id_to_ctx(ctx);
+       case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+       {
+               struct lttng_ust_perf_counter_ctx *perf_ctx_param;
+
+               perf_ctx_param = &context_param->u.perf_counter;
+               return lttng_add_perf_counter_to_ctx(
+                       perf_ctx_param->type,
+                       perf_ctx_param->config,
+                       perf_ctx_param->name,
+                       ctx);
+       }
        case LTTNG_UST_CONTEXT_VTID:
                return lttng_add_vtid_to_ctx(ctx);
        case LTTNG_UST_CONTEXT_VPID:
This page took 0.023146 seconds and 4 git commands to generate.