On Wed, 31 Jul 2019 15:16:13 +0300 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > > > @@ -5413,18 +5419,20 @@ int tep_cmdline_pid(struct tep_handle *tep, struct tep_cmdline *cmdline) > > > /** > > > * tep_event_info - parse the data into the print format > > > * @s: the trace_seq to write to > > > + * @format: printf format string. If any precision is specified in the string, > > > + * print in raw data format > > > > I'm curious to why this is needed? > > > > We can use a temp trace_seq like I mentioned above, and then apply the > > format to it at the end. > > > We need a way to keep the tep_set_print_raw() functionality with the > new tep_print_event() API. > The user should have an option to print TEP_PRINT_INFO in raw format. > The only way to pass some > extra parameters to tep_print_event() is to use the printf format > string, "%s" in this case. > I choose to use "%s" width specifier to force TEP_PRINT_INFO in raw format. > The other possible solution could be to define a new > TEP_PRINT_INFO_RAW type for this use case. I like the idea of adding a new TEP_PRINT_INFO_RAW, as the other seems more of a "hack" to get that. It also removes the ability to pass in a string precision for a normal TEP_PRINT_INFO. Thanks! -- Steve
![]() |