From: Jiri Olsa <jolsa@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
linux-rt-users@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Juri Lelli <juri.lelli@redhat.com>,
Sebastian Sewior <bigeasy@linutronix.de>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH] tracing: Fix trace entry and trace common fields for preempt_lazy_count
Date: Fri, 21 Feb 2020 17:10:30 +0100 [thread overview]
Message-ID: <20200221161030.GC657629@krava> (raw)
In-Reply-To: <20200221104922.5ea8bb5f@gandalf.local.home>
On Fri, Feb 21, 2020 at 10:49:22AM -0500, Steven Rostedt wrote:
> On Fri, 21 Feb 2020 16:35:41 +0100
> Jiri Olsa <jolsa@kernel.org> wrote:
>
> > When commit 65fd07df3588 added preempt_lazy_count into 'struct trace_entry'
> > it did not add 4 bytes padding. Also we need to update the common fields
> > for tracepoint, otherwise some tools (bpftrace) stop working due to missing
> > common fields.
> >
> > Fixes: 65fd07df3588 ("x86: Support for lazy preemption")
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> > include/linux/trace_events.h | 2 ++
> > kernel/trace/trace_events.c | 3 +++
> > 2 files changed, 5 insertions(+)
> >
> > diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
> > index f3b1ef07e4a5..51a3f5188923 100644
> > --- a/include/linux/trace_events.h
> > +++ b/include/linux/trace_events.h
> > @@ -65,6 +65,8 @@ struct trace_entry {
> > unsigned short migrate_disable;
> > unsigned short padding;
> > unsigned char preempt_lazy_count;
> > + unsigned char padding1;
> > + unsigned short padding2;
>
>
> Wait! I don't have these changes in my tree, nor do I see them in
> Linus's. This really bloats the trace events! This header is very
> sensitive to size and just willy nilly adding to it is unacceptable.
> It's like adding to the page_struct. This gets added to *every* event,
> and a single byte added, causes 1M extra for a million events (very
> common in tracing). It causes 1G extra for a billion events.
I'm on top of:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
v5.4.19-rt11-rebase
>
> Let's find a better way to handle this.
I can fix the bpftrace tool I guess, through it's not
so convenient the way it's used in it
jirka
>
> -- Steve
>
>
> > };
> >
> > #define TRACE_EVENT_TYPE_MAX \
> > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> > index accaae59a762..1fe37b7aeaff 100644
> > --- a/kernel/trace/trace_events.c
> > +++ b/kernel/trace/trace_events.c
> > @@ -183,6 +183,9 @@ static int trace_define_common_fields(void)
> > __common_field(int, pid);
> > __common_field(unsigned short, migrate_disable);
> > __common_field(unsigned short, padding);
> > + __common_field(unsigned char, preempt_lazy_count);
> > + __common_field(unsigned char, padding1);
> > + __common_field(unsigned short, padding2);
> >
> > return ret;
> > }
>
next prev parent reply other threads:[~2020-02-21 16:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 15:35 [PATCH] tracing: Fix trace entry and trace common fields for preempt_lazy_count Jiri Olsa
2020-02-21 15:49 ` Steven Rostedt
2020-02-21 16:10 ` Jiri Olsa [this message]
2020-02-21 16:21 ` Steven Rostedt
2020-02-21 16:29 ` Jiri Olsa
2020-02-21 16:50 ` Steven Rostedt
2020-02-21 16:37 ` Sebastian Andrzej Siewior
2020-02-21 17:44 ` [PATCH RT] tracing: make preempt_lazy and migrate_disable counter smaller Sebastian Andrzej Siewior
2020-02-21 19:51 ` Steven Rostedt
2020-02-21 20:20 ` Sebastian Andrzej Siewior
2020-02-21 20:49 ` Jiri Olsa
2020-02-24 10:01 ` Sebastian Andrzej Siewior
2020-02-24 11:54 ` Jiri Olsa
2020-02-24 17:01 ` [PATCH RT v2] " Sebastian Andrzej Siewior
2020-03-09 12:30 ` Jiri Olsa
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=20200221161030.GC657629@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=jolsa@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.