Re: [PATCH V4 04/23] perf/x86/intel: Support adaptive PEBSv4

2019-03-27 Thread Andi Kleen
> We need to call perf_event_overflow() for the last record of each event. > It's hard to detect which record is the last record of the event with one > pass walking. > > Also, I'm not sure how much we can save with one pass walking. The > optimization should only benefit large PEBS. The total

Re: [PATCH V4 04/23] perf/x86/intel: Support adaptive PEBSv4

2019-03-27 Thread Liang, Kan
On 3/26/2019 6:24 PM, Andi Kleen wrote: + for (at = base; at < top; at += cpuc->pebs_record_size) { + u64 pebs_status; + + pebs_status = get_pebs_status(at) & cpuc->pebs_enabled; + pebs_status &= mask; + + for_each_set_bit(bit,

Re: [PATCH V4 04/23] perf/x86/intel: Support adaptive PEBSv4

2019-03-26 Thread Andi Kleen
> + for (at = base; at < top; at += cpuc->pebs_record_size) { > + u64 pebs_status; > + > + pebs_status = get_pebs_status(at) & cpuc->pebs_enabled; > + pebs_status &= mask; > + > + for_each_set_bit(bit, (unsigned long *)_status, size) > +

[PATCH V4 04/23] perf/x86/intel: Support adaptive PEBSv4

2019-03-26 Thread kan . liang
From: Kan Liang Adaptive PEBS is a new way to report PEBS sampling information. Instead of a fixed size record for all PEBS events it allows to configure the PEBS record to only include the information needed. Events can then opt in to use such an extended record, or stay with a basic record