RE: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-07 Thread Liang, Kan
> On Tue, Dec 06, 2016 at 03:47:40PM +, Liang, Kan wrote: > > > > It doesn't record anything, it generates the output. And it doesn't > > > explain why that needs to be in pmu::del(), in general that's a horrible > thing to do. > > > > Yes, it only generate/log the output. Sorry for the

RE: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-07 Thread Liang, Kan
> On Tue, Dec 06, 2016 at 03:47:40PM +, Liang, Kan wrote: > > > > It doesn't record anything, it generates the output. And it doesn't > > > explain why that needs to be in pmu::del(), in general that's a horrible > thing to do. > > > > Yes, it only generate/log the output. Sorry for the

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Tue, Dec 06, 2016 at 03:47:40PM +, Liang, Kan wrote: > > It doesn't record anything, it generates the output. And it doesn't explain > > why that needs to be in pmu::del(), in general that's a horrible thing to > > do. > > Yes, it only generate/log the output. Sorry for the confused

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Tue, Dec 06, 2016 at 03:47:40PM +, Liang, Kan wrote: > > It doesn't record anything, it generates the output. And it doesn't explain > > why that needs to be in pmu::del(), in general that's a horrible thing to > > do. > > Yes, it only generate/log the output. Sorry for the confused

RE: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Liang, Kan
> On Tue, Dec 06, 2016 at 03:02:20PM +, Liang, Kan wrote: > > > > > > > On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > > > > From: Kan Liang > > > > > > > > On x86, NMI handler is the most important part which brings > > > > overhead for

RE: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Liang, Kan
> On Tue, Dec 06, 2016 at 03:02:20PM +, Liang, Kan wrote: > > > > > > > On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > > > > From: Kan Liang > > > > > > > > On x86, NMI handler is the most important part which brings > > > > overhead for sampling. Adding a pmu

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Tue, Dec 06, 2016 at 03:02:20PM +, Liang, Kan wrote: > > > > On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > > > From: Kan Liang > > > > > > On x86, NMI handler is the most important part which brings overhead > > > for sampling. Adding a pmu

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Tue, Dec 06, 2016 at 03:02:20PM +, Liang, Kan wrote: > > > > On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > > > From: Kan Liang > > > > > > On x86, NMI handler is the most important part which brings overhead > > > for sampling. Adding a pmu specific overhead type

RE: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Liang, Kan
> On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > > From: Kan Liang > > > > On x86, NMI handler is the most important part which brings overhead > > for sampling. Adding a pmu specific overhead type > > PERF_PMU_SAMPLE_OVERHEAD for it. > > > > For

RE: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Liang, Kan
> On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > > From: Kan Liang > > > > On x86, NMI handler is the most important part which brings overhead > > for sampling. Adding a pmu specific overhead type > > PERF_PMU_SAMPLE_OVERHEAD for it. > > > > For other architectures

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > +static void > +perf_calculate_nmi_overhead(u64 time) > +{ > + struct cpu_hw_events *cpuc = this_cpu_ptr(_hw_events); > + > + cpuc->nmi_overhead.nr++; > + cpuc->nmi_overhead.time += time; > +} This function doesn't

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > +static void > +perf_calculate_nmi_overhead(u64 time) > +{ > + struct cpu_hw_events *cpuc = this_cpu_ptr(_hw_events); > + > + cpuc->nmi_overhead.nr++; > + cpuc->nmi_overhead.time += time; > +} This function doesn't

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > From: Kan Liang > > On x86, NMI handler is the most important part which brings overhead > for sampling. Adding a pmu specific overhead type > PERF_PMU_SAMPLE_OVERHEAD for it. > > For other architectures

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Fri, Dec 02, 2016 at 04:19:11PM -0500, kan.li...@intel.com wrote: > From: Kan Liang > > On x86, NMI handler is the most important part which brings overhead > for sampling. Adding a pmu specific overhead type > PERF_PMU_SAMPLE_OVERHEAD for it. > > For other architectures which may don't have

[PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-02 Thread kan . liang
From: Kan Liang On x86, NMI handler is the most important part which brings overhead for sampling. Adding a pmu specific overhead type PERF_PMU_SAMPLE_OVERHEAD for it. For other architectures which may don't have NMI, the overhead type can be reused. Signed-off-by: Kan

[PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-02 Thread kan . liang
From: Kan Liang On x86, NMI handler is the most important part which brings overhead for sampling. Adding a pmu specific overhead type PERF_PMU_SAMPLE_OVERHEAD for it. For other architectures which may don't have NMI, the overhead type can be reused. Signed-off-by: Kan Liang ---