All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Michael Petlan <mpetlan@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/2] perf tests: Fix switch tracking test for P4
Date: Sun, 4 Jun 2017 21:09:22 +0200	[thread overview]
Message-ID: <20170604190922.GF18648@krava> (raw)
In-Reply-To: <0e5e60b6-2304-b3df-e619-4c1a1afd0ad9@intel.com>

On Fri, Jun 02, 2017 at 02:35:59PM +0300, Adrian Hunter wrote:
> On 01/06/17 16:11, Arnaldo Carvalho de Melo wrote:
> > Em Fri, May 26, 2017 at 02:31:40PM +0200, Jiri Olsa escreveu:
> >> The switch tracking test keeps failing on P4 cpu,
> >> when NMI watchdog is enabled.
> >>
> >> The reason is that P4 pmu uses substitute event for cycles
> >> when it's already taken (in our case by NMI watchdog), but
> >> this event does not give even results like cycles, and we
> >> could end up with no samples at all for our short
> >> measuring period.
> 
> Did you consider increasing the measuring period?

not really, in some cases I saw no samples generated for bigger
periods for another workloads, so I did not think of that in here,
but I'll check

SNIP

> >>  
> >>  static int spin_sleep(void)
> >>  {
> >> @@ -298,6 +299,27 @@ static int process_events(struct perf_evlist *evlist,
> >>  	return ret;
> >>  }
> >>  
> >> +static const char *get_hw_counter(void)
> >> +{
> >> +	const char *counter = "cycles:u";
> >> +	char *cpuid;
> >> +
> >> +	cpuid = get_cpuid_str();
> >> +
> >> +	/*
> >> +	 * P4 pmu uses substitute event for cycles if it's already
> >> +	 * taken, but it does not give even results like cycles,
> >> +	 * and we could end up with no samples at all for our short
> >> +	 * measuring period. Using "instructions:u" event instead,
> >> +	 * which seems to be stable enough.
> >> +	 */
> >> +	if (!strcmp("GenuineIntel-15-4", cpuid))
> 
> Why just model 4?  Isn't all family 15 P4?

I thought there's just one model.. but just based on the kernel code

> 
> >> +		counter = "instructions:u";
> >> +
> >> +	pr_debug("using '%s' HW counter");
> 
> tests/switch-tracking.c: In function ‘get_hw_counter’:
> tests/switch-tracking.c:319:2: error: format ‘%s’ expects a matching ‘char
> *’ argument [-Werror=format=]

omg.. sure ;-)

thanks,
jirka

      reply	other threads:[~2017-06-04 19:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 12:31 [PATCH 1/2] perf tests: Fix switch tracking test for P4 Jiri Olsa
2017-05-26 12:31 ` [PATCH 2/2] perf tests: Rename cycles event to HW event Jiri Olsa
2017-06-01 13:11 ` [PATCH 1/2] perf tests: Fix switch tracking test for P4 Arnaldo Carvalho de Melo
2017-06-02 11:35   ` Adrian Hunter
2017-06-04 19:09     ` Jiri Olsa [this message]

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=20170604190922.GF18648@krava \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --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.