Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-18 Thread Jiri Olsa
On Thu, Jan 18, 2018 at 08:30:30AM -0500, Liang, Kan wrote: > > > On 1/18/2018 4:49 AM, Jiri Olsa wrote: > > On Tue, Jan 16, 2018 at 01:49:13PM -0500, Liang, Kan wrote: > > > > > > > > > On 1/11/2018 10:45 AM, Jiri Olsa wrote: > > > > On Thu, Jan 11, 2018 at 10:21:25AM -0500, Liang, Kan wrote:

Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-18 Thread Liang, Kan
On 1/18/2018 4:49 AM, Jiri Olsa wrote: On Tue, Jan 16, 2018 at 01:49:13PM -0500, Liang, Kan wrote: On 1/11/2018 10:45 AM, Jiri Olsa wrote: On Thu, Jan 11, 2018 at 10:21:25AM -0500, Liang, Kan wrote: SNIP hum, but the PEBS drain is specific just for PERF_X86_EVENT_AUTO_RELOAD events, rig

Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-18 Thread Jiri Olsa
On Tue, Jan 16, 2018 at 01:49:13PM -0500, Liang, Kan wrote: > > > On 1/11/2018 10:45 AM, Jiri Olsa wrote: > > On Thu, Jan 11, 2018 at 10:21:25AM -0500, Liang, Kan wrote: > > > > SNIP > > > > > > > > > > hum, but the PEBS drain is specific just for > > > > PERF_X86_EVENT_AUTO_RELOAD events, rig

Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-16 Thread Liang, Kan
On 1/11/2018 10:45 AM, Jiri Olsa wrote: On Thu, Jan 11, 2018 at 10:21:25AM -0500, Liang, Kan wrote: SNIP hum, but the PEBS drain is specific just for PERF_X86_EVENT_AUTO_RELOAD events, right? Accurately, PEBS drain is specific for PERF_X86_EVENT_FREERUNNING here. PERF_X86_EVENT_FREERUNNIN

Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-11 Thread Jiri Olsa
On Thu, Jan 11, 2018 at 10:21:25AM -0500, Liang, Kan wrote: SNIP > > > > hum, but the PEBS drain is specific just for > > PERF_X86_EVENT_AUTO_RELOAD events, right? > > Accurately, PEBS drain is specific for PERF_X86_EVENT_FREERUNNING here. > PERF_X86_EVENT_FREERUNNING event must be _AUTO_RELOAD

Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-11 Thread Liang, Kan
On 1/11/2018 6:10 AM, Jiri Olsa wrote: On Wed, Jan 10, 2018 at 09:31:56AM -0500, Liang, Kan wrote: On 1/10/2018 5:39 AM, Jiri Olsa wrote: On Mon, Jan 08, 2018 at 07:15:15AM -0800, kan.li...@intel.com wrote: From: Kan Liang When the PEBS interrupt threshold is larger than one, there is no

Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-11 Thread Jiri Olsa
On Wed, Jan 10, 2018 at 09:31:56AM -0500, Liang, Kan wrote: > > > On 1/10/2018 5:39 AM, Jiri Olsa wrote: > > On Mon, Jan 08, 2018 at 07:15:15AM -0800, kan.li...@intel.com wrote: > > > From: Kan Liang > > > > > > When the PEBS interrupt threshold is larger than one, there is no way to > > > get

Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-10 Thread Liang, Kan
On 1/10/2018 5:39 AM, Jiri Olsa wrote: On Mon, Jan 08, 2018 at 07:15:15AM -0800, kan.li...@intel.com wrote: From: Kan Liang When the PEBS interrupt threshold is larger than one, there is no way to get exact auto-reload times and value needed for event update unless flush the PEBS buffer. Dr

Re: [RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-10 Thread Jiri Olsa
On Mon, Jan 08, 2018 at 07:15:15AM -0800, kan.li...@intel.com wrote: > From: Kan Liang > > When the PEBS interrupt threshold is larger than one, there is no way to > get exact auto-reload times and value needed for event update unless > flush the PEBS buffer. > > Drain the PEBS buffer in event r

[RESEND PATCH V2 3/4] perf/x86/intel: drain PEBS buffer in event read

2018-01-08 Thread kan . liang
From: Kan Liang When the PEBS interrupt threshold is larger than one, there is no way to get exact auto-reload times and value needed for event update unless flush the PEBS buffer. Drain the PEBS buffer in event read when large PEBS is enabled. For the threshold is one, even auto-reload is enab