perf scripts python: Add classes and conversion functions
authorAnup Sharma <anupnewsmail@gmail.com>
Fri, 21 Jul 2023 17:53:19 +0000 (23:23 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 28 Jul 2023 22:01:16 +0000 (19:01 -0300)
commit5aacd7f08a3276f4fad729a600d51a1cc5d5191a
tree233aa37257e793a2e776becb7bfeed681648fc69
parent0a02e44cc2fe1657af1f2740cb9a1dcd8a9338cc
perf scripts python: Add classes and conversion functions

This commit introduces new classes and conversion functions to
facilitate the representation of Gecko profile information. The new
classes Frame, Stack, Sample, and Thread are added to handle specific
components of the profile data, also link to the origin docs has been
commented out.

Additionally, Inside the Thread class _to_json_dict() method has been
created that converts the current thread data into the corresponding
format expected by the GeckoThread JSON schema, as per the Gecko
profile format specification.

Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/ab7b40bd32df7101a6f8b4a3aa41570b63b831ac.1689961706.git.anupnewsmail@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/scripts/python/gecko.py