Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752304Ab3HUJ4r (ORCPT ); Wed, 21 Aug 2013 05:56:47 -0400 Received: from mail-ob0-f170.google.com ([209.85.214.170]:57298 "EHLO mail-ob0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751640Ab3HUJ4p (ORCPT ); Wed, 21 Aug 2013 05:56:45 -0400 MIME-Version: 1.0 In-Reply-To: References: <1376394957-31691-1-git-send-email-eranian@google.com> <1376394957-31691-2-git-send-email-eranian@google.com> <20130815102620.GN24092@twins.programming.kicks-ass.net> Date: Wed, 21 Aug 2013 11:56:44 +0200 Message-ID: Subject: Re: [PATCH v1 1/2] perf: add attr->mmap2 attribute to an event From: Stephane Eranian To: Peter Zijlstra Cc: LKML , "mingo@elte.hu" , "ak@linux.intel.com" , Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , David Ahern Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1735 Lines: 39 On Mon, Aug 19, 2013 at 11:14 AM, Stephane Eranian wrote: > On Thu, Aug 15, 2013 at 12:26 PM, Peter Zijlstra wrote: >> On Tue, Aug 13, 2013 at 01:55:56PM +0200, Stephane Eranian wrote: >> >>> @@ -638,6 +639,25 @@ enum perf_event_type { >>> */ >>> PERF_RECORD_SAMPLE = 9, >>> >>> + /* >>> + * The MMAP2 records are an augmented version of MMAP, they add >>> + * maj, min, ino numbers to be used to uniquely identify each mapping >>> + * >>> + * struct { >>> + * struct perf_event_header header; >>> + * >>> + * u32 pid, tid; >>> + * u64 addr; >>> + * u64 len; >>> + * u64 pgoff; >>> + * u32 maj; >>> + * u32 min; >>> + * u64 ino; >>> + * char filename[]; >> >> Did you forget the sample_id stuff? >> >> struct sample_id sample_id; >> > Ok, will add that and the i_generation field. Added that now, works fine. Except it won't be availa when synthesizing MMAP records from /proc/PID/maps because it is not displayed there. There is not much we can do about this. And of course, there is not i_generation for kernel level ELF images. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/