Re: [PATCH v2 3/3] tools/lib/traceevent: Implement new traceevent APIs for accessing struct tep_handler fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 22 Mar 2019 15:07:42 +0200
Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx> wrote:

> 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_clear_flag(), tep_test_flag(), tep_set_parsing_failures(), tep_get_parsing_failures()
> tep_get_header_page_ts_size(), tep_is_old_format(), tep_set_print_raw() and tep_set_test_filters()

Also, I want to get out of the habit of just listing what changed, and
having a more descriptive change log. It was fine for man pages, but
for adding or modifying the actual code, it needs more detail. Like:

This patch implements new APIs which can be used to access the struct
tep_handle fields:

 tep_get_event() - retrieves an event pointer at a specific index

  modify tep_get_first_event() to use tep_get_event()

 tep_clear_flag() - clears a a tep handle flag

[ BTW, you have in the patch "tep_clear_flags" let's not have it be
  plural. Otherwise we should not be an enum. ]

 tep_test_flag() - test if a given flag is set

 tep_get_header_page_ts_size() - ...

  [ Wait! we are renaming this one. Let's use the new name ]

 tep_get_header_timestamp_size() - returns the size of the timestamp
				   stored in the header.

 tep_get_cpus - returns the number of CPUs

 tep_set_parsing_failures() - internal use function for setting failures

 tep_get_parsing_failures() - Returns what was set above

 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

-- Steve


> 
> Signed-off-by: Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx>




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux