Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp187804imj; Thu, 14 Feb 2019 18:15:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IYkDRJso0/B23La7iYKX2/tq7qdyOwiighrIBRe+4tNq76NPQ/8VgSFiGfqgHvW1cRKtRGS X-Received: by 2002:a62:6204:: with SMTP id w4mr7408663pfb.5.1550196947788; Thu, 14 Feb 2019 18:15:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550196947; cv=none; d=google.com; s=arc-20160816; b=Hs3aSEzxlawAD9U4vbDk9ECnMueEEZW/FNzVbRcEErTzTtRvwODz/AX4FkKQIoFVZD 5y9IE42dOgy+nhFyceYsQr7ootOUOFMjsH0atn85g/GYsA6ewnGKtN77gpYWL6ODecQB OpHfbSt9nBzdPE1XqpuYoCbZRfzpiTq6Zp+tRu/egh63Y9743yraVr2OoJ0zbN801OXL ZbAwWLDxHVcdodne48QiXsrUhlXmLKtDGwRC/0ggMunvTwf75H7zCVeRujblWLxtD9EB qkwgKrd5+vUHtvv3681HD4GC6XATa501SzqH8qqRN49YwksR39yllKA+sv9MOf7OrGwq vTxg== 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=l6oJdwKsksPx604/yJJd+mEudQ0YUiZ9cBn0VKX9KVI=; b=B3zE+vvYEIDaPXEcLiZLOjetiNeTLBYXXBeXxKi7QskzE+kDwZnQN/jSOCp5RRUBn7 APPocCsz7597mGNxMwVSEm2I0BO8PxnrXiwgVl+a4C99aZnb6StErrpG6EtusCrFaXxX H9DZSQBYvIFdDJA4Xfqm4TenwB/xvU+8gIAjLnn/epRQ13CLP1s9aXgwOHMJjXv/lVjp 2Hvcp+BA7uQCzJ+SnOjVK+6wduW1zR1F2DN39WVHPb3OrZ0R5BrI4Z/t74rtU94dQ3nx A5XT97VJR5XFNEwFguRCSnR7GYvGuT6qeBf+jA3xAcxvW/YlZgkch2LVr7WClScLTC0d slwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HeoDAzz2; 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 u188si4161505pfb.232.2019.02.14.18.15.32; Thu, 14 Feb 2019 18:15:47 -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=HeoDAzz2; 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 S2440190AbfBNVbM (ORCPT + 99 others); Thu, 14 Feb 2019 16:31:12 -0500 Received: from mail-ua1-f51.google.com ([209.85.222.51]:41056 "EHLO mail-ua1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392871AbfBNVbM (ORCPT ); Thu, 14 Feb 2019 16:31:12 -0500 Received: by mail-ua1-f51.google.com with SMTP id z24so2527616ual.8 for ; Thu, 14 Feb 2019 13:31:11 -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=l6oJdwKsksPx604/yJJd+mEudQ0YUiZ9cBn0VKX9KVI=; b=HeoDAzz20Jg3BhMTwCELmwvtDztUVJysAZ0ZwaJJqJuWLeVPT9Y0l4YfrRuav+cLA3 qeFPKrPbeE3anBsBAdYEhCY3k5kWsNm208xeAwA9KhMCapnzUvq6krMSSBDcj0dkhzWx sHSWVHunQGFH46/osaeyv1Ziz9m104vlqOeYsjTTu6rgrO7bgWEmtZW039DQ2rpOQbNz Iw2cjVlB6Y1QUZv5A53N0ZStsA5vnAqugFv4u2seMrIthSRXiFfacRRhEsU+1VdY3ZvS jM4JzggKCyyjUVXeTroVmAgxlGlASocQmtut2mbiN12Kn7uheBu+HssaLvn6ohhW3g/E JyHg== 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=l6oJdwKsksPx604/yJJd+mEudQ0YUiZ9cBn0VKX9KVI=; b=AEHIjEptVRzTURLszfM8MRinvaZrf93pEagAEyOyATZNxK3dfjn1c9VH1+aUtYTokY hUDBg0AlmjZPL8fPWwDPH+SkmQ0COyc1fedqkYgZ/uXgKQeEgpL8wKoUSEm6IU2tcaOn ua5CX/dT1GM9FgYcmQNuIzA28ffk95qo3chrtJC/zFnazuQABw4VpcN6SkL0nmxoCfn2 UwCMhl0R/zvuDXtB42g9mtfhZFEbliUWiN1capJEDgGnFbMhi46ANBAJV6cbN9ELDaIC uSwgGx044pZswSBC6gJZ9t3KcgyeAqCkMfemr2kTA7nGS+fH73yNfjKaFo/bEKM5/5xp Yt+g== X-Gm-Message-State: AHQUAua4fUDBCMoyVjUDwFVLiJEfGKwxP2/P6MpDVbeRDLCpThcUOMzc 758tYOP3SuKw1HICFYnNlpiAOhoELK6AbAW7NzyKvA== X-Received: by 2002:ab0:5590:: with SMTP id v16mr3172848uaa.132.1550179870532; Thu, 14 Feb 2019 13:31:10 -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: <20190214135958.GB7074@kernel.org> From: Stephane Eranian Date: Thu, 14 Feb 2019 13:30:59 -0800 Message-ID: Subject: Re: [RFC/PATCH 00/14] perf record: Add support to store data in directory To: Arnaldo Carvalho de Melo Cc: 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 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. > 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