linux-toolchains.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [POC,V2 0/5] SFrame based stack tracer for user space in the kernel
@ 2023-05-26  5:32 Indu Bhagat
  2023-05-26  5:32 ` [POC,V2 1/5] Kconfig: x86: Add new config options for userspace unwinder Indu Bhagat
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Indu Bhagat @ 2023-05-26  5:32 UTC (permalink / raw)
  To: linux-toolchains, rostedt, peterz; +Cc: Indu Bhagat

Hello,

I have addressed the code review comments and hopefully made the SFrame
reader code more maintainable.

Link to V1 posting: https://lore.kernel.org/linux-toolchains/20230501181515.098acdce@gandalf.local.home/T/#t

The POC still suffers with the same issue: accessing SFrame data is not NMI
safe.  This is expected to be addressed via the changes to perf workings
proposed by Steve.

Once it is clearer what sort of callback APIs are required for the kernel to
gather user space stack trace using SFrame stack tracer, I am happy to work on
that later and make the necessary changes to SFrame stack tracer code in
lib/sframe/sframe_unwind.c and lib/sframe/sframe_state.c etc.

As some of the code in lib/sframe/iterate_phdr.[ch] will get dropped or
reworked, I skipped spending time on improving those files ATM.

Thanks,

Indu Bhagat (5):
  Kconfig: x86: Add new config options for userspace unwinder
  task_struct : add additional member for sframe state
  sframe: add new SFrame library
  sframe: add an SFrame format stack tracer
  x86_64: invoke SFrame based stack tracer for user space

 arch/x86/Kconfig.debug        |  31 ++
 arch/x86/events/core.c        |  51 ++++
 fs/binfmt_elf.c               |  37 +++
 include/linux/sched.h         |   5 +
 include/linux/sframe_unwind.h |  72 +++++
 kernel/exit.c                 |   9 +
 lib/Makefile                  |   1 +
 lib/sframe/Makefile           |  11 +
 lib/sframe/iterate_phdr.c     | 115 +++++++
 lib/sframe/iterate_phdr.h     |  39 +++
 lib/sframe/sframe.h           | 264 ++++++++++++++++
 lib/sframe/sframe_read.c      | 549 ++++++++++++++++++++++++++++++++++
 lib/sframe/sframe_read.h      |  80 +++++
 lib/sframe/sframe_state.c     | 447 +++++++++++++++++++++++++++
 lib/sframe/sframe_state.h     |  84 ++++++
 lib/sframe/sframe_unwind.c    | 214 +++++++++++++
 16 files changed, 2009 insertions(+)
 create mode 100644 include/linux/sframe_unwind.h
 create mode 100644 lib/sframe/Makefile
 create mode 100644 lib/sframe/iterate_phdr.c
 create mode 100644 lib/sframe/iterate_phdr.h
 create mode 100644 lib/sframe/sframe.h
 create mode 100644 lib/sframe/sframe_read.c
 create mode 100644 lib/sframe/sframe_read.h
 create mode 100644 lib/sframe/sframe_state.c
 create mode 100644 lib/sframe/sframe_state.h
 create mode 100644 lib/sframe/sframe_unwind.c

-- 
2.39.2


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

end of thread, other threads:[~2023-05-26  7:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26  5:32 [POC,V2 0/5] SFrame based stack tracer for user space in the kernel Indu Bhagat
2023-05-26  5:32 ` [POC,V2 1/5] Kconfig: x86: Add new config options for userspace unwinder Indu Bhagat
2023-05-26  5:32 ` [POC,V2 2/5] task_struct : add additional member for sframe state Indu Bhagat
2023-05-26  5:32 ` [POC,V2 3/5] sframe: add new SFrame library Indu Bhagat
2023-05-26  5:32 ` [POC,V2 4/5] sframe: add an SFrame format stack tracer Indu Bhagat
2023-05-26  5:32 ` [POC,V2 5/5] x86_64: invoke SFrame based stack tracer for user space Indu Bhagat
2023-05-26  7:56 ` [POC,V2 0/5] SFrame based stack tracer for user space in the kernel Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).