Re: [PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4

2019-03-20 Thread Peter Zijlstra
On Tue, Mar 19, 2019 at 02:38:24PM -0700, Andi Kleen wrote: > > How much work would intel_pmu_drain_pebs_icl() be? > > > > I'm thinking that might not be terrible. > > I had it in an early version of the code, but it ended up with a lot > of code duplication. I'm thinking that if you remove

Re: [PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4

2019-03-19 Thread Andi Kleen
> How much work would intel_pmu_drain_pebs_icl() be? > > I'm thinking that might not be terrible. I had it in an early version of the code, but it ended up with a lot of code duplication. -Andi

Re: [PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4

2019-03-19 Thread Liang, Kan
On 3/19/2019 10:47 AM, Peter Zijlstra wrote: @@ -933,6 +998,19 @@ pebs_update_state(bool needed_cb, struct cpu_hw_events *cpuc, struct pmu *pmu) update = true; } + if (x86_pmu.intel_cap.pebs_baseline && add) { + u64 pebs_data_cfg; + +

Re: [PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4

2019-03-19 Thread Peter Zijlstra
On Tue, Mar 19, 2019 at 09:03:37AM -0700, Andi Kleen wrote: > On Tue, Mar 19, 2019 at 03:47:48PM +0100, Peter Zijlstra wrote: > > On Mon, Mar 18, 2019 at 02:41:25PM -0700, kan.li...@linux.intel.com wrote: > > > From: Kan Liang > > > > > > Adaptive PEBS is a new way to report PEBS sampling

Re: [PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4

2019-03-19 Thread Andi Kleen
On Tue, Mar 19, 2019 at 03:47:48PM +0100, Peter Zijlstra wrote: > On Mon, Mar 18, 2019 at 02:41:25PM -0700, kan.li...@linux.intel.com wrote: > > 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

Re: [PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4

2019-03-19 Thread Peter Zijlstra
On Mon, Mar 18, 2019 at 02:41:25PM -0700, kan.li...@linux.intel.com wrote: > 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.

[PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4

2019-03-18 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