mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] tracing: scripts/sorttable: Updates for v6.15
@ 2025-03-25 22:05 Steven Rostedt
  2025-03-28  0:09 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2025-03-25 22:05 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: LKML, Masami Hiramatsu, Mathieu Desnoyers, Mark Rutland,
	Masahiro Yamada, Andrew Morton, Catalin Marinas, Will Deacon,
	Mark Brown, Arnd Bergmann, Nathan Chancellor



Linus,

tracing and sorttable updates for 6.15:

- Implement arm64 build time sorting of the mcount location table

  When gcc is used to build arm64, the mcount_loc section is all zeros in
  the vmlinux elf file. The addresses are stored in the Elf_Rela location.
  To sort at build time, an array is allocated and the addresses are added
  to it via the content of the mcount_loc section as well as he Elf_Rela
  data. After sorting, the information is put back into the Elf_Rela which
  now has the section sorted.

- Make sorting of mcount location table for arm64 work with clang as well

  When clang is used, the mcount_loc section contains the addresses, unlike
  the gcc build. An array is still created and the sorting works for both
  methods.

- Remove weak functions from the mcount_loc section

  Have the sorttable code pass in the data of functions defined via nm -S
  which shows the functions as well as their sizes. Using this information
  the sorttable code can determine if a function in the mcount_loc section
  was weak and overridden. If the function is not found, it is set to be
  zero. On boot, when the mcount_loc section is read and the ftrace table is
  created, if the address in the mcount_loc is not in the kernel core text
  then it is removed and not added to the ftrace_filter_functions (the
  functions that can be attached by ftrace callbacks).

- Update and fix the reporting of how much data is used for ftrace functions

  On boot, a report of how many pages were used by the ftrace table as well
  as how they were grouped (the table holds a list of sections that are
  groups of pages that were able to be allocated). The removing of the weak
  functions required the accounting to be updated.


Please pull the latest trace-sorttable-v6.15 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-sorttable-v6.15

Tag SHA1: 77e26125a028422c57c40da1c29b4bea889a21f2
Head SHA1: dc208c69c033d3caba0509da1ae065d2b5ff165f


Steven Rostedt (10):
      arm64: scripts/sorttable: Implement sorting mcount_loc at boot for arm64
      scripts/sorttable: Have mcount rela sort use direct values
      scripts/sorttable: Always use an array for the mcount_loc sorting
      scripts/sorttable: Zero out weak functions in mcount_loc table
      ftrace: Update the mcount_loc check of skipped entries
      ftrace: Have ftrace pages output reflect freed pages
      ftrace: Test mcount_loc addr before calling ftrace_call_addr()
      ftrace: Check against is_kernel_text() instead of kaslr_offset()
      scripts/sorttable: Use normal sort if theres no relocs in the mcount section
      scripts/sorttable: Allow matches to functions before function entry

----
 arch/arm64/Kconfig      |   1 +
 kernel/trace/ftrace.c   |  55 ++++++-
 scripts/link-vmlinux.sh |   4 +-
 scripts/sorttable.c     | 411 +++++++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 457 insertions(+), 14 deletions(-)
---------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-28  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-25 22:05 [GIT PULL] tracing: scripts/sorttable: Updates for v6.15 Steven Rostedt
2025-03-28  0:09 ` pr-tracker-bot

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®