From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ross Zwisler <zwisler@google.com>,
Vincent Donnefort <vdonnefort@google.com>
Subject: [PATCH 0/2] tracing: Have boot instance use reserve_mem option and use fgraph tracer
Date: Tue, 13 Aug 2024 13:11:04 -0400 [thread overview]
Message-ID: <20240813171104.950972475@goodmis.org> (raw)
Now that "reserve_mem" kernel command line option is upstream, add a patch
to use it with the ring buffer boot up mappings. That is:
reserve_mem=12M:4096:trace trace_instance=boot_mapped@trace
Will allocate 12 megabytes at boot up that is aligned by 4096 bytes and
label it with "trace". A trace_instance with the name "boot_mapped" will be
created on top of that memory.
Documentation has been updated about this and it states that KASLR can make
it somewhat unreliable for every boot as well as the layout of the memory
for the ring buffer may change with new kernel versions which will clear the
previous buffer.
Also, now that function graph tracing can be used by trace instances,
update its code to be able to be used by this boot process. This can give a
nicer trace of a reboot:
swapper/0-1 [000] d..1. 363.079162: 0) | lapic_shutdown() {
swapper/0-1 [000] d..1. 363.079163: 0) | disable_local_APIC() {
swapper/0-1 [000] d..1. 363.079163: 0) + 26.144 us | clear_local_APIC.part.0();
swapper/0-1 [000] d.... 363.079192: 0) + 29.424 us | }
swapper/0-1 [000] d.... 363.079192: 0) + 30.376 us | }
swapper/0-1 [000] d..1. 363.079193: 0) | restore_boot_irq_mode() {
swapper/0-1 [000] d..1. 363.079194: 0) | native_restore_boot_irq_mode() {
swapper/0-1 [000] d..1. 363.079194: 0) + 13.863 us | disconnect_bsp_APIC();
swapper/0-1 [000] d.... 363.079209: 0) + 14.933 us | }
swapper/0-1 [000] d.... 363.079209: 0) + 16.009 us | }
swapper/0-1 [000] d..1. 363.079210: 0) 0.694 us | hpet_disable();
swapper/0-1 [000] d..1. 363.079211: 0) 0.511 us | iommu_shutdown_noop();
swapper/0-1 [000] d.... 363.079212: 0) # 3980.260 us | }
swapper/0-1 [000] d..1. 363.079212: 0) | native_machine_emergency_restart() {
swapper/0-1 [000] d..1. 363.079213: 0) 0.495 us | tboot_shutdown();
swapper/0-1 [000] d..1. 363.079230: 0) | acpi_reboot() {
swapper/0-1 [000] d..1. 363.079231: 0) | acpi_reset() {
swapper/0-1 [000] d..1. 363.079232: 0) | acpi_os_write_port() {
This is based on top of:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
branch: ring-buffer/for-next
Which was supposed to go in the last merge window, but due to
miscommunication, it did not. As it has been in linux-next, I do not want to
rebase it, so instead I merged in v6.11-rc1 to get access to the
reserve_mem kernel command line parameter and applied these patches on top.
Steven Rostedt (1):
tracing/fgraph: Have fgraph handle previous boot function addresses
Steven Rostedt (Google) (1):
tracing: Allow boot instances to use reserve_mem boot memory
----
Documentation/admin-guide/kernel-parameters.txt | 13 +++++++++++++
kernel/trace/trace.c | 19 +++++++++++++------
kernel/trace/trace_functions_graph.c | 23 ++++++++++++++++++-----
3 files changed, 44 insertions(+), 11 deletions(-)
next reply other threads:[~2024-08-13 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 17:11 Steven Rostedt [this message]
2024-08-13 17:11 ` [PATCH 1/2] tracing: Allow boot instances to use reserve_mem boot memory Steven Rostedt
2024-08-13 17:11 ` [PATCH 2/2] tracing/fgraph: Have fgraph handle previous boot function addresses Steven Rostedt
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=20240813171104.950972475@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vdonnefort@google.com \
--cc=zwisler@google.com \
/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®