Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20298141rwd; Wed, 28 Jun 2023 23:50:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7RnHs+frIhuV3lMw1LR5LUKYVYJYriDPPCcYy34WfF3R718M2nEWzMn7K9r3fJmYgkVXUt X-Received: by 2002:a05:6a21:3814:b0:126:306b:c6d4 with SMTP id yi20-20020a056a21381400b00126306bc6d4mr8905777pzb.23.1688021412534; Wed, 28 Jun 2023 23:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688021412; cv=none; d=google.com; s=arc-20160816; b=eZGA6zLAedHisNvTT8SgpOmu7teeN21rUjDugTjfDlbhm89MxzSCgSrADFShd9sCQM zV+bu7Xkp7KRgkVBdswFPlheXxPwbvWYcu7hXuP6M44Xby0nkHNXIgxb05hEQ2kw7mtI ik/Lea3fM995yKJpHL/rCajs43hW1FxOLd7Mq48EcixzRsw1onZANJeu+SPBfoGAsWBw NApSUyaMrWnobadcjUjTziueSakTLMjNx5UMGH2svOaP3BjBPpvvHWEfDMpHCCs9YbtF pZ7uAtZhknbFcsAYsOXWdENChDYj2hIx3M1cVc884uiyPlz2mEZy4Huv5noQ0xBScLHt SiYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=9jfcqAzOMYeB1Z4ebe5qibCmXTYOfZnZrXuQEk6SrlI=; fh=TNnTrM48PQ9U/yQNgd/RAmeFPCutpbWQoWSWNjPX6+g=; b=Yl0hL0/tuosIe1P4T38B+Rl98FtPm99cIJzwT0x9zr8BkK8eftigdWJ+fwhwzJGJJp fq5tjF9hlkbhn+YseTLDS+gSaoewAZvC94apcI6k7bw1piQNTgEUTluZoKY++lieDIrv F73K/LmtkMSj312O28FgBZ7vCpRZ8wvG9oQL40bP/SnlWHNDoj4dzDW05lqdNpONQriS /d1mYwRBCFFYnsEmMLQbNGeAeYG/qilF9+9x9sqj45vK/QaxTcIF7ioKCuU6qbw+BEM1 izaYefLjcvcg83rGNRTJzlt7JSIuqG0c2fKxJ1MAU7LkJ0meUFMENkIeP5a2Mhk7W1cn qatg== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd23-20020a056a00421700b0067de347ee12si4015976pfb.164.2023.06.28.23.49.54; Wed, 28 Jun 2023 23:50:12 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231984AbjF2G0z convert rfc822-to-8bit (ORCPT + 99 others); Thu, 29 Jun 2023 02:26:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231932AbjF2G01 (ORCPT ); Thu, 29 Jun 2023 02:26:27 -0400 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE5FA30C5; Wed, 28 Jun 2023 23:26:20 -0700 (PDT) Received: by mail-yb1-f176.google.com with SMTP id 3f1490d57ef6-c14476f8401so323926276.3; Wed, 28 Jun 2023 23:26:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688019979; x=1690611979; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YfLTbjgoIsSKWwNycBDFQAmVln5oxCfW2uQIjevEO0Q=; b=XsKrwfcPgYsJ3ILFRX7CJ8rq9Dx+sDCYsgRhJ7y7PtbacvLzQL6D4mBPp5mx4Ib0e/ FtiI8paUgY/iAzm00i1XJDQBJNg0dvmPZ3GzjyNWyJavSFkqBu+yRGpxutijgc2++hvB sUrww9rzu51b8BGsdBdrDI5BS4MvTy+fcD/HU8xlIgOnexgURuUay9aQ28j+i3CiSMRr 0upkak4DqwbdZgvkyGPJ+84kBM5RTW+XA8RiXov2oRLN9P/qPSnl0e18/i+q2r9rNE6V iqh4+lIpuVnpsUCFj5eg+mytkQI8t1j3FcfCmUFWoildSQO2xj8Uwwzptn/dfYpV9yLA yXsQ== X-Gm-Message-State: AC+VfDxZmWZFCppYJLUZPyl5Suog6dxoOGsji8W0BMq6sEYd8Pd+NMww dH4ejwQUpSoMl6Fx0TgsttlZOopDswIxxnU4Qyc= X-Received: by 2002:a25:37d7:0:b0:c0b:7483:5cf0 with SMTP id e206-20020a2537d7000000b00c0b74835cf0mr16305934yba.65.1688019979572; Wed, 28 Jun 2023 23:26:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Wed, 28 Jun 2023 23:26:08 -0700 Message-ID: Subject: Re: [RFC] Adding Support for Firefox's Gecko Profile Format To: 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 , Adrian Hunter , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 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. > > 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