Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29508089rwd; Wed, 5 Jul 2023 12:58:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MC/wq4UYC9GNWsgqfVM6rld7vzdvO2unD9NWq/YMqWzljSpHvZtqM0mh5scNDyLk3Fd+y X-Received: by 2002:a05:6a20:488:b0:116:e7d9:8df0 with SMTP id 8-20020a056a20048800b00116e7d98df0mr12640402pzc.51.1688587117832; Wed, 05 Jul 2023 12:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688587117; cv=none; d=google.com; s=arc-20160816; b=akcuag2If70tKa2nQWSCIVrIxt9GiWL54nNZN/pjvZF7t3cNbYmBCA5LN4QBUpe3+8 WM/KiYKuorOZIhC+4eEMXWB2cMQNDs4+o68QwxY30gQciwdudeHVcwne2KUwfWoreGd0 xCeKTEa63vdgOtwjZd/i9wM4vqcPQfA+K4WViEiDh+lRSUUYcGqyHD+7qPApOv+vT7uu +Z/LiCFT3jhZP/Akb/VqR41aBox+3By8/KTTlD4bFX5KoFxucCbELN5UfvtNl7RqZPg6 yqKSUlQuVz7fV3OhaZ/Y+ObsXxE+WSPXugxUG4SKNhIRAroEIifOvZFEN7Q0d5074EEi 7Fjg== 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:to:from:date:dkim-signature; bh=eVgKMbQsMcOPsIdlP9IfALADbyS9NwmXrwLOYeG98C0=; fh=miu3cw8xYFi2H2tJAofCZBjquDDC7gResINyUObPclM=; b=ooXvH0yKE5O793HQQtXTAoi/beL9e1RKJEnRG8IoVzgGwrxLECWebPVZjF7hrcXmaQ /05Ip06ejdOtZBTgqsBvZRRrnB+QbMZ8zSH1bosuG7ddswZz9KQNCJXeyNmo10X/92L9 q8yLDaCNVbF74v2CPpU+1W6nfCBjP+kCuwnXjrV6VjaLj/PbL683nYz6WtGqSxTVdmth d72I8eRy0tnnFZc1LP3L93aaQS/MEGGmxrMGpxPWilnNeAjexXpuZrRt9/UoKAlxx4Vk ACitZt4dVMohmsgFps5leXCx6iEls4FD81e4jCgbs6m+Jg1ewx0mPzAgzznVG0rUAm4a d51Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Sso1w05k; 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 c5-20020a6566c5000000b0055ad86f58fcsi21435279pgw.553.2023.07.05.12.58.22; Wed, 05 Jul 2023 12:58:37 -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=Sso1w05k; 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 S233301AbjGETrh (ORCPT + 99 others); Wed, 5 Jul 2023 15:47:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230135AbjGETrf (ORCPT ); Wed, 5 Jul 2023 15:47:35 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EAFCE3; Wed, 5 Jul 2023 12:47:35 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1b88e5b3834so18917555ad.3; Wed, 05 Jul 2023 12:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688586454; x=1691178454; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=eVgKMbQsMcOPsIdlP9IfALADbyS9NwmXrwLOYeG98C0=; b=Sso1w05kGo2fnbRz0gtCa4jHE7pHCkIUtUW3QZecc/R7sW9Q+LroXJYYhMo9PHeH+K 4mcsTVbjvwAQchMmJNoXOBj4RAqZOGjMcpXPbrte5OXx74pSPMQ/H7XY9ugof3GHShU/ szztPTrgvLDWqTYtjIeQB6UEsNqcmvxVsPRoz8t4+2zJL09qeASUPy3oHqjYeEIVNWLr XVMgTL54+KEabZHMnK46O73kLgdLNfyK+C9K9GrzRqjNNTxRZeFWJ6+WhQ35Tp4+8tLv +gGMyMr2KDlP0+Nw2OAkaT9OEOtCV3uEaFxJuleDZSOZyDCrbMjETslCFVv2hI53oiSy nwvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688586454; x=1691178454; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eVgKMbQsMcOPsIdlP9IfALADbyS9NwmXrwLOYeG98C0=; b=dnOadaks0evvhsTngRYumcdqdbT30JtGOy6enA8dluPjCn42N/KNZvPidzWa+X28ms 3pk9MzZtmNg2nHdI6N7OutFoTGdS6T7SC2HbcQVX3HWn9twhf+fY7VrQPFdvrXvXMeBk ohZtvQHY4BU51whco7px0n9sIQSHJ1k2T8DY1QMGvHOvkdZJi7E2Ojel3u4zKAOK/hq8 WVuuGDKBGhCcaGk5E251Vn11RacsW7NpDesCqY0WrBNBVIP9cnk9zPX0S/b3CW0Lkz5A xxyGekBT25JrJ65lTPwVFRrBeqCfp8Evo2iuXTD67q5AX6umkEOTqztNqEqCRQmcdknZ 5NDg== X-Gm-Message-State: ABy/qLaAuC8HBgac37ORN5XOkofn+M2ws+y4pSUJcq7bOUGC2X+F8rad Qeyv6kKQ58Slahob/dXAH6s= X-Received: by 2002:a17:903:41c7:b0:1b8:b433:7fa with SMTP id u7-20020a17090341c700b001b8b43307famr7220ple.13.1688586454487; Wed, 05 Jul 2023 12:47:34 -0700 (PDT) Received: from yoga ([2400:1f00:13:c628:31be:68ae:86f5:48b9]) by smtp.gmail.com with ESMTPSA id s12-20020a170902988c00b00198d7b52eefsm19333252plp.257.2023.07.05.12.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 12:47:34 -0700 (PDT) Date: Thu, 6 Jul 2023 01:17:26 +0530 From: Anup Sharma To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Anup Sharma , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/7] scripts: python: create threads with schemas 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 The markers structure defines the schema and data for thread markers, including fields such as 'name', 'startTime', 'endTime', 'phase', 'category', and 'data'. The samples structure defines the schema and data for thread samples, including fields such as 'stack', 'time', and 'responsiveness'. The frameTable structure defines the schema and data for frame information, including fields such as 'location', 'relevantForJS', 'innerWindowID', 'implementation', 'optimizations', 'line', 'column', 'category', and 'subcategory'. The purpose of this function is to create a new thread structure These structures provide a framework for storing and organizing information related to thread markers, samples, frame details, and stack information. Signed-off-by: Anup Sharma --- .../scripts/python/firefox-gecko-converter.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tools/perf/scripts/python/firefox-gecko-converter.py b/tools/perf/scripts/python/firefox-gecko-converter.py index 95b061a97cbc..e56864e78dc1 100644 --- a/tools/perf/scripts/python/firefox-gecko-converter.py +++ b/tools/perf/scripts/python/firefox-gecko-converter.py @@ -24,6 +24,47 @@ start_time = None def process_event(param_dict): global start_time global thread_map + def _createtread(name, pid, tid): + markers = { + 'schema': { + 'name': 0, + 'startTime': 1, + 'endTime': 2, + 'phase': 3, + 'category': 4, + 'data': 5, + }, + 'data': [], + } + samples = { + 'schema': { + 'stack': 0, + 'time': 1, + 'responsiveness': 2, + }, + 'data': [], + } + frameTable = { + 'schema': { + 'location': 0, + 'relevantForJS': 1, + 'innerWindowID': 2, + 'implementation': 3, + 'optimizations': 4, + 'line': 5, + 'column': 6, + 'category': 7, + 'subcategory': 8, + }, + 'data': [], + } + stackTable = { + 'schema': { + 'prefix': 0, + 'frame': 1, + }, + 'data': [], + } def _addThreadSample(pid, tid, threadName, time_stamp, stack): thread = thread_map.get(tid) -- 2.34.1