Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9752623rwp; Thu, 20 Jul 2023 09:10:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHUF32I8cwvB+5NadxT47sP+OtAiCv7V0KTFzjnQS32zMyUlMe0IEoVD2x/hMF6xj9UXyN8 X-Received: by 2002:a17:902:da88:b0:1b8:8069:d432 with SMTP id j8-20020a170902da8800b001b88069d432mr6238024plx.16.1689869431361; Thu, 20 Jul 2023 09:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689869431; cv=none; d=google.com; s=arc-20160816; b=paqXrvipSFM+Zm8K+25OYQEz95OndtoQIfUENPMi/IgbUCCrif415nmjoBD1JDb37c EjycjH8VZqEg0zfHs2su69FzHz0xRqFdXRoFhcZwE238KSphJ4peOsRpTR/1JNMiyiYx SNR7/xjGhCnLTDWbRFBlO9OqT6/lKBXb9OQhcfdk41chTGTBI8ZxmV0kCbA1X1XlanBG 7oXchUKaclgYGQUamEiGp1fNHPjIreNl7oLia3G7slK+q1wml6r/zacVWqWSx1DT6FuU V6zbfFGuh5B6ywnjDuzlBy7R4g/6NFBLgR0FacyKY7yd+8hoheHudnyfIcbblf/+nB95 2pyA== 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:from:date:dkim-signature; bh=P6b6IwD7Th4ZWgKtAqSNP+vLDIl0aNTTG6OHU1AkTm0=; fh=tT1xLpyX+/RKP2IcqK9IWhr+a17vK1CUq3DUagaYIO0=; b=PUopW5BuwRopXee4M/pfrfbB6VukCv+DRQC2crokftxzWe/d5Sx7wNPW9dW+TPDOdu PwHEgBjE0Ng5u8+8UIaVuASeoCgRjuyuo4cc+i7KC5ZaMm7YcB/PPz1vyo51tCDeJ2QH I2YeW7ZiLbxflgS4eAyhJbW8ULTwo9VyE7bzDKKIwjRRGPuAelVVY8O39goTtG6CzzMw sP6i3fjYCs4i1TwYWe/ZJ9WtLfRysaX1gcjsl4vC5NpMqPquUN7ljKR4N4Iz3GuHmlKH VUHejmc3+Ca0HRgsGwBG/RP4weDL3XmJ/Ai4N2TkGn3iPQRGY1dax8VY7Mb+OTyzPKrq cktA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F9FPvbKy; 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 k11-20020a170902c40b00b001bb42c27496si1285212plk.233.2023.07.20.09.10.12; Thu, 20 Jul 2023 09:10:31 -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=@kernel.org header.s=k20201202 header.b=F9FPvbKy; 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 S229914AbjGTPOQ (ORCPT + 99 others); Thu, 20 Jul 2023 11:14:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231465AbjGTPOP (ORCPT ); Thu, 20 Jul 2023 11:14:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF89A26B7; Thu, 20 Jul 2023 08:14:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8558F61B40; Thu, 20 Jul 2023 15:14:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7459C433C7; Thu, 20 Jul 2023 15:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689866053; bh=SYfNfhlOZs1q5RkjFnYWwaHIEk3S3ptpgkBUSyHPVoM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F9FPvbKy84f13PnvFGY9rliE0oVvRlk4NdpYAIpnfmGpeaW9fyY/cpBobj9rWYp6i PZjOg4Z2d40z7gEOO/acq2hPBeOK2Rttv64+wDmPy0j2wIkjeGIfzS65qJZpndg44l +6J+4XSRJeKyx2DEnM4HZThEmond57P1huiW8C9Ul72JHgneflt76RixZ+7r5LePiM DLtwOy/h9jNZXaAiT4s6p6kBuo7zo8S9vOwXx5oVc8dzwoiOHdp9W/oaTTFP7Ao06Q rslPvZodmeCqCgJdoEEkeEdFZYUdccLllSBP9pro/i3ATtR+F54GyOOL5ebxXBal10 hP7e9XDekWTNg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 5BA9140516; Thu, 20 Jul 2023 12:14:10 -0300 (-03) Date: Thu, 20 Jul 2023 12:14:10 -0300 From: Arnaldo Carvalho de Melo To: Anup Sharma Cc: Peter Zijlstra , Ingo Molnar , 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-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 Em Wed, Jul 19, 2023 at 04:34:28PM +0530, Anup Sharma escreveu: > 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 I see it in the cover letter, will try now. > > [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 > > -- - Arnaldo