<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/util/parse-events.c, branch linux-3.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-03-13T16:01:28Z</updated>
<entry>
<title>perf record: Fix buffer overrun bug in tracepoint_id_to_path()</title>
<updated>2012-03-13T16:01:28Z</updated>
<author>
<name>Stephane Eranian</name>
</author>
<published>2012-03-13T15:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8aa8a7c80ccdfac2df5ee48a51a4a7bee2143d4f'/>
<id>urn:sha1:8aa8a7c80ccdfac2df5ee48a51a4a7bee2143d4f</id>
<content type='text'>
This patch fixes a buffer overrun bug in
tracepoint_id_to_path(). The bug manisfested itself as a memory
error reported by perf record. I ran into it with perf sched:

 $ perf sched rec noploop 2 noploop for 2 seconds
 [ perf record: Woken up 14 times to write data ]
 [ perf record: Captured and wrote 42.701 MB perf.data (~1865622 samples) ]
 Fatal: No memory to alloc tracepoints list

It turned out that tracepoint_id_to_path() was reading the
tracepoint id using read() but the buffer was not large enough
to include the \n terminator for id with 4 digits or more.

The patch fixes the problem by extending the buffer to a more
reasonable size covering all possible id length include \n
terminator. Note that atoll() stops at the first non digit
character, thus it is not necessary to clear the buffer between
each read.

Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Acked-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: fweisbec@gmail.com
Cc: dsahern@gmail.com
Link: http://lkml.kernel.org/r/20120313155102.GA6465@quad
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf tools: Add support for guest/host-only profiling</title>
<updated>2012-01-06T17:49:49Z</updated>
<author>
<name>Joerg Roedel</name>
</author>
<published>2012-01-04T16:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99320cc8240affcf33c04d28f47259de3b1a75d1'/>
<id>urn:sha1:99320cc8240affcf33c04d28f47259de3b1a75d1</id>
<content type='text'>
To restrict a counter to either host or guest mode this patch introduces
two new event modifiers: G and H.

With G the counter is configured in guest-only mode and with H in
host-only mode.

Cc: Gleb Natapov &lt;gleb@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Joerg Roedel &lt;joro@8bytes.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
Link: http://lkml.kernel.org/n/tip-or5aj3rghy9ngyg882z6kln9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf kvm: Do guest-only counting by default</title>
<updated>2012-01-06T17:47:37Z</updated>
<author>
<name>Joerg Roedel</name>
</author>
<published>2012-01-04T16:54:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1aed2671738785e8f5aea663a6fda91aa7ef59b5'/>
<id>urn:sha1:1aed2671738785e8f5aea663a6fda91aa7ef59b5</id>
<content type='text'>
Make use of exclude_guest and exlude_host in perf-kvm to do only
guest-only counting by default.

Cc: Gleb Natapov &lt;gleb@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Joerg Roedel &lt;joro@8bytes.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
[ committer note: Moved perf_{guest,host} &amp; event_attr_init to util.c ]
[                 so as not to drag more stuff to the python binding]
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf: Add support for PERF_HW_COUNT_REF_CPU_CYCLES</title>
<updated>2011-12-21T09:26:41Z</updated>
<author>
<name>Stephane Eranian</name>
</author>
<published>2011-12-10T23:28:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1ac18af219835fd5b8e19c14d2dd75c55f78737'/>
<id>urn:sha1:f1ac18af219835fd5b8e19c14d2dd75c55f78737</id>
<content type='text'>
Add new generic hw event: ref-cycles, which maps to
PERF_HW_COUNT_REF_CPUCYCLES:

 $ perf stat -e ref-cycles ls

Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1323559734-3488-5-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf tools: Simplify debugfs mountpoint handling code</title>
<updated>2011-11-28T12:11:28Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2011-11-16T16:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebf294bf4f147aff29df5a16bfb0f8ebca15feaa'/>
<id>urn:sha1:ebf294bf4f147aff29df5a16bfb0f8ebca15feaa</id>
<content type='text'>
We don't need to have two PATH_MAX char sized arrays holding it, just
one in util/debugfs.c will do.

Also rename debugfs_path to tracing_events_path, as it is not the path
to debugfs, that is debugfs_mountpoint. Both are now accessible.

This will allow accessing this code in the perf python binding without
having to drag in perf.c and util/parse-events.c.

The defaults for these variables are the canonical "/sys/kernel/debug"
and "/sys/kernel/debug/tracing/events/", removing the need for simple
tools to call debugfs_mount(NULL).

Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-ug9jvtjrsqbluuhqqxpvg30f@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Fix error handling of unknown events</title>
<updated>2011-08-18T10:21:13Z</updated>
<author>
<name>Stephane Eranian</name>
</author>
<published>2011-07-23T02:10:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=777d1d71db622a5e1ff703495741c3d257b532e5'/>
<id>urn:sha1:777d1d71db622a5e1ff703495741c3d257b532e5</id>
<content type='text'>
There was a problem with the parse_events() code not printing the
correct event name when an event was unknown and starting with an 'r'.
The source of the problem was the way raw notation was parsed.

Without the patch:
	$ perf stat -e retired_foo
	invalid event modifier: 'tired_foo'

With the patch:
	$ perf stat -e retired_foo
	invalid or unsupported event: 'retired_foo'

This also covers the case where the name of the event was not printed at
all when perf was linked with libpfm4.

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20110723021043.GA20178@quad
Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf list: Fix exit value</title>
<updated>2011-08-18T10:19:15Z</updated>
<author>
<name>Stephane Eranian</name>
</author>
<published>2011-05-23T12:39:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77e57297b4ff3f602ba5105398d342a4b4a54774'/>
<id>urn:sha1:77e57297b4ff3f602ba5105398d342a4b4a54774</id>
<content type='text'>
This patch fixes an issue with the exit value of perf list:

$ perf list; echo $?
129

perf list returns an error exit code even though there is no error.

There was a stray exit(129) in print_events(). This patch removes this
exit().

$ perf list; echo $?
0

$ perf list hw sw
  cpu-cycles OR cycles                               [Hardware event]
  stalled-cycles-frontend OR idle-cycles-frontend    [Hardware event]
  stalled-cycles-backend OR idle-cycles-backend      [Hardware event]
  instructions                                       [Hardware event]
  cache-references                                   [Hardware event]
  cache-misses                                       [Hardware event]
  branch-instructions OR branches                    [Hardware event]
  branch-misses                                      [Hardware event]
  bus-cycles                                         [Hardware event]

  cpu-clock                                          [Software event]
  task-clock                                         [Software event]
  page-faults OR faults                              [Software event]
  minor-faults                                       [Software event]
  major-faults                                       [Software event]
  context-switches OR cs                             [Software event]
  cpu-migrations OR migrations                       [Software event]
  alignment-faults                                   [Software event]
  emulation-faults                                   [Software event]
$ echo $?
0

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20110523123917.GA31060@quad
Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: De-opt the parse_events function</title>
<updated>2011-07-21T08:41:11Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2011-07-14T09:25:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f120f9d51be3a7db8991e7b78dc08bab5f8ab8f3'/>
<id>urn:sha1:f120f9d51be3a7db8991e7b78dc08bab5f8ab8f3</id>
<content type='text'>
Moving out the option parameter from parse_events function,
and adding new parse_events_option function instead.

The option parameter is used only to carry "struct perf_evlist"
pointer for chaining new events. Putting it away, enable us
to call parse_events from other places without using the
option parameter.

Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: acme@redhat.com
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
Link: http://lkml.kernel.org/r/1310635534-4013-2-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf tools: Add missing 'node' alias to the hw_cache[] array</title>
<updated>2011-07-21T07:54:51Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2011-07-13T20:58:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0111919da268e1ced315e009ad0d0435a2fb32ac'/>
<id>urn:sha1:0111919da268e1ced315e009ad0d0435a2fb32ac</id>
<content type='text'>
Add "node" as a simple alias for NODE cache events.

The addition of NODE cache events broke the parse_alias
function, so any mismatched event caused the segfault, like:

  # ./perf stat -e krava ls

The hw_cache/hw_cache_op/hw_cache_result arrays needs to follow
PERF_COUNT_HW_CACHE_*MAX enums. Adding those MAXs to be size
of those arrays, so possible ommision in future wil not lead to
segfault.

Adding read/write/prefetch as allowed operations for node cache
event.

Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: acme@redhat.com
Link: http://lkml.kernel.org/r/20110713205818.GB7827@jolsa.brq.redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf: Fix multi-event parsing bug</title>
<updated>2011-05-17T18:45:36Z</updated>
<author>
<name>Stephane Eranian</name>
</author>
<published>2011-05-17T13:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94692349c4fc1bc74c19a28f9379509361a06a3b'/>
<id>urn:sha1:94692349c4fc1bc74c19a28f9379509361a06a3b</id>
<content type='text'>
This patch fixes an issue with event parsing.
The following commit appears to have broken the
ability to specify a comma separated list of events:

   commit ceb53fbf6dbb1df26d38379a262c6981fe73dd36
   Author: Ingo Molnar &lt;mingo@elte.hu&gt;
   Date:   Wed Apr 27 04:06:33 2011 +0200

       perf stat: Fail more clearly when an invalid modifier is specified

This patch fixes this while preserving the desired effect:

$ perf stat -e instructions:u,instructions:k ls /dev/null /dev/null

 Performance counter stats for 'ls /dev/null':

            365956 instructions:u           #    0.00  insns per cycle
            731806 instructions:k           #    0.00  insns per cycle

        0.001108862  seconds time elapsed

$ perf stat -e task-clock-msecs true
invalid event modifier: '-msecs'
Run 'perf list' for a list of valid events and modifiers

Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Cc: acme@redhat.com
Cc: peterz@infradead.org
Cc: fweisbec@gmail.com
Link: http://lkml.kernel.org/r/20110517133619.GA6999@quad
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
