Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4364974ima; Mon, 4 Feb 2019 15:18:20 -0800 (PST) X-Google-Smtp-Source: AHgI3Iak/zaIvIU42ZcrCLm0ZqVh8aGLYh0XT4e29lwV4A8jm4eT8Y+sKoabMPIuzabCyTiRf6PL X-Received: by 2002:a65:60c5:: with SMTP id r5mr1712235pgv.427.1549322300534; Mon, 04 Feb 2019 15:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549322300; cv=none; d=google.com; s=arc-20160816; b=uh2oWMpX/WepPn8y7kTYVquLAZMMkez2tpfb4mG0s4z5B+NPgjJjWlUKnkTGOgNvmI nLlVH8IoUDIdRiE0LAr9lg/Z7hZInjimWtIRv2pyQuvE/nkbHtoIAqZPuP3z2ITSX36M B4ei3ciCorJNwyadkmt2vkP2BMzu/762mWVYXOmHeu2UWNahIVGDnnoD7560QTreVlNZ Ut62beTh/V3mHlLQepXprJSxa9rAIdqimvKrC3pWIfUvWEYQzKA0hHZ/gMhpauU9X1Ab DXW0EBlYklI9vfZBXzbS9BurSnEda8jiDXjhxJoUbH/nwu3AG20tymtuILrAyZOIAqco DE3w== 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=nm99aDROSsc8k+m+Nop8pHm6K1YhSGPlBQH3jrAOQkE=; b=k2j3Q/uuXizqe25CioXDfwPglrO+BQ0dQLuHMtxebxPjsyn/mgrtlWl4Ykyta1Ty9E LHyFBuTj6zpcmlItnHjECD/DClNkvEcHPZX9yLPcy8HzxKHOF/cRjh/kYv877PthIkc3 3TzQYqIpcmLgmwR8kUPfIlZdKOPSlRZEAfeTxHDow6z5kbBzc4wi55JCBN0VEAmST+Ro 5rfh4zsaHlBGBBNMA4RTgydWYmlAAmMzif7I6+COvHj31Uri7QqaanfRH6LuXh8BHSNb VKHj7AFi4Dd5pz0kyHfwzC4Vj0JolStoTWAfRTpC39w0M1aSQZAW+WLRRVHO35VWyBb/ d32g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WQchJggI; 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 g184si1332765pfb.288.2019.02.04.15.18.04; Mon, 04 Feb 2019 15:18:20 -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=WQchJggI; 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 S1728130AbfBDWou (ORCPT + 99 others); Mon, 4 Feb 2019 17:44:50 -0500 Received: from mail-vs1-f68.google.com ([209.85.217.68]:37299 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbfBDWou (ORCPT ); Mon, 4 Feb 2019 17:44:50 -0500 Received: by mail-vs1-f68.google.com with SMTP id n13so1034654vsk.4 for ; Mon, 04 Feb 2019 14:44:49 -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=nm99aDROSsc8k+m+Nop8pHm6K1YhSGPlBQH3jrAOQkE=; b=WQchJggI68SAjCb96GjjE+9K6UT31IPh5/64uPYMioUFNi2m0wFaBh4fgg+4wCWOpR w7Nah6SvCGnXULJmWuxPJwPck531sq8z3pUOEMmkudG9kBCYXQqzmZUFTa/fHyGptza+ fHJ4gwJ296HNGORky28FNK690JTSe1vMW5UkFYkyzthtIGWBg2Hq7nu0unmaqsOEzydm MlbOktLjHNhqtoMC0UnVSGft+D9Zx5w6uzBs6DcU0Pft8n6KRd3cZlOYXfGey6T9bkFl WeTHgBtvY4J9B6i3jG9ptY4VKQizUduSOLECVSIonA4p8BJMZN2TlFTxpXFBh8+Y4MEq 3eBA== 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=nm99aDROSsc8k+m+Nop8pHm6K1YhSGPlBQH3jrAOQkE=; b=aZ4IaJ/PMbOE/XEq+Hoct7UXesbmmKR8hO2hiLVvnutbBL6CUVq7HfpcIWyC9PLqfi FvL6XUFuuVIjIMFsn1loE9ACLC2FdoEVssLCWOGzcB+K7GcIxTi3m5oZq2Z6OWBMLCxM Dk6PGRIQBKlOaF0KIFH/VCZ4ESaGG/Botr0VKs6Bn0uVBmmFR5ON1MWVe1copLaOCXAh 9gGdi8CX8d2DO+vhm0ylKUIGt9+Jor9q49HBactAGdK0+5hxthlvMpmluepY9qv/x9jI XF9I5BptNy4RbdPWKaHkM0O1kmTkDI11BHxCMvLVnIXiZMxlM+MIkMnilmrMlqghw3ez TqjA== X-Gm-Message-State: AHQUAuZNM2Fiv0eL4FhOqEwqQWKOYdO/2AVCEFXbftyeikhxEzWgcOTo 1Kg20jYVvkGmbH0pd+WkVf6i9Dz9gI0ZNFcnwBlhrh+/ X-Received: by 2002:a67:e983:: with SMTP id b3mr741500vso.231.1549320288622; Mon, 04 Feb 2019 14:44:48 -0800 (PST) MIME-Version: 1.0 References: <20190203153018.9650-1-jolsa@kernel.org> <8d8b3f0d-cea8-2daf-249f-29f485c49a46@linux.intel.com> <20190204103643.GA18141@krava> <6bf24b7d-2bd3-8091-cf49-363c91e4e864@linux.intel.com> <20190204114144.GC18141@krava> <20190204192721.GI5593@kernel.org> <20190204202818.GC4794@krava> In-Reply-To: <20190204202818.GC4794@krava> From: Stephane Eranian Date: Mon, 4 Feb 2019 14:44:37 -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 Jiri, While you're looking at the output format, I think it would be good time to simplify the code handling perf.data file. Today, perf record can emit in two formats: file mode or pipe mode. This adds complexity in the code and is error prone as the file mode path is tested more than the pipe mode path. We have run into multiple issues with the pipe mode in recent years. There is no real reason why we need to maintain two formats. If I recall, the pipe format was introduced because on pipes you cannot lseek to update the headers and therefore some of the information present as tables updated on the fly needed to be generated as pseudo records by the tool. I believe that the pipe format covers all the needs and could supersede the file mode format. That would simplify code in perf record and eliminate the risk of errors when new headers are introduced. Related to your effort to make perf record multi-threaded, I was wondering how this would impact pipe mode. Could you explain? Thanks. On Mon, Feb 4, 2019 at 12:28 PM Jiri Olsa wrote: > > On Mon, Feb 04, 2019 at 12:05:38PM -0800, Stephane Eranian wrote: > > SNIP > > > > > > > > > > > > > > > [jolsa@krava perf]$ ll result_1/ > > > > > > > total 348 > > > > > > > -rw-------. 1 jolsa jolsa 27624 Feb 4 11:35 data.0 > > > > > > > -rw-------. 1 jolsa jolsa 56672 Feb 4 11:35 data.1 > > > > > > > -rw-------. 1 jolsa jolsa 30824 Feb 4 11:35 data.2 > > > > > > > -rw-------. 1 jolsa jolsa 49136 Feb 4 11:35 data.3 > > > > > > > -rw-------. 1 jolsa jolsa 22712 Feb 4 11:35 data.4 > > > > > > > -rw-------. 1 jolsa jolsa 53392 Feb 4 11:35 data.5 > > > > > > > -rw-------. 1 jolsa jolsa 43352 Feb 4 11:35 data.6 > > > > > > > -rw-------. 1 jolsa jolsa 46688 Feb 4 11:35 data.7 > > > > > > > -rw-------. 1 jolsa jolsa 9068 Feb 4 11:35 header > > > > > > > > > > > > Awesome. What do you think about having it like this: > > > > > > > > > > > > $ perf record --output result_1.data ... - writes data to a file > > > > > > > > > > > > $ perf record --dir result_1 ... - or even > > > > > > $ perf record --output_dir result_1 ... - writes data into a directory > > > > > > > > > > > > IMHO, this interface is simpler for a user. > > > > > > > > > > yep, seems more convenient.. I'll add it > > > > > > > > > But what happens if you do: perf record -o foo --output_dir foo.d? > > > > > > Should fail, i.e. either you use single-file or directory output, I > > > think. > > > > > Agreed > > ok, will do that > > thanks, > jirka