From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 979CCEB64D9 for ; Thu, 29 Jun 2023 06:35:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231509AbjF2Gfd (ORCPT ); Thu, 29 Jun 2023 02:35:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230353AbjF2Gfb (ORCPT ); Thu, 29 Jun 2023 02:35:31 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DA501727; Wed, 28 Jun 2023 23:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688020530; x=1719556530; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=AFzg3FqF7514HUhQf1w+sr/2SUF9as8V/MqUkh+gBzY=; b=boxZYx59pMdMQudXTrFgF90Z3kZ14Vs+wXuTqFVf8aJMFFZPy4LtDiNa lWTo1qkjwLVB3feeJy9zJop4RFdKCuG8jJ3tcwnPlBN+Sh9c0kDXsRhmf o1pEgwy7ZSvUFd8nzNdK+Jt2kfFS4D5qgSzQSHZ+cvzXXb2eroeNQO0QA 4rQFF5JqgELQOdfGC0NdDsqiTFtZoo/B8PUEE5g9zl/6+XWigEeG6MdXi hzLk2ac7xPSlrkHsNScIb0KHoC/CJF3KmvaL+s2dGtP9BaKs+5PhnBcwr jB8sX1SGirAShPYqI6VnMklXtlzbliXgCJZq2/2LgdYWWbagTXQFnPzdy A==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="392759195" X-IronPort-AV: E=Sophos;i="6.01,167,1684825200"; d="scan'208";a="392759195" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 23:35:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="891299887" X-IronPort-AV: E=Sophos;i="6.01,167,1684825200"; d="scan'208";a="891299887" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.49.81]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 23:35:26 -0700 Message-ID: <287bf3c8-fa0e-8c36-df14-7d728c63c265@intel.com> Date: Thu, 29 Jun 2023 09:35:22 +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: [RFC] Adding Support for Firefox's Gecko Profile Format Content-Language: en-US To: Namhyung Kim , Anup Sharma Cc: Ian Rogers , linux-perf-users@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , linux-kernel@vger.kernel.org References: 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: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On 29/06/23 09:26, Namhyung Kim wrote: > Hi Anup, > > On Wed, Jun 28, 2023 at 1:11 PM Anup Sharma wrote: >> >> On Wed, Jun 14, 2023 at 01:17:52PM -0700, Ian Rogers wrote: >>> On Wed, Jun 14, 2023 at 1:14 PM Anup Sharma wrote: >>>> >>>> On Thu, Jun 08, 2023 at 06:23:49PM +0530, Anup Sharma wrote: >>>> I wanted to take a moment to provide you with an update on the progress >>>> of our Firefox Gecko converter work. While I must emphasize that the code >>>> I'm sharing is not the final version, I wanted to share the advancements >>>> I have made thus far. >>>> >>>> This script can generate a JSON format from the output of the "perf script" command. >>>> I attempted to load this JSON file into profile.firefox.com, and although it >>>> successfully loaded, the call tree are not visible. I'm certain this issue >>>> is related to the format of the JSON file or if there is another underlying >>>> cause. I will continue investigating to determine the cause of this problem. >>> >>> Great Anup, progress can be frustrating slow at first but it is a good >>> milestone to be generating output and having firefox profiler consume >>> it. You can open up the JavaScript console for the firefox profiler >>> and it will give some debug output. This should hopefully help you >>> make progress. >> >> This week I tried playing with perf-script-python, the first challenge was >> figuring out how to parse the data coming from the process_events. >> Understanding the structure and extracting the necessary information >> proved to be more complex than anticipated. This required me to spend >> a significant amount of time researching and experimenting with different >> parsing techniques. > > I'm not sure what kind of parsing you meant. IIRC the sample data is > in a dict and all the information should be available there. Maybe we > missed some new sample data types though. Most data is there. There are existing scripts in tools/perf/scripts/python/ for reference. There is also the dlfilter API: https://perf.wiki.kernel.org/index.php/Latest_Manual_Page_of_perf-dlfilter.1 > >> >> The second challenge revolved around the usage of event hooks provided with the perf script >> python event handlers. I found myself deliberating between two approaches. The first >> approach involved creating custom functions that would be called using the event >> handlers. These functions would then save the data in an organized format within >> globally created data structures. The alternative approach was to write the entire >> logic inside the event handlers themselves. >> >> Additionally, I contemplated whether it would be more suitable to handle the creation of >> a Gecko format for JSON and the profile format within the same script or to separate >> them into different scripts. >> >> I will discuss this points during tomorrow's office hour. >> >> However, I have gained a deeper understanding of the problem at hand and will use this >> knowledge to make more informed decisions and progress more effectively in the coming weeks. > > Sounds like you did a good amount of research on how perf script > works. We can talk about the details in the meeting. > > Thanks, > Namhyung