All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org, Mike Galbraith <efault@gmx.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [tree] Performance Counters for Linux, v7
Date: Sun, 22 Mar 2009 12:18:58 +0530	[thread overview]
Message-ID: <1237704538.29643.8.camel@localhost.localdomain> (raw)
In-Reply-To: <20090321161021.GA9826@elte.hu>

On Sat, 2009-03-21 at 17:10 +0100, Ingo Molnar wrote:

> There's also been lots of updates to the userspace tools (kerneltop 
> and perfstat):
> 
>    http://redhat.com/~mingo/perfcounters/kerneltop.c
>    http://redhat.com/~mingo/perfcounters/perfstat.c
> 

If possible, can we also prepare git tree for these userspace tools by
this way we can also look on logs and check incremental changes
otherwise we leads to:

[jaswinder@hpdv5 20090321]$ cc -O2 -g -lrt -Wall -W -o perfstat perfstat.c
perfstat.c:57:40: error: include/linux/perf_counter.h: No such file or directory
perfstat.c:83: warning: ‘struct perf_counter_hw_event’ declared inside parameter list
perfstat.c:83: warning: its scope is only this definition or declaration, which is probably not what you want
perfstat.c:127: error: ‘PERF_TYPE_SOFTWARE’ undeclared here (not in a function)
perfstat.c:127: error: ‘PERF_COUNT_TASK_CLOCK’ undeclared here (not in a function)
perfstat.c:128: error: ‘PERF_COUNT_CPU_MIGRATIONS’ undeclared here (not in a function)
perfstat.c:129: error: ‘PERF_COUNT_CONTEXT_SWITCHES’ undeclared here (not in a function)
perfstat.c:130: error: ‘PERF_COUNT_PAGE_FAULTS’ undeclared here (not in a function)
perfstat.c:131: error: ‘PERF_TYPE_HARDWARE’ undeclared here (not in a function)
perfstat.c:131: error: ‘PERF_COUNT_CPU_CYCLES’ undeclared here (not in a function)
perfstat.c:132: error: ‘PERF_COUNT_INSTRUCTIONS’ undeclared here (not in a function)
perfstat.c:133: error: ‘PERF_COUNT_CACHE_REFERENCES’ undeclared here (not in a function)
perfstat.c:134: error: ‘PERF_COUNT_CACHE_MISSES’ undeclared here (not in a function)
perfstat.c: In function ‘type_valid’:
perfstat.c:164: error: ‘PERF_HW_EVENTS_MAX’ undeclared (first use in this function)
perfstat.c:164: error: (Each undeclared identifier is reported only once
perfstat.c:164: error: for each function it appears in.)
perfstat.c:166: error: ‘PERF_SW_EVENTS_MAX’ undeclared (first use in this function)
perfstat.c:167: error: ‘PERF_TYPE_TRACEPOINT’ undeclared (first use in this function)
perfstat.c: In function ‘event_name’:
perfstat.c:194: error: ‘PERF_TYPE_TRACEPOINT’ undeclared (first use in this function)
perfstat.c: In function ‘create_counter’:
perfstat.c:286: error: storage size of ‘hw_event’ isn’t known
perfstat.c:290: error: ‘PERF_RECORD_SIMPLE’ undeclared (first use in this function)
perfstat.c:286: warning: unused variable ‘hw_event’
perfstat.c: In function ‘main’:
perfstat.c:385: error: ‘PERF_COUNT_CPU_CLOCK’ undeclared (first use in this function)
[jaswinder@hpdv5 20090321]$ 
[jaswinder@hpdv5 20090321]$ cc -O2 -g -lrt -Wall -W -o perfstat perfstat.c -I/home/jaswinder/jaswinder-git/linux-2.6-tip
[jaswinder@hpdv5 20090321]$ ./perfstat -e 1 -e 3 -e 5 ls -lR /usr/include/
Usage: perfstat [<events...>] <cmd...>

PerfStat Options (up to 64 event types can be specified):

 -e EID       --event_id=EID       # event type ID
                                   0: CPU cycles
                                   1: instructions
                                   2: cache accesses
                                   3: cache misses
                                   4: branch instructions
                                   5: branch prediction misses
                                   6: bus cycles

 -s                                # system-wide collection

 -c <cmd..>   --command=<cmd..>    # command+arguments to be timed.

[jaswinder@hpdv5 20090321]$ ./perfstat -e 0,1,2 -c ls
Usage: perfstat [<events...>] <cmd...>

PerfStat Options (up to 64 event types can be specified):

 -e EID       --event_id=EID       # event type ID
                                   0: CPU cycles
                                   1: instructions
                                   2: cache accesses
                                   3: cache misses
                                   4: branch instructions
                                   5: branch prediction misses
                                   6: bus cycles

 -s                                # system-wide collection

 -c <cmd..>   --command=<cmd..>    # command+arguments to be timed.

[jaswinder@hpdv5 20090321]$

Thanks,

--
JSR


  reply	other threads:[~2009-03-22  6:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21 12:04 [PATCH v2] perfcounters: record time running and time enabled for each counter Paul Mackerras
2009-03-21 12:52 ` Andrew Morton
2009-03-21 15:52   ` Ingo Molnar
2009-03-21 15:54   ` Ingo Molnar
2009-03-21 16:10     ` [tree] Performance Counters for Linux, v7 Ingo Molnar
2009-03-22  6:48       ` Jaswinder Singh Rajput [this message]
2009-03-23 22:06         ` Ingo Molnar
2009-03-21 23:13   ` [PATCH v2] perfcounters: record time running and time enabled for each counter Paul Mackerras
2009-03-22  8:55     ` Andrew Morton
2009-03-22 11:44       ` Paul Mackerras
2009-03-22 17:16     ` Ray Lee

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=1237704538.29643.8.camel@localhost.localdomain \
    --to=jaswinder@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=efault@gmx.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.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.