Add application context support to lttng-ctl lttng_add_context
[lttng-tools.git] / include / lttng / event.h
index 3e8fbe3e83f5f6b92269771fa5f8391a6811a6d4..e5b2b4bb00702deddfab167613b00ff8b356e197 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014 - David Goulet <dgoulet@efficios.com>
+ * Copyright (C) 2016 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * This library is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License, version 2.1 only,
@@ -121,21 +122,22 @@ enum lttng_event_output {
 
 /* Event context possible type */
 enum lttng_event_context_type {
-       LTTNG_EVENT_CONTEXT_PID               = 0,
-       LTTNG_EVENT_CONTEXT_PERF_COUNTER      = 1,      /* Backward compat. */
-       LTTNG_EVENT_CONTEXT_PROCNAME          = 2,
-       LTTNG_EVENT_CONTEXT_PRIO              = 3,
-       LTTNG_EVENT_CONTEXT_NICE              = 4,
-       LTTNG_EVENT_CONTEXT_VPID              = 5,
-       LTTNG_EVENT_CONTEXT_TID               = 6,
-       LTTNG_EVENT_CONTEXT_VTID              = 7,
-       LTTNG_EVENT_CONTEXT_PPID              = 8,
-       LTTNG_EVENT_CONTEXT_VPPID             = 9,
-       LTTNG_EVENT_CONTEXT_PTHREAD_ID        = 10,
-       LTTNG_EVENT_CONTEXT_HOSTNAME          = 11,
-       LTTNG_EVENT_CONTEXT_IP                = 12,
-       LTTNG_EVENT_CONTEXT_PERF_CPU_COUNTER  = 13,
+       LTTNG_EVENT_CONTEXT_PID                 = 0,
+       LTTNG_EVENT_CONTEXT_PERF_COUNTER        = 1,    /* Backward compat. */
+       LTTNG_EVENT_CONTEXT_PROCNAME            = 2,
+       LTTNG_EVENT_CONTEXT_PRIO                = 3,
+       LTTNG_EVENT_CONTEXT_NICE                = 4,
+       LTTNG_EVENT_CONTEXT_VPID                = 5,
+       LTTNG_EVENT_CONTEXT_TID                 = 6,
+       LTTNG_EVENT_CONTEXT_VTID                = 7,
+       LTTNG_EVENT_CONTEXT_PPID                = 8,
+       LTTNG_EVENT_CONTEXT_VPPID               = 9,
+       LTTNG_EVENT_CONTEXT_PTHREAD_ID          = 10,
+       LTTNG_EVENT_CONTEXT_HOSTNAME            = 11,
+       LTTNG_EVENT_CONTEXT_IP                  = 12,
+       LTTNG_EVENT_CONTEXT_PERF_CPU_COUNTER    = 13,
        LTTNG_EVENT_CONTEXT_PERF_THREAD_COUNTER = 14,
+       LTTNG_EVENT_CONTEXT_APP_CONTEXT         = 15,
 };
 
 enum lttng_event_field_type {
@@ -178,6 +180,10 @@ struct lttng_event_context {
 
        union {
                struct lttng_event_perf_counter_ctx perf_counter;
+               struct {
+                       char *provider_name;
+                       char *ctx_name;
+               } app_ctx;
                char padding[LTTNG_EVENT_CONTEXT_PADDING2];
        } u;
 };
This page took 0.035904 seconds and 4 git commands to generate.