Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30033334rwd; Wed, 5 Jul 2023 23:12:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHf2VQvWAY37/QwwYOQWQXLFsqnlkMDg0O4R8GUWpfIKkszNVuPaaz6lbgO4I6GY7zln6Dg X-Received: by 2002:a05:6a20:160c:b0:125:928d:6745 with SMTP id l12-20020a056a20160c00b00125928d6745mr2025660pzj.15.1688623970168; Wed, 05 Jul 2023 23:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688623970; cv=none; d=google.com; s=arc-20160816; b=FBB+CpcehwYH85aoApLy0ELkB6RhDpYvnn4vQ1L6DmmWGjfpAn2Cov1J/xzJLW0TW7 N+HNtDdIj5mUVZ50iC9x6LaYC+5eICTz29O7vjsra+4DwLLiQ0ugo5QjXR9dQbIOXXX1 D54v/cXohL7vyTA2Zfj6c7ZOKqdETTGqJHIhKygF/OqYWzs0/8j7LsCYVECeBbsG6PgV 1CWh2WmXHmfdYz6bkyzfcNgQym+Jv9OWRBPeiEPH+rd/HYA8pNdUdalBdI4uFwFSQ4tr JjDeZVtrvXJonZ2RIm+w/WhQVTau0xclDJRWu2pyOVVAAgchPoD+RIDga89wSeroxH5F bodw== 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=E7xiv0nGDZmapp3XXtpADO4q1Q4qgXasj2kDERJ/0ME=; fh=M2Wb7ZmVzwfcnR5Fu72cJwECOoQLLjUEn+j0vvab/TY=; b=DoyJls8faAHQ2lHx3mnpk1wXPuGffSO8/3AVKohkaYvnH9ktf8oufMsjwoXZrcd0d+ B6+Q6ym4Oo1ZB14j0ZIPXKBUDiqpLjGGETnwj6iK5JSSyfZHno8G2JKKguLA70S5jnmP sOsMvisQ4vl95EdFVjHpFz6AuB1FLLWjQoBVdSGfLbb27aNgvIKp0H1s8g+b1ZTb6/rI DVQ3UeE67Cf0VgEYS5ua9ijL3xCbKiHhkxRbAyTuNiR2YHDZqbw0lx1ECx3tkyo/6WR6 8YjewAYwL2bAdr8vnySY1dpFUyFsxYTBTMiEV2xpl9709KO7IIhxjXDLjfBOKvJAsOHY f8kA== 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 ct18-20020a056a000f9200b00682ad23bb40si779557pfb.251.2023.07.05.23.12.36; Wed, 05 Jul 2023 23:12: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; 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 S232776AbjGFFrI convert rfc822-to-8bit (ORCPT + 99 others); Thu, 6 Jul 2023 01:47:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjGFFrH (ORCPT ); Thu, 6 Jul 2023 01:47:07 -0400 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF169110; Wed, 5 Jul 2023 22:47:05 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2b70404a5a0so3206941fa.2; Wed, 05 Jul 2023 22:47:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688622424; x=1691214424; 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=DAe3DO8JeNcAT9Td7jWMVHE4ZoYfI8wkTCrsNfJQcfM=; b=GhbHCYupYOMrEEjirznOd3DEYa4brv8qj80Cgb1WV7248yKunpWaIm/3jWIZAl6GPq NtrsEsM/curZy5sM1+KEE3PNGmXSW/YhJIw2HpOsnOmBLZcAAiAZqEiE46Mg2ooW2hMR hQoPPPRNrqK6xsEHNjWQFK8pS0oAcATIlTJa+C8nBuUj/YBy/QM4IguSpiANqgHuoOU1 3HU03eghv0j3GkBSnT0x0Jl3u6Ujh9Ku0tL6I5/7ToqhJuFslL+0hYHzgtGxnxSRYdYO /mxRYZft5y3HUVmFr2X+5jrWl3hUU8UZv97+gsoLb/KItaW40f9b+1Tqfd3tEHEMVrQx E0dg== X-Gm-Message-State: ABy/qLbmxYBqq5v4kFMwr41auvGD2QhhVaDTG7q+OJ5LVCjwebB6Q3mk HF0mKBVEgkb7HVtkcYICi4WrbGDWnGOMQeG3/sw= X-Received: by 2002:a05:6512:60f:b0:4f9:5196:5ed0 with SMTP id b15-20020a056512060f00b004f951965ed0mr878972lfe.7.1688622423686; Wed, 05 Jul 2023 22:47:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Wed, 5 Jul 2023 22:46:51 -0700 Message-ID: Subject: Re: [PATCH v2 3/7] scripts: python: create threads with schemas To: Anup Sharma Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, 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 On Wed, Jul 5, 2023 at 12:47 PM Anup Sharma wrote: > > 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': [], > + } It seems this function doesn't return anything. Can we have a complete definition? Otherwise it's hard to know how these tables are used. Thanks, Namhyung > > def _addThreadSample(pid, tid, threadName, time_stamp, stack): > thread = thread_map.get(tid) > -- > 2.34.1 >