]> asedeno.scripts.mit.edu Git - linux.git/commit
tools lib traceevent: Implement new traceevent APIs for accessing struct tep_handler...
authorTzvetomir Stoyanov <tstoyanov@vmware.com>
Mon, 1 Apr 2019 16:43:12 +0000 (12:43 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 1 Apr 2019 18:18:09 +0000 (15:18 -0300)
commit80c5526c8544ae76cba31fb9702ab8accac1f0f3
tree4f27eb1dc3c529ad365b0b0c82ff6008c58eab09
parentd5d2d05bd5b02efa8545a3323a60465de9efb21e
tools lib traceevent: Implement new traceevent APIs for accessing struct tep_handler fields

As struct tep_handler definition is not exposed as part of libtraceevent
API, its fields cannot be accessed directly by the library users. This
patch implements new APIs, which can be used to access the struct
tep_handler fields:

  tep_get_event()        - retrieves an event pointer at a specific index
  tep_get_first_event()  - is modified to use tep_get_event()
  tep_clear_flag()       - clears a tep handle flag
  tep_test_flag()        - test if a given flag is set
  tep_get_header_timestamp_size() - returns the size of the timestamp stored
                           in the header.
  tep_get_cpus()         - returns the number of CPUs
  tep_is_old_format()    - returns true if data was created by an
                           older kernel with the old data format
  tep_set_print_raw()    - have the output print in the raw format
  tep_set_test_filters() - debugging utility for testing tep filters

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/linux-trace-devel/20190325145017.30246-4-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190401164343.679629539@goodmis.org
[ Renamed some newly added "pevent" to "tep" ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse-api.c
tools/lib/traceevent/event-parse.h