1. 06 7月, 2015 6 次提交
    • A
      perf evsel: Rename set_filter to apply_filter · f47805a2
      Arnaldo Carvalho de Melo 提交于
      We need to be able to go on constructing a complex filter in multiple
      stages, since we can only set one filter per event.
      
      For instance, we need to be able, in 'perf trace' to filter by the
      'common_pid' field all the time, if only for the tracer itself, to
      avoid a feedback loop, and, in addition, we may want to filter the
      raw_syscalls:sys_{enter,exit} events by its 'id' filter, when using
      'perf trace -e open,close' or 'perf trace -e !open,close', i.e. when
      we are interested in just a subset of syscalls or when we are not
      interested in it.
      
      So we will have:
      
         perf_evsel__set_filter(evsel, char *filter)
      
             Replaces whatever is in evsel->filter.
      
         perf_evsel__append_filter(evsel, const char *op, char *filter)
      
             Appends, using op ("&&" or "||") with what is in evsel->filter.
      
         perf_evsel__apply_filter(evsel, filter):
      
              That actually applies a filter, be it the one being
              constructed in evsel->filter, or any other, for tools
              with more specific ways to build the filter, issuing
              the appropriate ioctl for all the evsel fds.
      
      The same changes will be made to the evlist__{set,apply} variants to
      keep everything consistent.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-2s5z9xtpnc2lwio3cv5x0jek@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f47805a2
    • A
      perf tools: Asprintf like functions to format integer filter expression · 93ec4ce7
      Arnaldo Carvalho de Melo 提交于
        char *asprintf_expr_in_ints(const char *var, size_t nints, int *ints);
        char *asprintf_expr_not_in_ints(const char *var, size_t nints, int *ints);
      
      Example of output formatted with those functions:
      
        # ./tp_filter 6 12 2015
        asprintf_expr_in_ints:     id == 6 || id == 12 || id == 2015
        asprintf_expr_not_in_ints: id != 6 && id != 12 && id != 2015
        #
      
      It'll be used with, for instance, perf_evsel__set_filter_in_ints(), that
      will be used in turn to ask the kernel to filter out all raw_syscalls:*
      except for the ones specified by the user via:
      
       $ perf trace -e some,list,of,syscalls
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-jt07vfp6bd8y50c05j1t7hrn@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      93ec4ce7
    • A
      tools: Copy rbtree_augmented.h from the kernel · 307bc971
      Arnaldo Carvalho de Melo 提交于
      To complete the transitioning to not to share the same files with the
      kernel, also moving it from tools/perf/include/linux/ to
      tools/include/linux to make the whoke rbtree kit to other tools/ living
      codebases.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-5bxyehixafckqm6ez25alnfo@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      307bc971
    • A
      tools: Move rbtree.h from tools/perf/ · 03da23a3
      Arnaldo Carvalho de Melo 提交于
      The previous step, copying the contents minus the rcupdate.h parts, was
      done as a minimal fix, now do the move from tools/perf/.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-52fllxtsgmtke66pmv98mcma@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      03da23a3
    • A
      tools: Copy lib/rbtree.c to tools/lib/ · 3f735377
      Arnaldo Carvalho de Melo 提交于
      So that we can remove kernel specific stuff we've been stubbing out via
      a tools/include/linux/export.h that gets removed in this patch and to
      avoid breakages in the future like the one fixed recently where
      rcupdate.h started being used in rbtree.h.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-rxuzfsozpb8hv1emwpx06rm6@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3f735377
    • A
      perf tools: Copy rbtree.h from the kernel · 4407f967
      Arnaldo Carvalho de Melo 提交于
      We were using the include/linux/rbtree.h directly from the kernel,
      which broke the build as soon as it started using rcupdate.h, to
      avoid dragging the rcu header files into tools/, for which there is
      no use so far, grab a copy of rbtree.h.
      
      This is the minimal fix, later patches will copy as well lib/rbtree.c
      and move rbtree.h into tools/include/, etc.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-dfmuj0j63w4by7vhlh4hhn74@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4407f967
  2. 02 7月, 2015 1 次提交
  3. 26 6月, 2015 21 次提交
  4. 25 6月, 2015 1 次提交
  5. 24 6月, 2015 9 次提交
  6. 20 6月, 2015 2 次提交