Skip to content

Commit a98d45d

Browse files
author
Fox Snowpatch
committed
1 parent 182544a commit a98d45d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

arch/powerpc/perf/core-book3s.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,6 +2242,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
22422242
const u64 last_period = event->hw.last_period;
22432243
s64 prev, delta, left;
22442244
int record = 0;
2245+
int mark_event = regs->dsisr & MMCRA_SAMPLE_ENABLE;
22452246

22462247
if (event->hw.state & PERF_HES_STOPPED) {
22472248
write_pmc(event->hw.idx, 0);
@@ -2304,9 +2305,9 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
23042305
* In ISA v3.0 and before values "0" and "7" are considered reserved.
23052306
* In ISA v3.1, value "7" has been used to indicate "larx/stcx".
23062307
* Drop the sample if "type" has reserved values for this field with a
2307-
* ISA version check.
2308+
* ISA version check for marked events.
23082309
*/
2309-
if (event->attr.sample_type & PERF_SAMPLE_DATA_SRC &&
2310+
if (mark_event && event->attr.sample_type & PERF_SAMPLE_DATA_SRC &&
23102311
ppmu->get_mem_data_src) {
23112312
val = (regs->dar & SIER_TYPE_MASK) >> SIER_TYPE_SHIFT;
23122313
if (val == 0 || (val == 7 && !cpu_has_feature(CPU_FTR_ARCH_31))) {

0 commit comments

Comments
 (0)