<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/perf_event.c, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-03-23T19:50:36Z</updated>
<entry>
<title>perf, powerpc: Handle events that raise an exception without overflowing</title>
<updated>2011-03-23T19:50:36Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2011-03-09T03:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d36135722758275db3a6a1f3ba4b26d2c1cd4946'/>
<id>urn:sha1:d36135722758275db3a6a1f3ba4b26d2c1cd4946</id>
<content type='text'>
commit 0837e3242c73566fc1c0196b4ec61779c25ffc93 upstream.

Events on POWER7 can roll back if a speculative event doesn't
eventually complete. Unfortunately in some rare cases they will
raise a performance monitor exception. We need to catch this to
ensure we reset the PMC. In all cases the PMC will be 256 or less
cycles from overflow.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;20110309143842.6c22845e@kryten&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>perf, powerpc: Fix power_pmu_event_init to not use event-&gt;ctx</title>
<updated>2010-10-19T07:18:34Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2010-10-19T05:55:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57fa7214330be2e292ddb1402834ff0b221ef29a'/>
<id>urn:sha1:57fa7214330be2e292ddb1402834ff0b221ef29a</id>
<content type='text'>
Commit c3f00c70 ("perf: Separate find_get_context() from event
initialization") changed the generic perf_event code to call
perf_event_alloc, which calls the arch-specific event_init code,
before looking up the context for the new event.  Unfortunately,
power_pmu_event_init uses event-&gt;ctx-&gt;task to see whether the
new event is a per-task event or a system-wide event, and thus
crashes since event-&gt;ctx is NULL at the point where
power_pmu_event_init gets called.

(The reason it needs to know whether it is a per-task event is
because there are some hardware events on Power systems which
only count when the processor is not idle, and there are some
fixed-function counters which count such events.  For example,
the "run cycles" event counts cycles when the processor is not
idle.  If the user asks to count cycles, we can use "run cycles"
if this is a per-task event, since the processor is running when
the task is running, by definition.  We can't use "run cycles"
if the user asks for "cycles" on a system-wide counter.)

Fortunately the information we need is in the
event-&gt;attach_state field, so we just use that instead.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;20101019055535.GA10398@drongo&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Reported-by: Alexey Kardashevskiy &lt;aik@au1.ibm.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf: Rework the PMU methods</title>
<updated>2010-09-09T18:46:30Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2010-06-16T12:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4eaf7f14675cb512d69f0c928055e73d0c6d252'/>
<id>urn:sha1:a4eaf7f14675cb512d69f0c928055e73d0c6d252</id>
<content type='text'>
Replace pmu::{enable,disable,start,stop,unthrottle} with
pmu::{add,del,start,stop}, all of which take a flags argument.

The new interface extends the capability to stop a counter while
keeping it scheduled on the PMU. We replace the throttled state with
the generic stopped state.

This also allows us to efficiently stop/start counters over certain
code paths (like IRQ handlers).

It also allows scheduling a counter without it starting, allowing for
a generic frozen state (useful for rotating stopped counters).

The stopped state is implemented in two different ways, depending on
how the architecture implemented the throttled state:

 1) We disable the counter:
    a) the pmu has per-counter enable bits, we flip that
    b) we program a NOP event, preserving the counter state

 2) We store the counter state and ignore all read/overflow events

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: paulus &lt;paulus@samba.org&gt;
Cc: stephane eranian &lt;eranian@googlemail.com&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Cc: Lin Ming &lt;ming.m.lin@intel.com&gt;
Cc: Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
Cc: Deng-Cheng Zhu &lt;dengcheng.zhu@gmail.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Michael Cree &lt;mcree@orcon.net.nz&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf: Per PMU disable</title>
<updated>2010-09-09T18:46:29Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2010-06-14T06:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33696fc0d141bbbcb12f75b69608ea83282e3117'/>
<id>urn:sha1:33696fc0d141bbbcb12f75b69608ea83282e3117</id>
<content type='text'>
Changes perf_disable() into perf_pmu_disable().

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: paulus &lt;paulus@samba.org&gt;
Cc: stephane eranian &lt;eranian@googlemail.com&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Cc: Lin Ming &lt;ming.m.lin@intel.com&gt;
Cc: Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
Cc: Deng-Cheng Zhu &lt;dengcheng.zhu@gmail.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Michael Cree &lt;mcree@orcon.net.nz&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf: Reduce perf_disable() usage</title>
<updated>2010-09-09T18:46:29Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2010-06-11T15:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24cd7f54a0d47e1d5b3de29e2456bfbd2d8447b7'/>
<id>urn:sha1:24cd7f54a0d47e1d5b3de29e2456bfbd2d8447b7</id>
<content type='text'>
Since the current perf_disable() usage is only an optimization,
remove it for now. This eases the removal of the __weak
hw_perf_enable() interface.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: paulus &lt;paulus@samba.org&gt;
Cc: stephane eranian &lt;eranian@googlemail.com&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Cc: Lin Ming &lt;ming.m.lin@intel.com&gt;
Cc: Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
Cc: Deng-Cheng Zhu &lt;dengcheng.zhu@gmail.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Michael Cree &lt;mcree@orcon.net.nz&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf: Register PMU implementations</title>
<updated>2010-09-09T18:46:28Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2010-06-11T11:35:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0a873ebbf87bf38bf70b5e39a7cadc96099fa13'/>
<id>urn:sha1:b0a873ebbf87bf38bf70b5e39a7cadc96099fa13</id>
<content type='text'>
Simple registration interface for struct pmu, this provides the
infrastructure for removing all the weak functions.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: paulus &lt;paulus@samba.org&gt;
Cc: stephane eranian &lt;eranian@googlemail.com&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Cc: Lin Ming &lt;ming.m.lin@intel.com&gt;
Cc: Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
Cc: Deng-Cheng Zhu &lt;dengcheng.zhu@gmail.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Michael Cree &lt;mcree@orcon.net.nz&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf: Deconstify struct pmu</title>
<updated>2010-09-09T18:46:27Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2010-06-11T11:35:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51b0fe39549a04858001922919ab355dee9bdfcf'/>
<id>urn:sha1:51b0fe39549a04858001922919ab355dee9bdfcf</id>
<content type='text'>
sed -ie 's/const struct pmu\&gt;/struct pmu/g' `git grep -l "const struct pmu\&gt;"`

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: paulus &lt;paulus@samba.org&gt;
Cc: stephane eranian &lt;eranian@googlemail.com&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Cc: Lin Ming &lt;ming.m.lin@intel.com&gt;
Cc: Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
Cc: Deng-Cheng Zhu &lt;dengcheng.zhu@gmail.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Michael Cree &lt;mcree@orcon.net.nz&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linus' into perf/core</title>
<updated>2010-07-21T19:43:06Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2010-07-21T19:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9dcdbf7a33d9018ac5d45debcf261be648bdd56a'/>
<id>urn:sha1:9dcdbf7a33d9018ac5d45debcf261be648bdd56a</id>
<content type='text'>
Merge reason: Pick up the latest perf fixes.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>powerpc/perf_event: Fix for power_pmu_disable()</title>
<updated>2010-07-08T08:11:37Z</updated>
<author>
<name>Matt Evans</name>
</author>
<published>2010-07-05T17:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=219a92a4c40db2fac604f63bce9a5a3fe1967879'/>
<id>urn:sha1:219a92a4c40db2fac604f63bce9a5a3fe1967879</id>
<content type='text'>
When power_pmu_disable() removes the given event from a particular index into
cpuhw-&gt;event[], it shuffles down higher event[] entries.  But, this array is
paired with cpuhw-&gt;events[] and cpuhw-&gt;flags[] so should shuffle them
similarly.

If these arrays get out of sync, code such as power_check_constraints() will
fail.  This caused a bug where events were temporarily disabled and then failed
to be re-enabled; subsequent code tried to write_pmc() with its (disabled) idx
of 0, causing a message "oops trying to write PMC0".  This triggers this bug on
POWER7, running a miss-heavy test:

  perf record -e L1-dcache-load-misses -e L1-dcache-store-misses ./misstest

Signed-off-by: Matt Evans &lt;matt@ozlabs.org&gt;
Acked-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>perf: Convert perf_event to local_t</title>
<updated>2010-06-09T09:12:37Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2010-05-21T12:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e78505958cf123048fb48cb56b79cebb8edd15fb'/>
<id>urn:sha1:e78505958cf123048fb48cb56b79cebb8edd15fb</id>
<content type='text'>
Since now all modification to event-&gt;count (and -&gt;prev_count
and -&gt;period_left) are local to a cpu, change then to local64_t so we
avoid the LOCK'ed ops.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
