Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8020253rwp; Wed, 19 Jul 2023 04:10:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqyCmoYf0AqZ1UXOCWfodzsA8jSxGBHWuUiE4OoOXi2NwOfZc/M+nWIe8iUwnq5OLr8p2+ X-Received: by 2002:a17:907:16a1:b0:992:a9ba:b8da with SMTP id hc33-20020a17090716a100b00992a9bab8damr2650121ejc.70.1689765050525; Wed, 19 Jul 2023 04:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689765050; cv=none; d=google.com; s=arc-20160816; b=DGZ1VNrxER83bae3yxIb9CkX7nPSdXXUbF7vJV5dDk6bPa4u7Aqkk6vJE9n2p6w0Wg gIETvjnv2P5NjE4LsJoTgC0c7c5glW87h7CVq1KnMPK1Vol6c/oURK0x6edcwbd2uYdp b2mjW6gZAvHLO51ycuVB+jWdp/U+bhsiQhZB22pjoZdz/8GUsUxdlKAQ2IDbHHOgwVif 8ERbW8IKW0FSn5hoDKjHiVNMQqjsnZeTpVLUwzcdH6KsmgK8+guNMhdeHtm+MLXg67G7 YzLyicORzhOdCB1QxzIzSkHR0ik1ISbDQAWpqpy56EZD8a3ny6mlkUVqWPKIeYCpfdd0 lPpQ== 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=sf4ZRV10sV6tx4jAS43WUBL09WMMeV0xvAxTcrZcosU=; fh=KpCvHeldasWg9FdyMS78vq14I0orNV+McIT5bZlFDek=; b=JEh7QUgbgd4/AhrxXOffI2idqfoURnTz/MCndAytNBkNsOq+RYxZj4u41IgQyOXa0i PCmSmt/Wy5wzQYkN8Ss63bFXoRFBUY45z6lPdoHr/GvfOMVGHrwI0JrkrBjpQoRBZ7Pa sfkYrolmAhGhv8zXOgyaqOKK+zKhy5MQLkEM7A94AlXHcjWNth8jJ8QzpmbOqAW8YckF qFKzR74Qh/cztJe65aOfnmJMEfZnRBcKYRpCD+/SZeXXrZIyAmxQlEK8eGAT3NzXobxS z2b/BwAj1znKsl906bwArOSUzE+0oOnC9MYrd4ZsXBgyXCAKBNxi5GPw+CrhJVazu8a9 3pSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=syS5KsxI; 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 j2-20020a17090686c200b00992d0de8766si2540620ejy.913.2023.07.19.04.10.26; Wed, 19 Jul 2023 04:10:50 -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=syS5KsxI; 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 S229618AbjGSLEk (ORCPT + 99 others); Wed, 19 Jul 2023 07:04:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjGSLEj (ORCPT ); Wed, 19 Jul 2023 07:04:39 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24707186; Wed, 19 Jul 2023 04:04:38 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-783698a37beso387942539f.0; Wed, 19 Jul 2023 04:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689764677; x=1692356677; 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=sf4ZRV10sV6tx4jAS43WUBL09WMMeV0xvAxTcrZcosU=; b=syS5KsxIe77zYDrCENDBQkrf7gsj3kAytcNlamTWsCmzB/0Jh8evMBT6NjC3nVN9iQ Wo4tXlj4vXy8P2mt9hlIFXcLuHAn6txEdXGbkqeG3db8MY1/raF5Wu3jBj30B0heQ1hM gzPZjOziD3R5nPRIToOO6eqLMhZKZJaydN3MoRa0E00Yb666/T0A+FVZr9k1Y8uOoV+h sugQOqGxtgsI/qT5Rsh6THy8EucTFCgqX6Sou7AaZWfFmgImeZTsQIE6LwUkr1TWEV/v NIPJRzzXBIpnSwfphiJ33nEKZoDxd7IRf5o7yYLw9KimPwrRMzkceIFvsP/sEcKl4csY T08w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689764677; x=1692356677; 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=sf4ZRV10sV6tx4jAS43WUBL09WMMeV0xvAxTcrZcosU=; b=aYmRweqD4P56KdR5FZdeEM887iNK6pJTPbwi3zW8uxSUoh/5E4FgDEpn4DVDIihAHc Lx4xoK/2rt1tBNuI//aeECohZW/W1RnQb20l6Nxk9yeh0g9IK2LTPpFnk+Zmfxuxv7XY RN53ic7MyMJmzFVZlY4SmeSS2x/ibJsNpqSZB22E1Y+Vfi0+vrDCyllk8JB7ICnieeww RTPpFW3seBazSjhS+jSh+B+WgfyENWmAxnEedHzPbGhrAtJt7ZI/mh4xy5bEZtpymxKz r6zf+kIZOuZBnPk2j5AuhHmSU8InKwp6+DQTuP7xdqSc27rL4geP9gEer9xwydjXvW8z PB+g== X-Gm-Message-State: ABy/qLYjb9vZjj3eFp+ASc3sX7m+Qa2jbEAoUZYTs1O7kHvQyhtaXpTo 07VUJMMTyWKBrJ5IcPp8SKE= X-Received: by 2002:a6b:fe17:0:b0:787:1f16:53ce with SMTP id x23-20020a6bfe17000000b007871f1653cemr5434904ioh.18.1689764677154; Wed, 19 Jul 2023 04:04:37 -0700 (PDT) Received: from yoga ([2400:1f00:13:be68:7e35:c5e7:4202:bd70]) by smtp.gmail.com with ESMTPSA id c1-20020a170902d48100b001b896d0eb3dsm3680730plg.8.2023.07.19.04.04.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 04:04:36 -0700 (PDT) From: Anup Sharma X-Google-Original-From: Anup Sharma Date: Wed, 19 Jul 2023 16:34:28 +0530 To: Anup Sharma Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/6] Add support for Firefox's gecko profile format Message-ID: References: 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_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, 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 Wed, Jul 19, 2023 at 04:15:52AM +0530, Anup Sharma wrote: > This patch series adds support for Firefox's gecko profile format. > The format is documented here [1]. > > I have incorporated several changes based on feedback from the > previous version of the patch. > > Changes in v3: a small typo here. It should be v4 instead of v3 (changes in v4). > - Implemented object-oriented programming (OOP) approach for Thread and Sample > to improve code organization and maintainability. > - Enhanced user experience by introducing argparse for changing color settings > of user and kernel symbols during execution. > - Ensured proper module encapsulation by adding imports wherever necessary. > - Improved code readability by adding descriptive comments and type annotations. > > These changes focus on adopting OOP principles, enhancing user interaction with argparse, > and making the code more readable with comments and type information. > > TODO: > - use cpu_mode to determine the category instead of finding it from symbol name. > - Write a test. > - add direct execution command for this script under script/python/bin directory. > > Committer Testing: > - Tested with a perf.data file generated for single and multiple cpu > cores enabled. > - Uploaded the stdout into profiler.firefox.com and verified the > output. > - Verified the output with the output generated by the existing > script as mentioned here [2]. > Method: > - perf record -F 99 -a -g -- sleep 5 > - perf script firefox-gecko-converter.py > output.json > - upload output.json to profiler.firefox.com > > [1] https://github.com/firefox-devtools/profiler/blob/main/docs-developer/gecko-profile-format.md > [2] https://perf.wiki.kernel.org/index.php/Tutorial#Firefox_Profiler > > Anup Sharma (6): > perf scripts python: Add initial script file with usage information > perf scripts python: Extact necessary information from process event > perf scripts python: Add classes and conversion functions > perf scripts python: Add trace end processing and PRODUCT and > CATEGORIES information > perf scripts python: implement internal get or create frame, stack and > string function > perf scripts python: Implement add sample function and thread > processing > > .../scripts/python/firefox-gecko-converter.py | 339 ++++++++++++++++++ > 1 file changed, 339 insertions(+) > create mode 100644 tools/perf/scripts/python/firefox-gecko-converter.py > > -- > 2.34.1 >