Re: [PATCH v4] block: Add ioprio to block_rq tracepoint

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

 



On Tue, 11 Jun 2024 13:17:37 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> > Hmm ... if the above array is terminated with a { -1, NULL } sentinel and if
> > __print_symbolic() is changed into trace_print_symbols_seq(p, ...) then the above
> > array can be moved into a C file, isn't it?
> >   
> 
> Then it breaks user space parsing. The reason for __print_symbolic() is
> that libtraceevent knows how to parse it. If you put the array into a C
> file, the above mappings will not show up in the tracefs format file for
> the event, and you'll just get "[FAILED TO PARSE]" output from the user
> space tracing tooling.

Note, the trace headers are not normal headers. They are included multiple
times (when TRACE_HEADER_MULTI_READ is defined). Only one C file will
include this header with CREATE_TRACE_POINTS defined and these headers will
then build global C functions and variables.

So technically, this "array" is in C file and not in a header, as it will
not be created unless a C file includes it with CREATE_TRACE_POINTS, and
only one C file may do that (otherwise the kernel will fail to build).

-- Steve




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux