From mboxrd@z Thu Jan 1 00:00:00 1970 From: sahil aggarwal Subject: Re: perf smapling Date: Tue, 31 Mar 2015 20:52:17 +0530 Message-ID: References: <20150331111813.GA1152@ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-ig0-f180.google.com ([209.85.213.180]:35803 "EHLO mail-ig0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752719AbbCaPWS (ORCPT ); Tue, 31 Mar 2015 11:22:18 -0400 Received: by igcau2 with SMTP id au2so21525203igc.0 for ; Tue, 31 Mar 2015 08:22:17 -0700 (PDT) In-Reply-To: Sender: linux-perf-users-owner@vger.kernel.org List-ID: To: Elazar Leibovich Cc: linux-perf-users@vger.kernel.org Actually i need most of the sampling around PERF_TYPE_TRACEPOINT, so if i enable tracepoint "syscalls/sys_enter_open/" what will be the "type" field in perf_event_header.? And, the the record struct will be same as given in "syscalls/sys_enter_open/format" .? Thanks On 31 March 2015 at 20:40, sahil aggarwal wrote: > Yeah that was clear enough. > Thanks a lot. Your code is of great help. > > Regards > Sahil > > On 31 March 2015 at 19:45, Elazar Leibovich > wrote: >> I wanted to ensure the user always see contiguous array of data from >> the ring buffer. >> >> The last piece of data, say "abcde" could wrap around in the ring >> buffer and appear like: >> >> [de... ...abc] >> >> I wanted the user to see a contigious array of the form [abcde]. >> >> So in the case I'm having input that wrap around, I'll simply copy it >> to the first buffer >> >> [wrap_buffer][de.. ...abc] >> would become >> [ abc][de... ...abc] >> >> And then I'll the user pointer to the leftmost "a", and he'll see >> "abcde" without knowing he's handling a ring buffer. >> >> Let me know if I was clear enough. >> >> On Tue, Mar 31, 2015 at 2:18 PM, sahil aggarwal wrote: >>> >>> Hi Elazar >>> >>> Can you help me understand why you have used >>> mmap_pages->wrap_base.? And, instead of allocating >>> (2^n)+1 pages you allocate (2^n)+2 pages, why so.? >>> wrap_base points to (2^n)+2 pages and base points to >>> (2^n)+1 pages, what is use of wrap_base.? I tried reading >>> perf source too, there it seems they use (2^n)+1 pages only. >>> >>> >>> Thanks >>> Regards