diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2018-07-03 11:38:16 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-07-23 14:49:55 +0300 |
commit | 27c0620ce94798688a425cb04db0e7f568e44d52 (patch) | |
tree | 2040c27c135544b65a0ca56421325f55d11e15cd /drivers/s390/cio | |
parent | 67faae15675aac8327b094677a830fdffb7dd68d (diff) | |
download | linux-27c0620ce94798688a425cb04db0e7f568e44d52.tar.xz |
s390 cio: Rewrite trace point in s390_cio_adapter_int
Tools like 'perf stat' parse the trace point format files defined
in /sys/kernel/debug/tracing/events/s390/.../format to handle
the print fmt: statement. The kernel provides a library in
directory linux/tools/lib/traceevent/* for this reason.
This library can not handle structures or unions defined in
the TRACE_EVENT/TP_STRUCT__entry macros with __field_struct macro.
There is no possibility to extract a structure member
(which might be a bit field) since there is no packing
information nor bit field offset by parsing the printf fmt line.
Therefore rewrite the TRACE_EVENT macro and add the
__field macro for the necessary members.
Keep the __fieldstruct macro to extract the complete
structure when dumps are analysed.
Note that the same information is displayed, this is no
interface change.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Acked-by: Sebastian Ott <sebott@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/trace.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/cio/trace.h b/drivers/s390/cio/trace.h index baff0303533e..4337317f64fd 100644 --- a/drivers/s390/cio/trace.h +++ b/drivers/s390/cio/trace.h @@ -331,11 +331,13 @@ TRACE_EVENT(s390_cio_adapter_int, TP_ARGS(tpi_info), TP_STRUCT__entry( __field_struct(struct tpi_info, tpi_info) + __field(u8, isc) ), TP_fast_assign( __entry->tpi_info = *tpi_info; + __entry->isc = tpi_info->isc; ), - TP_printk("isc=%d", __entry->tpi_info.isc) + TP_printk("isc=%d", __entry->isc) ); /** |