<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/util/pmu.c, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-05-10T14:57:52Z</updated>
<entry>
<title>perf pmu: Make pmu_formats_string to check return value of strbuf</title>
<updated>2016-05-10T14:57:52Z</updated>
<author>
<name>Masami Hiramatsu</name>
</author>
<published>2016-05-10T05:47:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=11db4e29bb50442ecef2173f325b7be4e7790025'/>
<id>urn:sha1:11db4e29bb50442ecef2173f325b7be4e7790025</id>
<content type='text'>
Make pmu_formats_string() to check return value of strbuf APIs so that
it can detect errors in it.

Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20160510054744.6158.37810.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Fix PMU term format max value calculation</title>
<updated>2016-04-01T21:46:24Z</updated>
<author>
<name>Kan Liang</name>
</author>
<published>2016-03-30T19:16:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac0e2cd555373ae6f8f3a3ad3fbbf5b6d1e7aaaa'/>
<id>urn:sha1:ac0e2cd555373ae6f8f3a3ad3fbbf5b6d1e7aaaa</id>
<content type='text'>
Currently the max value of format is calculated by the bits number. It
relies on the continuity of the format.

However, uncore event format is not continuous. E.g. uncore qpi event
format can be 0-7,21.

If bit 21 is set, there is parsing issues as below.

  $ perf stat -a -e uncore_qpi_0/event=0x200002,umask=0x8/
  event syntax error: '..pi_0/event=0x200002,umask=0x8/'
                                    \___ value too big for format, maximum is 511

This patch return the real max value by setting all possible bits to 1.

Signed-off-by: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lkml.kernel.org/r/1459365375-14285-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Omit unnecessary cast in perf_pmu__parse_scale</title>
<updated>2016-03-09T13:42:22Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2016-03-08T18:42:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea8f75f981918c5946fc4029acdc86707fa901c1'/>
<id>urn:sha1:ea8f75f981918c5946fc4029acdc86707fa901c1</id>
<content type='text'>
There's no need to use a const char pointer, we can used char pointer
from the beginning and omit the unnecessary cast.

Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/r/20160308184230.GB7897@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Fix locale handling in pmu parsing</title>
<updated>2016-03-03T14:04:54Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2016-03-03T09:53:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9a5978ac4ede901fa73d7c28ae1c5d89bc2a46a'/>
<id>urn:sha1:f9a5978ac4ede901fa73d7c28ae1c5d89bc2a46a</id>
<content type='text'>
Ingo reported regression on display format of big numbers, which is
missing separators (in default perf stat output).

 triton:~/tip&gt; perf stat -a sleep 1
         ...
         127008602      cycles                    #    0.011 GHz
         279538533      stalled-cycles-frontend   #  220.09% frontend cycles idle
         119213269      instructions              #    0.94  insn per cycle

This is caused by recent change:

  perf stat: Check existence of frontend/backed stalled cycles

that added call to pmu_have_event, that subsequently calls
perf_pmu__parse_scale, which has a bug in locale handling.

The lc string returned from setlocale, that we use to store old locale
value, may be allocated in static storage. Getting a dynamic copy to
make it survive another setlocale call.

  $ perf stat ls
         ...
         2,360,602      cycles                    #    3.080 GHz
         2,703,090      instructions              #    1.15  insn per cycle
           546,031      branches                  #  712.511 M/sec

Committer note:

Since the patch introducing the regression didn't made to perf/core,
move it to just before where the regression was introduced, so that we
don't break bisection for this feature.

Reported-by: Ingo Molnar &lt;mingo@redhat.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20160303095348.GA24511@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Dont stop PMU parsing on alias parse error</title>
<updated>2016-02-23T15:46:16Z</updated>
<author>
<name>Andi Kleen</name>
</author>
<published>2016-02-17T22:44:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=940db6dcd3f4659303fdf6befe7416adc4d24118'/>
<id>urn:sha1:940db6dcd3f4659303fdf6befe7416adc4d24118</id>
<content type='text'>
When an error happens during alias parsing currently the complete
parsing of all attributes of the PMU is stopped. This is breaks old perf
on a newer kernel that may have not-yet-know alias attributes (such as
.scale or .per-pkg).

Continue when some attribute is unparseable.

This is IMHO a stable candidate and should be backported to older
versions to avoid problems with newer kernels.

v2: Print warnings when something goes wrong.
v3: Change warning to debug output

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: stable@vger.kernel.org # v3.6+
Link: http://lkml.kernel.org/r/1455749095-18358-1-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Use perf_event_terms__purge() for non-malloced terms</title>
<updated>2016-02-12T19:53:22Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2016-02-12T19:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=682dc24c2a0f13d5a16ac8f4303671eb8f11519f'/>
<id>urn:sha1:682dc24c2a0f13d5a16ac8f4303671eb8f11519f</id>
<content type='text'>
In these two cases, a 'perf test' entry and in the PMU code the
list_head is on the stack, so we can't use perf_event__free_terms()
(soon to be renamed to perf_event_terms__delete()), because it will
free the list_head as well.

Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: He Kuang &lt;hekuang@huawei.com&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Cc: Zefan Li &lt;lizefan@huawei.com&gt;
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/n/tip-i956ryjhz97gnnqe8iqe7m7s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf pmu: Fix misleadingly indented assignment (whitespace)</title>
<updated>2016-01-26T14:52:42Z</updated>
<author>
<name>Markus Trippelsdorf</name>
</author>
<published>2015-12-14T15:44:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d85ce830eef6c10d1e9617172dea4681f02b8424'/>
<id>urn:sha1:d85ce830eef6c10d1e9617172dea4681f02b8424</id>
<content type='text'>
One line in perf_pmu__parse_unit() is indented wrongly, leading to a
warning (=&gt; error) from gcc 6:

  util/pmu.c:156:3: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]

    sret = read(fd, alias-&gt;unit, UNIT_MAX_LEN);
    ^~~~

  util/pmu.c:153:2: note: ...this 'if' clause, but it is not
    if (fd == -1)
    ^~

Signed-off-by: Markus Trippelsdorf &lt;markus@trippelsdorf.de&gt;
Acked-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Fixes: 410136f5dd96 ("tools/perf/stat: Add event unit and scale support")
Link: http://lkml.kernel.org/r/20151214154440.GC1409@x4
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf pmu: fix alias-&gt;snapshot missing initialization bug</title>
<updated>2016-01-06T23:11:16Z</updated>
<author>
<name>Stephane Eranian</name>
</author>
<published>2016-01-06T18:50:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84530920de3c6ccb92c6661da784f6cdb66d3304'/>
<id>urn:sha1:84530920de3c6ccb92c6661da784f6cdb66d3304</id>
<content type='text'>
This patch fixes a bug in __perf_pmu__new_alias() whereby the
alias-&gt;snapshot field was not initialized to false. This led to random
alias-&gt;snapshot value for an alias and was breaking some measurements
such as:

  $ perf stat -a -e uncore_imc/data_reads/ -I 1000 sleep 100

Because the event ended up being treated as snapshot mode, when it is
not.

Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1452106201-13073-1-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf list: Honour 'event_glob' whem printing selectable PMUs</title>
<updated>2015-10-02T18:28:16Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2015-10-02T18:28:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa52ceabc2a3e70431a82bca2bc547a15eaf19df'/>
<id>urn:sha1:fa52ceabc2a3e70431a82bca2bc547a15eaf19df</id>
<content type='text'>
Some PMUs, like the 'intel_bts' one can be used as an event name, i.e.:

	$ perf record -e intel_bts:// usleep 1

Is a valid event name.

But the code printing such PMUs was not honouring the 'event_glob'
parameter, so the following line was always appearing:

  $ intel_bts//                                        [Kernel PMU event]

Fix it:

  $ [acme@felicio linux]$ perf list data

  List of pre-defined events (to be used in -e):

    uncore_imc/data_reads/                             [Kernel PMU event]
    uncore_imc/data_writes/                            [Kernel PMU event]

  $

Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-ajb71858n7q7ao77b8pyy74w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf list: Remove blank lines, headers when piping output</title>
<updated>2015-09-30T21:34:38Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2015-09-30T20:13:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dfc431cbdc3a3c0556f1cd462d724d107cc15a9e'/>
<id>urn:sha1:dfc431cbdc3a3c0556f1cd462d724d107cc15a9e</id>
<content type='text'>
So that one can, for instance, use it with wc -l:

  # perf list *:*write* | wc -l
  60

Or to look for the "bio" tracepoints, without 'perf list' headers:

  # perf list *:*bio* | head
    block:block_bio_backmerge                          [Tracepoint event]
    block:block_bio_bounce                             [Tracepoint event]
    block:block_bio_complete                           [Tracepoint event]
    block:block_bio_frontmerge                         [Tracepoint event]
    block:block_bio_queue                              [Tracepoint event]
    block:block_bio_remap                              [Tracepoint event]
  #

Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/n/tip-ts7sc0x8u4io4cifzkup4j44@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
