Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp214896rwl; Wed, 9 Aug 2023 13:26:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCgqxpIWSErycspQ2q/5uWCUtIsi+o9cKbHemVhXsmRIerZXZi07xRqO15sFEYZI6pa2gL X-Received: by 2002:a17:902:f686:b0:1bb:3979:d467 with SMTP id l6-20020a170902f68600b001bb3979d467mr185776plg.63.1691612769228; Wed, 09 Aug 2023 13:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691612769; cv=none; d=google.com; s=arc-20160816; b=JmLNygSSCV+ckQp9JpOB1/ADrjX4mg/kGGbqD/cARJ3kESr+XWm8UZvQjSQXVPfVAd bssVzmcyD5CfaE8FFVGjgYQcrxBOFzZkDb9PQdVt7/6CF8biXlyL7IFgQAK5ddUNHGfb rsRUzR/Gw3ZVUUCfOIgenhf9v4djniYVC0cfpkm6DF0KrrtdRUys+2bO4lF+WqziyBSt oGgE4Yj2lIMZdW20cCQt76xmI9WALup1nmjmPV1xLiBqUzaiYwR5tbVEl6KfDw/7Mvhp M0oWYqewcF+/lakBC9FYg89u3aj874r1FtoUonomYpz66xYrLa7wX4l5FGu/A1X0f17y V9lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=HS88ftUTyzR3Q0GvZ4/QO9Y1ZAxs9zglfag3dq1XafI=; fh=ikVbs9NhrU3eWB7Y2j1dNe9I6vZMVXCdKqzIAmeHQNM=; b=ner1aQgzBJYLt/oOVG+nVdXc2vAnEMw05iNS4PWIWg52rb0sBIeB8s24ollk3j9tSj qPEzPRPBzNNG/Z9x6ViBU7WQ845ltA11RzbZPWB3QTD2lkDPELm+3PYmhRIi3Lq31B1M tyewdoN8jdERE4Gd//uOQ7ZjiI6kU5rNZr9cjpuh1vsiu4z7QJhh9hQlNrPZm9bOfqHK 4MuxKirZg+xerG8LBVcsZIDjMFy1a1BMhoaylcEOvyzPfzoAwbR5BF5vhrYXokjoSSyR DoqXfVC/SUBIbobhEoC2NGRignpMvWO+6BEk/40a8YXSKUiMt0/71V7cKWMLf8DAVaWR 6oGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=nRoM0L2W; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kg14-20020a170903060e00b001b8039317cesi9684624plb.301.2023.08.09.13.25.57; Wed, 09 Aug 2023 13:26:09 -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=@gmail.com header.s=20221208 header.b=nRoM0L2W; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbjHIUBU (ORCPT + 99 others); Wed, 9 Aug 2023 16:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231481AbjHIUBT (ORCPT ); Wed, 9 Aug 2023 16:01:19 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4447DD2; Wed, 9 Aug 2023 13:01:18 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1bc411e9d17so2081745ad.0; Wed, 09 Aug 2023 13:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691611278; x=1692216078; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=HS88ftUTyzR3Q0GvZ4/QO9Y1ZAxs9zglfag3dq1XafI=; b=nRoM0L2Wry6nncUwzn0RLyiuHAyBqiQXR9WzQBN1nEhLyTjwLvFMuL+TNsuascbDyN PPCRUtsfD9CsabN0HGzyBzc7M2Dbs8tpceMQQZjMaA1nEKMuqZ0PUx4sUs7t4r6eNoER 097BItuKHgrE2F5z/16RatVM08Wl2mOcR/74MXd9q4JJjVApkGoDcWKempKrESOPm9iT yI8adNsag3LqmsdIsd3nS0tJ1YBkn+F3WqOiOQ+2zCpabWZeC1eAQdh4B0An+DBHdPQ4 RQdSKu4OjWYQaxyFyagPrgtQDfI7ZleDfRUtRjq5VpIU5rolldDNmvY/bFOeHa9FG1jJ 5UdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691611278; x=1692216078; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HS88ftUTyzR3Q0GvZ4/QO9Y1ZAxs9zglfag3dq1XafI=; b=hbqy3tIqGSc0d/f3nj9Pz6WtsKyXoSfPNcYPMW736aWloXPmFQTPbNk+stJHqrO/iT KmscVjajmC2/8n5r+vZi4kf0louUPQ9ZaLpcdsF4jjl2TSdQCOnkX2vaaMpWadhcCPvq gLqEVcDlQtPAu9BZFDpqP+oTcO4h4PvgmGyn97H6cg4SQ1kHSkC1pCOnpD99RmLEOb0g WN29yn/9pqrTZQxALFQ6mZ9M+oUb/xjrcw8xYMgTCHdEXaEyuduRl+9kVYb8Echgz5QD /RIhOwQiZp5zA9j8DnBZFmi6HKOB3fzur4mH85oBh9a31WXQxYKnmKbHd8KnZGs599HB JGaQ== X-Gm-Message-State: AOJu0YySmj7CO2hMEvT3TJeB9xbXfgES+dsM4J/V0ZgnEu59rpagUzer 8xhBoXJdYKFJANs8oVlYem0= X-Received: by 2002:a17:902:ea02:b0:1bc:382b:6897 with SMTP id s2-20020a170902ea0200b001bc382b6897mr114934plg.13.1691611277411; Wed, 09 Aug 2023 13:01:17 -0700 (PDT) Received: from yoga ([2400:1f00:13:9c9a:9cd0:55ee:75bd:a5c5]) by smtp.gmail.com with ESMTPSA id a2-20020a1709027d8200b001bc39aa63ebsm11571085plm.121.2023.08.09.13.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 13:01:16 -0700 (PDT) From: Anup Sharma X-Google-Original-From: Anup Sharma Date: Thu, 10 Aug 2023 01:31:09 +0530 To: Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers Cc: Adrian Hunter , linux-perf-users@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , linux-kernel@vger.kernel.org, anupnewsmail@gmail.com Subject: Re: [RFC] Adding Support for Firefox's Gecko Profile Format Message-ID: References: <287bf3c8-fa0e-8c36-df14-7d728c63c265@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 Thu, Aug 03, 2023 at 12:29:51AM +0530, Anup Sharma wrote: > On Wed, Jul 26, 2023 at 04:22:51PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Wed, Jul 26, 2023 at 11:34:17PM +0530, Anup Sharma escreveu: > > > Dear all, > > > > > > I want to share a recent development in our project that > > > I have been working on this week. I have successfully > > > implemented a new feature that allows users to directly > > > open the browser and visualize the output of perf.data > > > on Firefox Profiler. > > > > Excellent news! > > > > > To enhance user experience, I have made sure this option > > > is enabled by default. Additionally, I've also added a > > > handy command line argument, "--save-only," which allows > > > users to save the output file as needed. This enhancement > > > replaces the previous standard output method, providing a > > > much-improved experience. > > > > > > Moreover, Everything is processed locally, and no data is > > > sent to any server. > > > > That addresses the worry about sending possibly sensitive data over the > > network by default, great. > > > > > During this implementation, I had the opportunity to delve > > > into several exciting topics, including threading, HTTP server, > > > and CORS mechanisms. The learning process has been both > > > challenging and rewarding. > > > > Cool that you're so excited learning all this. > > > > > Currently, I am in the process of performing some clean-up tasks. > > > Once that is complete, I will be sharing the next version of the > > > series, which includes this fantastic new feature, with all of > > > you very soon. > > > > > > Thank you for your ongoing support and encouragement. > > > > Keep it up! > > This week, I'm working on documenting the gecko converter for our wiki. > I've dedicated a significant amount of time to think about the content > and how to approach it. So far, I've written sections covering the > introduction to Firefox Profiler and the formatting guidelines(not > published yet). > > However, I've left the usage part blank because I'm uncertain about how > to enable gecko.py arguments when executing the "perf script gecko" command. > I've looked at examples like flamegraph-report and sctop-report, but I'm > still confused. I attempted to enable the script to take the gecko.py > command example "perf script report gecko --save-only=profiler.json," > but this caused issues when running "perf script gecko -a sleep 3" again. > This has left me feeling rather puzzled, and I would appreciate discussing > this during our office hour, or any help here. > > Due to this blocker, I haven't been able to send the updated patch > for test_gecko yet. However, I hope I'll find a solution soon and overcome > this obstacle. Hello All, As discussed during last office hour, I was little occupied this week, so I haven't been able to make much progress on my TODO list. Nonetheless, I've resent a server patch and test script patch for your review. If I can get it reviewed it would be great to make further progress. I'm also working on writing documentation for our wiki. I've already written a bit, and you can see it here: https://perf.wiki.kernel.org/index.php/Tutorial#Firefox_Profiler. If you have any thoughts or suggestions, I'd appreciate hearing them. I'll add more details once I've sorted out some issues I'm having with certain commands. This week, I do not have a specific agenda. Hence, if we opt to skip this week's office hour, it wouldn't pose any inconvenience. Nevertheless, I am available if there are matters you wish to discuss. Here's what I have in mind to work on next: 1. Making sure that gecko script args work with commands, like (perf script gecko --save-only=profile.json) or (perf script gecko --kernel-color=green),which aren't working right now. 2. Trying out "perf record -p firefox" or using it with a specific process ID to see if the current script supports these recording commands. 3. Adding page fault and one more event in stackTable in gecko script. 4. Making the documentation better. Thanks, Anup > > - Arnaldo > > > > > Thanks, > > > Anup > > > > > > > > Regards, > > > > > Anup > > > > > > > > > > > > > >> > > > > > > >> 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 > > > > > > > > > > -- > > > > - Arnaldo