[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <07d3a395-48e9-c1ab-27bb-e48c41951a86@foxvalley.net>
Date: Tue, 19 Sep 2023 18:31:19 -0600
From: Dan Raymond <draymond@...valley.net>
To: linux-kernel@...r.kernel.org, x86@...nel.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
hpa@...or.com
Subject: Re: [PATCH v1] arch/x86: port I/O tracing on x86
This feature can also be used with boot-time tracing by adding
"trace_event=portio" to the kernel command line. This will show,
for example, what port accesses were performed by the UART driver
when it loaded:
# dmesg | grep 16550
[ 0.395213] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.395487] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 0.395886] 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
# cat /sys/kernel/tracing/trace | grep 'port=0x02f'
init-1 [000] d..1. 0.399132: portio_read: port=0x02f9 value=0x00 io_serial_in+0x0/0x80
init-1 [000] d..1. 0.399138: portio_write: port=0x02f9 value=0x00 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399143: portio_read: port=0x02f9 value=0x00 io_serial_in+0x0/0x80
init-1 [000] d..1. 0.399145: portio_write: port=0x02f9 value=0x0f io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399151: portio_read: port=0x02f9 value=0x0f io_serial_in+0x0/0x80
init-1 [000] d..1. 0.399152: portio_write: port=0x02f9 value=0x00 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399154: portio_read: port=0x02fc value=0x00 io_serial_in+0x0/0x80
init-1 [000] d..1. 0.399156: portio_read: port=0x02fb value=0x00 io_serial_in+0x0/0x80
init-1 [000] d..1. 0.399158: portio_write: port=0x02fb value=0xbf io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399160: portio_write: port=0x02fa value=0x00 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399162: portio_write: port=0x02fb value=0x00 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399163: portio_write: port=0x02fa value=0x01 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399165: portio_read: port=0x02fa value=0xc1 io_serial_in+0x0/0x80
init-1 [000] d..1. 0.399167: portio_write: port=0x02fb value=0x00 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399169: portio_write: port=0x02fc value=0x00 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399171: portio_write: port=0x02fa value=0x01 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399173: portio_write: port=0x02fa value=0x07 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399175: portio_write: port=0x02fa value=0x00 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399176: portio_read: port=0x02f8 value=0x00 io_serial_in+0x0/0x80
init-1 [000] d..1. 0.399178: portio_write: port=0x02f9 value=0x00 io_serial_out+0x0/0x40
init-1 [000] d..1. 0.399203: portio_write: port=0x02fc value=0x00 io_serial_out+0x0/0x40
Powered by blists - more mailing lists