Merge tag 'arc-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / evsel.h
index fe9f3279632b3282902f8d01df1ba3d2f1ddeb78..298e6bbca200bd4740bddc4e6bb1fce7414d5bf4 100644 (file)
@@ -9,7 +9,7 @@
 #include "xyarray.h"
 #include "symbol.h"
 #include "cpumap.h"
-#include "stat.h"
+#include "counts.h"
 
 struct perf_evsel;
 
@@ -31,8 +31,38 @@ struct perf_sample_id {
 
 struct cgroup_sel;
 
+/*
+ * The 'struct perf_evsel_config_term' is used to pass event
+ * specific configuration data to perf_evsel__config routine.
+ * It is allocated within event parsing and attached to
+ * perf_evsel::config_terms list head.
+*/
+enum {
+       PERF_EVSEL__CONFIG_TERM_PERIOD,
+       PERF_EVSEL__CONFIG_TERM_FREQ,
+       PERF_EVSEL__CONFIG_TERM_TIME,
+       PERF_EVSEL__CONFIG_TERM_CALLGRAPH,
+       PERF_EVSEL__CONFIG_TERM_STACK_USER,
+       PERF_EVSEL__CONFIG_TERM_MAX,
+};
+
+struct perf_evsel_config_term {
+       struct list_head        list;
+       int     type;
+       union {
+               u64     period;
+               u64     freq;
+               bool    time;
+               char    *callgraph;
+               u64     stack_user;
+       } val;
+};
+
 /** struct perf_evsel - event selector
  *
+ * @evlist - evlist this evsel is in, if it is in one.
+ * @node - To insert it into evlist->entries or in other list_heads, say in
+ *         the event parsing routines.
  * @name - Can be set to retain the original event name passed by the user,
  *         so that when showing results in tools such as 'perf stat', we
  *         show the name used, not some alias.
@@ -46,6 +76,7 @@ struct cgroup_sel;
  */
 struct perf_evsel {
        struct list_head        node;
+       struct perf_evlist      *evlist;
        struct perf_event_attr  attr;
        char                    *filter;
        struct xyarray          *fd;
@@ -86,6 +117,8 @@ struct perf_evsel {
        unsigned long           *per_pkg_mask;
        struct perf_evsel       *leader;
        char                    *group_name;
+       bool                    cmdline_group_boundary;
+       struct list_head        config_terms;
 };
 
 union u64_swap {