linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Anup Sharma <anupnewsmail@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/7] scripts: python: create threads with schemas
Date: Wed, 5 Jul 2023 22:46:51 -0700	[thread overview]
Message-ID: <CAM9d7chnbr6LpLdv0AEaxu9kCL=tGB9PgdDgzatAawaKoPDimw@mail.gmail.com> (raw)
In-Reply-To: <d56fd5874314728e79c084e9d6ce805a24d61707.1688585597.git.anupnewsmail@gmail.com>

On Wed, Jul 5, 2023 at 12:47 PM Anup Sharma <anupnewsmail@gmail.com> 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 <anupnewsmail@gmail.com>
> ---
>  .../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
>

  reply	other threads:[~2023-07-06  5:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05 19:40 [PATCH v2 0/7] Add support for Firefox's gecko profile format Anup Sharma
2023-07-05 19:42 ` [PATCH v2 1/7] scripts: python: Extact necessary information from process event Anup Sharma
2023-07-06  5:35   ` Namhyung Kim
2023-07-07 21:12     ` Anup Sharma
2023-07-05 19:44 ` [PATCH v2 2/7] scripts: python: Introduce thread sample processing to create thread Anup Sharma
2023-07-06  5:42   ` Namhyung Kim
2023-07-10 21:51     ` Anup Sharma
2023-07-05 19:47 ` [PATCH v2 3/7] scripts: python: create threads with schemas Anup Sharma
2023-07-06  5:46   ` Namhyung Kim [this message]
2023-07-10 21:54     ` Anup Sharma
2023-07-05 19:48 ` [PATCH v2 4/7] scripts: python: implement get or create stack function Anup Sharma
2023-07-06  5:55   ` Namhyung Kim
2023-07-10 22:01     ` Anup Sharma
2023-07-05 19:48 ` [PATCH v2 5/7] scripts: python: implement get or create frame function Anup Sharma
2023-07-06  6:06   ` Namhyung Kim
2023-07-10 22:42     ` Anup Sharma
2023-07-05 19:49 ` [PATCH v2 6/7] scripts: python: implement add sample function and return finish Anup Sharma
2023-07-05 19:49 ` [PATCH v2 7/7] scripts: python: Add trace end processing and JSON output Anup Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM9d7chnbr6LpLdv0AEaxu9kCL=tGB9PgdDgzatAawaKoPDimw@mail.gmail.com' \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=anupnewsmail@gmail.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).