Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp188990imj; Thu, 14 Feb 2019 18:17:24 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibw+uqG3e/bAvU9eVijnJVWNbW4y7gBK+W+jpKWc2ryAOdqYHoDczScWeXLVuQEFh1Yae6h X-Received: by 2002:a63:e451:: with SMTP id i17mr6816641pgk.413.1550197044483; Thu, 14 Feb 2019 18:17:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550197044; cv=none; d=google.com; s=arc-20160816; b=caB17PiZqg5vONVtnLrHTni4GpzkwXWwGraQ7MrEFYN04VSG+TzhoNFStLaJZ5hhyb yfVlRikOq4OmOJWbALoCe275jPOybQqX6eCwvG1D3y/VxbNIINOkQdPr8GpV0fsHj6ep XW/agcC5lgo7+W4HUkOBh4+Mp6bBVIZYmzWz/GxZ4NFfxtLu4EML2ziV4sizH6t/gyIq teYcGM3dzH4fp9GMEj/jQsdN4hiGDnfivwLPUgTXBJKNLU3VqHbWWopq9l1BW3E45Y8T 04rzN1NtaeRTzRf09dzbzmScz82eUqvTzsMfCHsbFZTX1R58RsEONeaYYBAH8/+SOh2u p+Sg== 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=2AgvUemPbGDs5wcdYTHUoim6pmloKfWLdvKfw90+HFM=; b=0RzFHKVbMxLEw3nLRDzTZovs1onz69LSoZRluFLNwuOQCzKLpfX0NuWpO+FfivrdDu IAcLAuEyLh2csXeki4PjNOzfed6ttbvQDySRzkRXcTjf5GO04sghJ7CrJgP6CvkW5pyU FTXsaL8AagkRUOQYRtSA2JAuKqXf8x+wThMaj7721U31mDmXSybYFpIkefWq+sd5vfLH Oz06HoZECnG2INriTl/UdHVH+d0G6GcWa/sxSQ4TaaYSI3AoR94ACkGZLLCT50To+hCa FMCBF7c2xCmLXw1WqfSo9QDQ3k4OLoRUxXzX+oZS+8zSS3kxAPeIOhkK5ePUZ9qyrZ9e Emdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="pg/70112"; 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 b26si4100015pgl.539.2019.02.14.18.17.08; Thu, 14 Feb 2019 18:17:24 -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="pg/70112"; 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 S2406166AbfBNVjn (ORCPT + 99 others); Thu, 14 Feb 2019 16:39:43 -0500 Received: from mail-vs1-f47.google.com ([209.85.217.47]:42410 "EHLO mail-vs1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440396AbfBNVjm (ORCPT ); Thu, 14 Feb 2019 16:39:42 -0500 Received: by mail-vs1-f47.google.com with SMTP id b20so4583765vsl.9 for ; Thu, 14 Feb 2019 13:39:41 -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=2AgvUemPbGDs5wcdYTHUoim6pmloKfWLdvKfw90+HFM=; b=pg/70112KaVZ7aW2f05nvCy+IFkGsXmwwl2+e8z2VxuFtro23Z2s5z8HQuZo0GuVNQ jXHIQ2gBqpQXzxTfm7rY6T/XlyQqvG25pL2gxgyRBoObtswwKy7Tay7fsHIDvSyF56oe etmvLoIiLnv9c/S9TpXUhfR8a7wr+czDjov3qYn/JRf+AQDU+xOLIpT1WQ06DKmYiEr6 rBg9mxy0gOfyQNEJL1eC/CCG5CDTfuS8jxd6ePxppsICPQ+66HTScUVeb0WXxe2k9OL+ cufV9WOj5rh1xpY5swbJyV7aHEm2jwsbwgAYNVvNUwu1uLVK+QWVWa6VlO8Lt6c/U4uf bXcA== 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=2AgvUemPbGDs5wcdYTHUoim6pmloKfWLdvKfw90+HFM=; b=Fabx4qrWJR8A6Do3N0ngpXRYu5mAgi1YqpFNlUhA+DoB9VTj4C1mix01fbXfsi0cXH CejlFXWIv9nug674kx4JCpiQsc491RnpA+EVOtMie9J1VC9kqh7A5mLGap/RBouo2zQe SJdVhj3IwFsBb95eAhtbpBfREjOjRHfdVALG+TPB4nFPSyt1vhDgLLgyGvAjhP00S8tb mR/TdTY0Beoy+bNRwGZy4AxhCeVBIn9LqT99yBn0IMBJsCiAituwr/cxwJPvV1c7+KOO xVzwNyul/I/QCSp1rKF/NJe65y9lIW/A5/hnFbd1w88jnm70GjmJxU/oKwG9PWy/9NRu SrZQ== X-Gm-Message-State: AHQUAuZHDUX8cvZOg4/vNZC2/1lUIGrSueuLybcwNbD3AwUZOs5M1YHx 16IbZBbUzMslal3ocqzdYS9O7HGzQv29W9tsgUxRqQ== X-Received: by 2002:a67:744:: with SMTP id 65mr3226580vsh.101.1550180380561; Thu, 14 Feb 2019 13:39:40 -0800 (PST) MIME-Version: 1.0 References: <20190205133727.GF4794@krava> <20190211101957.GB14253@krava> <20190211185306.GD5046@krava> <20190211193202.GG3269@kernel.org> <20190211201831.GE5046@krava> <20190214113450.GC26714@krava> <20190214125759.GS3269@kernel.org> <20190214132638.GB13095@krava> <20190214135958.GB7074@kernel.org> In-Reply-To: From: Stephane Eranian Date: Thu, 14 Feb 2019 13:39:29 -0800 Message-ID: Subject: Re: [RFC/PATCH 00/14] perf record: Add support to store data in directory To: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo , Jiri Olsa , 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 Thu, Feb 14, 2019 at 1:35 PM Arnaldo Carvalho de Melo wrote: > > On Thu, Feb 14, 2019, 6:31 PM Stephane Eranian > >> On Thu, Feb 14, 2019 at 6:00 AM Arnaldo Carvalho de Melo >> wrote: >> > >> > Em Thu, Feb 14, 2019 at 02:26:38PM +0100, Jiri Olsa escreveu: >> > > On Thu, Feb 14, 2019 at 09:57:59AM -0300, Arnaldo Carvalho de Melo wrote: >> > > > But with the build id in the MMAPs we wouldn't need to scan anything at >> > > > 'perf record' time, just at 'perf archive' time, where we would scan >> > > > everything, and as soon as we find a hit, we add that DSO to the list of >> > > > things we need to put in the tarball. >> > >> > > ok.. it might little change the expected behavour in that you will not >> > > have .debug cache populated until you run perf archive.. some profile >> > > data might stop report after you reinstall the binary.. >> > >> Today perf record does collect the buildids once monitor is completed, >> it does one >> pass over the perf.data file looking for MMAP records, or at least in >> the version I am >> more familiar with. > > > It does look for the MMAP records, how else would it find the DSO pathnames? > I was not talking about the synthesize_mmap() code. I was talking about process_buildids(). > > - Arnaldo > > Sent from smartphone >> >> >> > Well, nothing prevents us from continuing to, in 'perf record', go thru >> > the perf.data just collected to populate the .debug cache, its just that >> > we would do it just for that, for populating the cache, we wouldn't >> > _have_ to do that for collecting the buildids. >> >> Sure, for compatibility reasons. >> In pipe mode, this would also avoid the need for perf inject -b -i -, >> which is a win. >> >> perf archive is useful if you do not have a way to locate the binary using only >> the buildid on the analysis machine. >> > >> > > on the other hand '.debug' cache would stop growing uncontrolably.. >> > > so I think I'd be ok with this >> > >> I agree! >> >> > That is another problem, and one that has to be solved in a way similar >> > to ccache's --max-size option. >> > >> > The .debug cache is useful for various workflows, but may get in the way >> > for some others, which is why we have ways to disable it. >> > >> Correct. >> >> > For instance, when working on some project it is handy to have copies of >> > binaries saved so that older perf.data files can find a file that was >> > rewritten by the compiler when doing changes in it, etc. >> > >> > With the .debug cache and if using -g, we can get the older copy of the >> > binary _and_ its sources, annotation for older versions continue to >> > work, etc. >> > >> > - Arnaldo