From: Dan Raymond <draymond@foxvalley.net>
To: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
hpa@zytor.com
Subject: Re: [PATCH v1] arch/x86: port I/O tracing on x86
Date: Tue, 19 Sep 2023 18:31:19 -0600 [thread overview]
Message-ID: <07d3a395-48e9-c1ab-27bb-e48c41951a86@foxvalley.net> (raw)
In-Reply-To: <7341871f-870d-b701-fb19-8ab66480318b@foxvalley.net>
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
next prev parent reply other threads:[~2023-09-20 0:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 17:55 Dan Raymond
2023-09-19 17:26 ` kernel test robot
2023-09-19 19:30 ` Dan Raymond
2023-09-20 0:31 ` Dan Raymond [this message]
2023-09-19 17:26 ` kernel test robot
2023-09-19 19:43 ` Peter Zijlstra
2023-09-19 19:56 ` Dan Raymond
2023-09-19 21:12 ` Peter Zijlstra
2023-09-19 21:31 ` Dan Raymond
2023-09-19 22:43 ` Dan Raymond
2023-09-21 17:07 ` Dan Raymond
2023-09-25 21:10 ` Dan Raymond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07d3a395-48e9-c1ab-27bb-e48c41951a86@foxvalley.net \
--to=draymond@foxvalley.net \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®