mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2 -tip] perf_counter: parse-events.c introduce alias member in event_symbol
Date: Mon, 22 Jun 2009 16:10:09 +0200	[thread overview]
Message-ID: <20090622141009.GB6486@elte.hu> (raw)
In-Reply-To: <1245675657.7537.3.camel@localhost.localdomain>


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> On Mon, 2009-06-22 at 13:32 +0200, Ingo Molnar wrote:
> 
> > Another nice thing would be for 'perf list' to actually start each 
> > counter and stop it - and see whether it ticks. Perhaps that could 
> > be a new sub-command: 'perf test' ?
> > 
> > New 'perf' subcommands are added easily:
> > 
> > create a new tools/perf/builtin-foo.c file, add it to 
> > command-list.txt and to the Makefile - add it to perf.c's array of 
> > built-in commands and add a Documentation/perf-foo.txt file to 
> > generate manpages and usage strings for it.
> > 
> 
> Ok this is just a ugly quick hack to get the idea what actually you are
> looking for :
> 
> [RFC] perf_counter tools: introduce perf test to test each event for ticks
> 
> perf test to Test all events for whether it ticks
> 
>   $ perf test
> 
>   Performance counter stats for 'test':
> 
>   task-clock-msecs      Tick
>   context-switches      Tick
>   CPU-migrations        Tick
>   page-faults           Tick
>   cycles                Tick
>   instructions          Tick
>   cache-references      Tick
>   cache-misses          Tick
> 
>      0.007693869  seconds time elapsed.

yeah, somethig like that. I'd suggest to print out the actual 
measured events:

    cache-references      10123 events
    cache-misses             15 events

and if something does not appear to be ticking then do something 
like:

    cache-misses          <inactive>

I.e. 'perf test' could be a quick way both to users and to 
developers to see all possible hw and sw events.

Perhaps builtin-test.c should also do specific testcases for certain 
counters - say intentionally migrate to a CPU and back to see the 
CPU-migration count.

Also, you seem to have copied builtin-stat.c, right? Try to 
librarize as much of the functionality (into util/*) to make the 
resulting linecount increase as small as possible.

	Ingo

  parent reply	other threads:[~2009-06-22 14:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-22 11:13 [PATCH 1/2 -tip] perf_counter: parse-events.c define separate declarations for H/W and S/W events Jaswinder Singh Rajput
2009-06-22 11:14 ` [PATCH 2/2 -tip] perf_counter: parse-events.c introduce alias member in event_symbol Jaswinder Singh Rajput
2009-06-22 11:32   ` Ingo Molnar
2009-06-22 13:00     ` Jaswinder Singh Rajput
2009-06-22 13:23       ` Jaswinder Singh Rajput
2009-06-22 14:10       ` Ingo Molnar [this message]
2009-06-22 19:55         ` Jaswinder Singh Rajput
2009-06-22 20:07           ` Jaswinder Singh Rajput
2009-06-23  8:27             ` Ingo Molnar
2009-06-23  8:24           ` Ingo Molnar
2009-06-23 14:02             ` Jaswinder Singh Rajput
2009-06-24  8:48               ` Ingo Molnar
2009-06-22 11:38   ` [tip:perfcounters/urgent] perf_counter tools: Introduce " tip-bot for Jaswinder Singh Rajput
2009-06-22 11:38 ` [tip:perfcounters/urgent] perf_counter tools: Define separate declarations for H/W and S/W events tip-bot for Jaswinder Singh Rajput

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=20090622141009.GB6486@elte.hu \
    --to=mingo@elte.hu \
    --cc=jaswinder@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®