All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [RFC] Don't print sample_type bits in non-group events not set in the group's was Re: [PATCH] perf, script: Fix crash with printing mixed trace point and other events
Date: Fri, 18 Jan 2019 17:17:08 +0100	[thread overview]
Message-ID: <20190118161708.GE28346@krava> (raw)
In-Reply-To: <20190118161140.z45vl3milw2vk4hy@two.firstfloor.org>

On Fri, Jan 18, 2019 at 08:11:42AM -0800, Andi Kleen wrote:
> > +static bool perf_evsel__should_skip(struct perf_evsel *evsel)
> > +{
> > +	struct perf_event_attr *attr = &evsel->attr;
> > +	struct perf_evsel *leader = evsel->leader;
> > +
> > +	return (leader != evsel) && !attr->freq && !attr->sample_freq;
> > +}
> > +
> >  static int process_sample_event(struct perf_tool *tool,
> >  				union perf_event *event,
> >  				struct perf_sample *sample,
> > @@ -1934,6 +1942,9 @@ static int process_sample_event(struct perf_tool *tool,
> >  	struct perf_script *scr = container_of(tool, struct perf_script, tool);
> >  	struct addr_location al;
> >  
> > +	if (perf_evsel__should_skip(evsel))
> > +		return 0;
> 
> That just skips, but surely it has to be displayed somewhere?
>

yea as I wrote in that email:

.......   we should probably skip (something like below) that and
add script field that would output the sample_read values for the
leader

jirka

  reply	other threads:[~2019-01-18 16:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 19:48 [PATCH] perf, script: Fix crash with printing mixed trace point and other events Andi Kleen
2019-01-18  9:49 ` Jiri Olsa
2019-01-18 12:59   ` Arnaldo Carvalho de Melo
2019-01-18 13:01     ` Arnaldo Carvalho de Melo
2019-01-18 13:42       ` [RFC] Don't print sample_type bits in non-group events not set in the group's was " Arnaldo Carvalho de Melo
2019-01-18 16:10         ` Jiri Olsa
2019-01-18 16:11           ` Andi Kleen
2019-01-18 16:17             ` Jiri Olsa [this message]
2019-01-19 15:37             ` Jiri Olsa
2019-01-28 14:13               ` Jiri Olsa
2019-01-28 17:00                 ` Andi Kleen
2019-01-29  8:48                   ` Arnaldo Carvalho de Melo
2019-01-29  9:04                     ` Jiri Olsa
2019-01-22 11:34 ` [tip:perf/urgent] perf " tip-bot for Andi Kleen

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=20190118161708.GE28346@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /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.