Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10377169rwd; Wed, 21 Jun 2023 22:11:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/c8fuNx4YVkFrUimBP5Wrnp8FITjVSIJLuFobsk+sTIek0heooqPpWVSRGZwr3QSUIiWr X-Received: by 2002:a05:6358:cc13:b0:12f:1fea:7118 with SMTP id gx19-20020a056358cc1300b0012f1fea7118mr13650442rwb.30.1687410676531; Wed, 21 Jun 2023 22:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687410676; cv=none; d=google.com; s=arc-20160816; b=TDbj5jOKAtS/8vS5Nxxv8uw1wkdzREpu0CuXBN/Wh7J8W03dKukTPUs+65avLBZJf8 CspBKkHSnJkgjmcW3Jzmj42EJAr96OufNLa4PRTe5WpeWqLIBIm7kqU+s2bYsJiQp+xm bqqJ+1k+bplzNb3U/UBZn3UgsKReJXQvP+eNCqZPkz9axYnYvBKyZB2FGEaKjPY6HJ0h SmKboExLYO7XQGJQ+gULVugGjym8NVarT+1S64mWZBTJK6TmqQrphK07TWbzWP18fIfQ dT75QmKOLLQyIDQoGEhm7R9IAQtoj628k6Mac3XV+d6/FuEkV/kKpoPqsvU0wEYNVii4 PguA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=GlvOPTvHS1mRjdO8FjlPobSiymNNWx2gMd201ce/WVI=; b=e42g0tGrTB7yK+TDq/0KV7M+Ls4lsxvX4hA39F8D6c+N9mIPLIIT9RuOyjfeTEH3YN J0TEuAN1Enmjmbwu1p6wMlWkE+au1R6SohqMfhXegNHAFN9cScZ+yBfeag7Ci+MeLMTd GRtT35belpw0Mdb+IPtcnDLG2OW6Oc9aFflKPUXCHCy3q5ePi7Sas06bYTLAdaF4I1sY a6rFM1TBjk8u8UtlltvpgNjiUhyd8rnJ/YMrpAKoON531tHAenQZtnnNgxh+PWAmOEva A5jZ8hJTQ4fIuVoXvP/U5HiW5HZo8I+5WvidFKnKUK5mAoS5oPnB9SHl074EWS5faaiA U3QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fLDac3bC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a633c03000000b0054fd311c4f1si5343159pga.242.2023.06.21.22.11.03; Wed, 21 Jun 2023 22:11:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fLDac3bC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230471AbjFVEnY (ORCPT + 99 others); Thu, 22 Jun 2023 00:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjFVEnW (ORCPT ); Thu, 22 Jun 2023 00:43:22 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F248B1721; Wed, 21 Jun 2023 21:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687409000; x=1718945000; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=wQoR2q3uW5UBsZHTzuc+u5TdXp0RPHRVzU+umLlMx20=; b=fLDac3bCVzJST0SHlg6g/Yh/UUcZGuy/YBmky0VcwGs3Xf4ZbzNvsteB DnfcZqt/mJAtZMxwXj3FiW3JlYOpXhGand6v9dOovjVc6RNDXNY3Ku/jN Fl0YZma7sVupZiluhBGI5QrPdnqQhHTj4jt2ytvmLr2b+WyllDRCwMH00 ti/0c/1IC9ij5mzOvewyi/VFVIP2mSJNd2dkjVFUpkpdubpmAYYQBTy2k XUub2+Nju1iEcGI/EXZkYjROipiQGXOQMe1Fxj21TqEdZKDhnHQsjE1K4 EAyP2XJgvDdkkcsMj0R9NJXCRMUXc3osxnM+CNoY5FqWu8L/8vQXAQDzN g==; X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="339993596" X-IronPort-AV: E=Sophos;i="6.00,262,1681196400"; d="scan'208";a="339993596" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2023 21:43:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="888947079" X-IronPort-AV: E=Sophos;i="6.00,262,1681196400"; d="scan'208";a="888947079" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.249.46.4]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2023 21:43:16 -0700 Message-ID: Date: Thu, 22 Jun 2023 07:43:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.12.0 Subject: Re: [PATCH 0/9] Add support for Firefox's gecko profile format To: Anup Sharma , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org References: Content-Language: en-US From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/06/23 22:35, Anup Sharma wrote: > This patch series adds support for Firefox's gecko profile format. > The format is documented here [1] > > The series adds a new python script that can be used to convert the > perf script to gecko profile format. To use this script, use the > following commands: > > perf record > perf script -F +pid > perf_data.txt > python3 firefox-gecko-converter.py > gecko_profile.json Why not use the perf script python interface? https://perf.wiki.kernel.org/index.php/Latest_Manual_Page_of_perf-script-python.1 > > Also dont forget to change the chown of the output file to the user[2]. > > [1] https://github.com/firefox-devtools/profiler/blob/main/docs-developer/gecko-profile-format.md > [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1823421 > > Anup Sharma (9): > scripts: python: Add check for correct perf script format > scripts: python: implement add sample function and return it > scripts: python: Introduce thread sample processing in > convertPerfScriptProfile > scripts: python: Implement parsing of input data in > convertPerfScriptProfile > scripts: python: implement function for thread creation > scripts: python: implement get or create stack function > scripts: python: implement get or create frame function > scripts: python: Finalize convertPerfScriptProfile and return profile > data > scripts: python: Add temporary main function for testing purposes > > .../scripts/python/firefox-gecko-converter.py | 249 ++++++++++++++++++ > 1 file changed, 249 insertions(+) > create mode 100644 tools/perf/scripts/python/firefox-gecko-converter.py >