* Re: [PATCH v2 0/6] use canonical ftrace path whenever possible [not found] <20230215223350.2658616-1-zwisler@google.com> @ 2023-03-10 8:29 ` Michael S. Tsirkin [not found] ` <20230310190658.GA3723158@google.com> 2023-03-22 2:32 ` Michael S. Tsirkin [not found] ` <20230215223350.2658616-6-zwisler@google.com> 2 siblings, 1 reply; 4+ messages in thread From: Michael S. Tsirkin @ 2023-03-10 8:29 UTC (permalink / raw) To: Ross Zwisler Cc: kvm, Ross Zwisler, linux-kernel, Steven Rostedt, virtualization, linux-mm, linux-hardening, Masami Hiramatsu, linux-kselftest, Paolo Bonzini, Andrew Morton, linux-trace-kernel, Shuah Khan, Tycho Andersen, Tobin C. Harding On Wed, Feb 15, 2023 at 03:33:44PM -0700, Ross Zwisler wrote: > Changes in v2: > * Dropped patches which were pulled into maintainer trees. > * Split BPF patches out into another series targeting bpf-next. > * trace-agent now falls back to debugfs if tracefs isn't present. > * Added Acked-by from mst@redhat.com to series. > * Added a typo fixup for the virtio-trace README. > > Steven, assuming there are no objections, would you feel comfortable > taking this series through your tree? Acked-by: Michael S. Tsirkin <mst@redhat.com> if you want the virtio patches through my tree after all, let me know. > --- > The canonical location for the tracefs filesystem is at /sys/kernel/tracing. > > But, from Documentation/trace/ftrace.rst: > > Before 4.1, all ftrace tracing control files were within the debugfs > file system, which is typically located at /sys/kernel/debug/tracing. > For backward compatibility, when mounting the debugfs file system, > the tracefs file system will be automatically mounted at: > > /sys/kernel/debug/tracing > > There are many places where this older debugfs path is still used in > code comments, selftests, examples and tools, so let's update them to > avoid confusion. > > I've broken up the series as best I could by maintainer or directory, > and I've only sent people the patches that I think they care about to > avoid spamming everyone. > > Ross Zwisler (6): > tracing: always use canonical ftrace path > selftests: use canonical ftrace path > leaking_addresses: also skip canonical ftrace path > tools/kvm_stat: use canonical ftrace path > tools/virtio: use canonical ftrace path > tools/virtio: fix typo in README instructions > > include/linux/kernel.h | 2 +- > include/linux/tracepoint.h | 4 ++-- > kernel/trace/Kconfig | 20 +++++++++---------- > kernel/trace/kprobe_event_gen_test.c | 2 +- > kernel/trace/ring_buffer.c | 2 +- > kernel/trace/synth_event_gen_test.c | 2 +- > kernel/trace/trace.c | 2 +- > samples/user_events/example.c | 4 ++-- > scripts/leaking_addresses.pl | 1 + > scripts/tracing/draw_functrace.py | 6 +++--- > tools/kvm/kvm_stat/kvm_stat | 2 +- > tools/lib/api/fs/tracing_path.c | 4 ++-- > .../testing/selftests/user_events/dyn_test.c | 2 +- > .../selftests/user_events/ftrace_test.c | 10 +++++----- > .../testing/selftests/user_events/perf_test.c | 8 ++++---- > tools/testing/selftests/vm/protection_keys.c | 4 ++-- > tools/tracing/latency/latency-collector.c | 2 +- > tools/virtio/virtio-trace/README | 4 ++-- > tools/virtio/virtio-trace/trace-agent.c | 12 +++++++---- > 19 files changed, 49 insertions(+), 44 deletions(-) > > -- > 2.39.1.637.g21b0678d19-goog _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20230310190658.GA3723158@google.com>]
* Re: [PATCH v2 0/6] use canonical ftrace path whenever possible [not found] ` <20230310190658.GA3723158@google.com> @ 2023-03-10 19:37 ` Steven Rostedt 0 siblings, 0 replies; 4+ messages in thread From: Steven Rostedt @ 2023-03-10 19:37 UTC (permalink / raw) To: Ross Zwisler Cc: linux-kselftest, kvm, Michael S. Tsirkin, linux-kernel, virtualization, linux-mm, linux-hardening, Masami Hiramatsu, Ross Zwisler, Paolo Bonzini, Andrew Morton, linux-trace-kernel, Shuah Khan, Tycho Andersen, Tobin C. Harding On Fri, 10 Mar 2023 12:06:58 -0700 Ross Zwisler <zwisler@google.com> wrote: > On Fri, Mar 10, 2023 at 03:29:49AM -0500, Michael S. Tsirkin wrote: > > On Wed, Feb 15, 2023 at 03:33:44PM -0700, Ross Zwisler wrote: > > > Changes in v2: > > > * Dropped patches which were pulled into maintainer trees. > > > * Split BPF patches out into another series targeting bpf-next. > > > * trace-agent now falls back to debugfs if tracefs isn't present. > > > * Added Acked-by from mst@redhat.com to series. > > > * Added a typo fixup for the virtio-trace README. > > > > > > Steven, assuming there are no objections, would you feel comfortable > > > taking this series through your tree? > > > > Acked-by: Michael S. Tsirkin <mst@redhat.com> > > > > if you want the virtio patches through my tree after all, let me know. > > Yes, please, that would be great. I'll send out v3 with the few patches that > haven't gotten a response, but I'll drop the virtio patches assuming you've > got them. > Since the last patch 6/6 is not tracing related, I would prefer it to go through the virtio tree. For patches 1-5, please add: Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Thanks! -- Steve _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/6] use canonical ftrace path whenever possible [not found] <20230215223350.2658616-1-zwisler@google.com> 2023-03-10 8:29 ` [PATCH v2 0/6] use canonical ftrace path whenever possible Michael S. Tsirkin @ 2023-03-22 2:32 ` Michael S. Tsirkin [not found] ` <20230215223350.2658616-6-zwisler@google.com> 2 siblings, 0 replies; 4+ messages in thread From: Michael S. Tsirkin @ 2023-03-22 2:32 UTC (permalink / raw) To: Ross Zwisler Cc: kvm, Ross Zwisler, linux-kernel, Steven Rostedt, virtualization, linux-mm, linux-hardening, Masami Hiramatsu, linux-kselftest, Paolo Bonzini, Andrew Morton, linux-trace-kernel, Shuah Khan, Tycho Andersen, Tobin C. Harding On Wed, Feb 15, 2023 at 03:33:44PM -0700, Ross Zwisler wrote: > Changes in v2: > * Dropped patches which were pulled into maintainer trees. > * Split BPF patches out into another series targeting bpf-next. > * trace-agent now falls back to debugfs if tracefs isn't present. > * Added Acked-by from mst@redhat.com to series. > * Added a typo fixup for the virtio-trace README. > > Steven, assuming there are no objections, would you feel comfortable > taking this series through your tree? for merging up to patch 5 through another tree: Acked-by: Michael S. Tsirkin <mst@redhat.com> I'll merge patch 6, no problem. > --- > The canonical location for the tracefs filesystem is at /sys/kernel/tracing. > > But, from Documentation/trace/ftrace.rst: > > Before 4.1, all ftrace tracing control files were within the debugfs > file system, which is typically located at /sys/kernel/debug/tracing. > For backward compatibility, when mounting the debugfs file system, > the tracefs file system will be automatically mounted at: > > /sys/kernel/debug/tracing > > There are many places where this older debugfs path is still used in > code comments, selftests, examples and tools, so let's update them to > avoid confusion. > > I've broken up the series as best I could by maintainer or directory, > and I've only sent people the patches that I think they care about to > avoid spamming everyone. > > Ross Zwisler (6): > tracing: always use canonical ftrace path > selftests: use canonical ftrace path > leaking_addresses: also skip canonical ftrace path > tools/kvm_stat: use canonical ftrace path > tools/virtio: use canonical ftrace path > tools/virtio: fix typo in README instructions > > include/linux/kernel.h | 2 +- > include/linux/tracepoint.h | 4 ++-- > kernel/trace/Kconfig | 20 +++++++++---------- > kernel/trace/kprobe_event_gen_test.c | 2 +- > kernel/trace/ring_buffer.c | 2 +- > kernel/trace/synth_event_gen_test.c | 2 +- > kernel/trace/trace.c | 2 +- > samples/user_events/example.c | 4 ++-- > scripts/leaking_addresses.pl | 1 + > scripts/tracing/draw_functrace.py | 6 +++--- > tools/kvm/kvm_stat/kvm_stat | 2 +- > tools/lib/api/fs/tracing_path.c | 4 ++-- > .../testing/selftests/user_events/dyn_test.c | 2 +- > .../selftests/user_events/ftrace_test.c | 10 +++++----- > .../testing/selftests/user_events/perf_test.c | 8 ++++---- > tools/testing/selftests/vm/protection_keys.c | 4 ++-- > tools/tracing/latency/latency-collector.c | 2 +- > tools/virtio/virtio-trace/README | 4 ++-- > tools/virtio/virtio-trace/trace-agent.c | 12 +++++++---- > 19 files changed, 49 insertions(+), 44 deletions(-) > > -- > 2.39.1.637.g21b0678d19-goog _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20230215223350.2658616-6-zwisler@google.com>]
* Re: [PATCH v2 5/6] tools/virtio: use canonical ftrace path [not found] ` <20230215223350.2658616-6-zwisler@google.com> @ 2023-06-02 11:15 ` Michael S. Tsirkin 0 siblings, 0 replies; 4+ messages in thread From: Michael S. Tsirkin @ 2023-06-02 11:15 UTC (permalink / raw) To: Ross Zwisler Cc: Ross Zwisler, linux-kernel, Steven Rostedt, virtualization, linux-trace-kernel On Wed, Feb 15, 2023 at 03:33:49PM -0700, Ross Zwisler wrote: > The canonical location for the tracefs filesystem is at /sys/kernel/tracing. > > But, from Documentation/trace/ftrace.rst: > > Before 4.1, all ftrace tracing control files were within the debugfs > file system, which is typically located at /sys/kernel/debug/tracing. > For backward compatibility, when mounting the debugfs file system, > the tracefs file system will be automatically mounted at: > > /sys/kernel/debug/tracing > > A few spots in tools/virtio still refer to this older debugfs > path, so let's update them to avoid confusion. > > Signed-off-by: Ross Zwisler <zwisler@google.com> queued this too. thanks! > --- > tools/virtio/virtio-trace/README | 2 +- > tools/virtio/virtio-trace/trace-agent.c | 12 ++++++++---- > 2 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/tools/virtio/virtio-trace/README b/tools/virtio/virtio-trace/README > index b64845b823ab..cea29a2a4c0a 100644 > --- a/tools/virtio/virtio-trace/README > +++ b/tools/virtio/virtio-trace/README > @@ -95,7 +95,7 @@ Run > > 1) Enable ftrace in the guest > <Example> > - # echo 1 > /sys/kernel/debug/tracing/events/sched/enable > + # echo 1 > /sys/kernel/tracing/events/sched/enable > > 2) Run trace agent in the guest > This agent must be operated as root. > diff --git a/tools/virtio/virtio-trace/trace-agent.c b/tools/virtio/virtio-trace/trace-agent.c > index cdfe77c2b4c8..7e2d9bbf0b84 100644 > --- a/tools/virtio/virtio-trace/trace-agent.c > +++ b/tools/virtio/virtio-trace/trace-agent.c > @@ -18,8 +18,9 @@ > #define PIPE_DEF_BUFS 16 > #define PIPE_MIN_SIZE (PAGE_SIZE*PIPE_DEF_BUFS) > #define PIPE_MAX_SIZE (1024*1024) > -#define READ_PATH_FMT \ > - "/sys/kernel/debug/tracing/per_cpu/cpu%d/trace_pipe_raw" > +#define TRACEFS "/sys/kernel/tracing" > +#define DEBUGFS "/sys/kernel/debug/tracing" > +#define READ_PATH_FMT "%s/per_cpu/cpu%d/trace_pipe_raw" > #define WRITE_PATH_FMT "/dev/virtio-ports/trace-path-cpu%d" > #define CTL_PATH "/dev/virtio-ports/agent-ctl-path" > > @@ -120,9 +121,12 @@ static const char *make_path(int cpu_num, bool this_is_write_path) > if (this_is_write_path) > /* write(output) path */ > ret = snprintf(buf, PATH_MAX, WRITE_PATH_FMT, cpu_num); > - else > + else { > /* read(input) path */ > - ret = snprintf(buf, PATH_MAX, READ_PATH_FMT, cpu_num); > + ret = snprintf(buf, PATH_MAX, READ_PATH_FMT, TRACEFS, cpu_num); > + if (ret > 0 && access(buf, F_OK) != 0) > + ret = snprintf(buf, PATH_MAX, READ_PATH_FMT, DEBUGFS, cpu_num); > + } > > if (ret <= 0) { > pr_err("Failed to generate %s path(CPU#%d):%d\n", > -- > 2.39.1.637.g21b0678d19-goog _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-02 11:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230215223350.2658616-1-zwisler@google.com>
2023-03-10 8:29 ` [PATCH v2 0/6] use canonical ftrace path whenever possible Michael S. Tsirkin
[not found] ` <20230310190658.GA3723158@google.com>
2023-03-10 19:37 ` Steven Rostedt
2023-03-22 2:32 ` Michael S. Tsirkin
[not found] ` <20230215223350.2658616-6-zwisler@google.com>
2023-06-02 11:15 ` [PATCH v2 5/6] tools/virtio: use canonical ftrace path Michael S. Tsirkin
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).