Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3039743imj; Mon, 11 Feb 2019 12:46:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IaH7YLHcp1WCrrypKgQ9UdBfpX9oim1fjaRS2u3YTVRNvIMPVSOm8fwi93XrT69Qz/aF+Mw X-Received: by 2002:a62:4c5:: with SMTP id 188mr157938pfe.130.1549917970827; Mon, 11 Feb 2019 12:46:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549917970; cv=none; d=google.com; s=arc-20160816; b=sayAx2t6ocyjWZwh6ftmWvRhSA68HaufrTSMsQLtycqxmxMJyxcDxC3onzrM1itVHr DOnELxenmAHcSrxa79rOQKLz7EB5Ams+BVgX4iBWMF+MTcqRN6pKQRhnomxuwfHWEeMN S7WFr8DLOeSxjQjgWsz9joxOPnmjWXGNYcURNhyH3ksUvy6w3IbA5c1WP9/Io3qDfXIl Vh1KAoDlveFKqMHSkyHIfG+E5QwZHImwNObwUQWmWllrUkEaIw3/sRtEA8i3Yyksq2Lh cOjHX+0n0VB8MOFzxGKcEtpy0Ch0tyMiAP6Ub99FHW/BeZ06ubj3oXPd08iuR6ZsKmAF t0XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3cMNEJp8FIVlNz588OWfBZxhVehQjYTqZ3vLLL4zPk8=; b=aHFMNSBJ3pdbd4xBHiGrxuw+usiahp87lsCoTIqZHk/OzGd158zg8Dn71mypy90Ivi rE6cknKY+ChH8dkw/EW7TuDIVg041O6vIC/+A1sV9oo8lHGmPTUcB2Uba2cdAEgPmEv/ 8SfoNXR8zXLcwaYOtN2YC4gVylOTFboMGSwFHp4Fk22CN9LzvU9j8hD5awnj5CBEuEN7 2/C7WkkzHhPLE8nwoZQMdQSYT0YDb1+va95dLr8EL6OVSVvJn4yKUXy2KkjQl8Bt41Yx NKWITe6wIKta3Hfy89tUrrOtPSRYU2WCd+/29uYOW1Qv3rgRj1OrjU/yXZLgHmRX/0J6 ifBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jtYFEZ3N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si11066957plt.228.2019.02.11.12.45.54; Mon, 11 Feb 2019 12:46:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jtYFEZ3N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727576AbfBKUnj (ORCPT + 99 others); Mon, 11 Feb 2019 15:43:39 -0500 Received: from mail-vk1-f193.google.com ([209.85.221.193]:37657 "EHLO mail-vk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726881AbfBKUne (ORCPT ); Mon, 11 Feb 2019 15:43:34 -0500 Received: by mail-vk1-f193.google.com with SMTP id 197so73124vkf.4 for ; Mon, 11 Feb 2019 12:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3cMNEJp8FIVlNz588OWfBZxhVehQjYTqZ3vLLL4zPk8=; b=jtYFEZ3NBXuWT5F2o1RL8G8oPhHMkT7Zi2FFAcUcAe2GfP4Zko/3kbba9wC8Ixg1Ud mG4wN+YrrNjAvT38Yba2d2aq54AIww1heqecXCOh8sZvZ5TSG5DxLMqTYV4lWnFW8iSK vy3V2CgTC+r3k74HXBh3cm4M3JG0WNPpfGMWVcFo0fbw8sflInhttctu6aCNE89tmQqa +R9IJxyw9Htsu78cDsO0dNLTwMcOzBambuayd0xm72Xu8NWwybgGJSmgVRQkthzoDsAx bYSPFcmegFgIz24epPzIV7bLKym5H0s9lCqgmpDeLpJEAW42uXN+Vy3CuPDSu3nIrTEB LikA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3cMNEJp8FIVlNz588OWfBZxhVehQjYTqZ3vLLL4zPk8=; b=hiSEUoh/+W0oAbRLVeoNLc8Pcl4JOyoM0/7Axd5yy8oaHkhJPSJiWsrshOF486F65z QV0LtdqBrvWpPkgrFDBJTZsJJMyIBZdnTqFMSh3OxDKoZmckdcELBrA8m27+4YJoZUNF UxQX5qjTVhXmrtSBqRlPFzjVvbzFz0mL+EC7Uqw8MmFA7ZaRL+zWJOmt5HjM8YfuF1o9 3MpJ1ENhkAHkwVPn6tSBO4cWV+jrkw0wZVCMJBBJfq+VBjymzZ26Ac2dLc4zmfPoQkg4 fhRut3WR8fZQ1ywuNVMPf9cHbZXPZmYKPad92keUdDzacGKpU+A5gyy+E+RrENkn6uVH sjuA== X-Gm-Message-State: AHQUAuag1PeJritLTiGeAOawRLtqDgcYmHn/ROXipruE0EAU7t8bug+J uEKzlgoFKnmzRAoVJf5BlLBB1TcowB2oAoDWmJsIYQ== X-Received: by 2002:a1f:a147:: with SMTP id k68mr54329vke.1.1549917813273; Mon, 11 Feb 2019 12:43:33 -0800 (PST) MIME-Version: 1.0 References: <20190204192721.GI5593@kernel.org> <20190204202818.GC4794@krava> <20190205133727.GF4794@krava> <20190211101957.GB14253@krava> <20190211185306.GD5046@krava> <20190211193202.GG3269@kernel.org> <20190211201831.GE5046@krava> In-Reply-To: <20190211201831.GE5046@krava> From: Stephane Eranian Date: Mon, 11 Feb 2019 12:43:22 -0800 Message-ID: Subject: Re: [RFC/PATCH 00/14] perf record: Add support to store data in directory To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Alexey Budankov , Jiri Olsa , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Adrian Hunter , Andi Kleen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2019 at 12:18 PM Jiri Olsa wrote: > > On Mon, Feb 11, 2019 at 04:32:02PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Mon, Feb 11, 2019 at 07:53:06PM +0100, Jiri Olsa escreveu: > > > On Mon, Feb 11, 2019 at 10:34:16AM -0800, Stephane Eranian wrote: > > > > On Mon, Feb 11, 2019 at 2:20 AM Jiri Olsa wrote: > > > > > On Tue, Feb 05, 2019 at 02:37:27PM +0100, Jiri Olsa wrote: > > > > > I think all could be added and worked around with exception > > > > > of BUILD_ID, which we store at the end (after processing > > > > > all data) and we need it early in the report phase > > > > > > Buildids are injected after the fact via perf inject when in pipe mode. > > > > > > > maybe it's time to re-think that buildid -> mmap event > > > > > association again, because it's pain in current implementation > > > > > as well > > > > > > Sure, but what do you propose? > > > > > this: > > > > > > > > looks like bpf code is actualy getting build ids and storing > > > > > it for the callchains in kernel.. we can check if we can do > > > > > something similar for mmap events > > > > kernel/bpf/stackmap.c > > > > /* Parse build ID from 64-bit ELF */ > > static int stack_map_get_build_id_64(void *page_addr, > > unsigned char *build_id) > > > > yeah, wasn't aware of that, good thing doing backports, huh? :-) > > > > So do you thing about having a PERF_SAMPLE_BUILDID in sample_type and go > > and stash that thing in PERF_RECORD_MMAP2? > That would be special processing. Normally the sample_type go into each RECORD_SAMPLE. So I would not recommend this approach. > I thought having new MMAP3 event version with buildid field in it > if available and/or enabled by bit in perf_event_attr > I think MMAP3 is a cleaner approach, though it adds yet another MMAP event. > jirka