[PATCH 0/3] fgraph: Do not save calltime in shadow stack

Steven Rostedt posted 3 patches 2 months, 2 weeks ago
include/linux/ftrace.h               |  5 +--
include/linux/sched.h                |  1 +
kernel/trace/fgraph.c                | 85 +++++++++++++++++++++---------------
kernel/trace/ftrace.c                | 45 +++++++++++++------
kernel/trace/trace.h                 |  1 +
kernel/trace/trace_functions_graph.c | 52 +++++++++++++++++++++-
6 files changed, 137 insertions(+), 52 deletions(-)
[PATCH 0/3] fgraph: Do not save calltime in shadow stack
Posted by Steven Rostedt 2 months, 2 weeks ago
Now that there's more users of the function graph infrastructure, the
calltime field on the shadow stack wastes space and also getting the
timestamp is a waste of time for those that do not use it.

Instead, have the only two users of it (function graph tracer and the
profiler) store it in its own shadow stack variable.

Steven Rostedt (3):
      fgraph: Use fgraph data to store subtime for profiler
      ftrace: Use a running sleeptime instead of saving in shadow stack
      ftrace: Have calltime be saved in the fgraph storage

----
 include/linux/ftrace.h               |  5 +--
 include/linux/sched.h                |  1 +
 kernel/trace/fgraph.c                | 85 +++++++++++++++++++++---------------
 kernel/trace/ftrace.c                | 45 +++++++++++++------
 kernel/trace/trace.h                 |  1 +
 kernel/trace/trace_functions_graph.c | 52 +++++++++++++++++++++-
 6 files changed, 137 insertions(+), 52 deletions(-)
Re: [PATCH 0/3] fgraph: Do not save calltime in shadow stack
Posted by Masami Hiramatsu (Google) 2 months, 2 weeks ago
On Sat, 14 Sep 2024 17:48:05 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> Now that there's more users of the function graph infrastructure, the
> calltime field on the shadow stack wastes space and also getting the
> timestamp is a waste of time for those that do not use it.
> 
> Instead, have the only two users of it (function graph tracer and the
> profiler) store it in its own shadow stack variable.

This series looks good to me. Instead of adding add-hoc flag, this
solves call-time clearer.

For this series,

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thank you,

> 
> Steven Rostedt (3):
>       fgraph: Use fgraph data to store subtime for profiler
>       ftrace: Use a running sleeptime instead of saving in shadow stack
>       ftrace: Have calltime be saved in the fgraph storage
> 
> ----
>  include/linux/ftrace.h               |  5 +--
>  include/linux/sched.h                |  1 +
>  kernel/trace/fgraph.c                | 85 +++++++++++++++++++++---------------
>  kernel/trace/ftrace.c                | 45 +++++++++++++------
>  kernel/trace/trace.h                 |  1 +
>  kernel/trace/trace_functions_graph.c | 52 +++++++++++++++++++++-
>  6 files changed, 137 insertions(+), 52 deletions(-)


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>