linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Add support for Firefox's gecko profile format
@ 2023-07-18 22:45 Anup Sharma
  2023-07-18 22:47 ` [PATCH v4 1/6] perf scripts python: Add initial script file with usage information Anup Sharma
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Anup Sharma @ 2023-07-18 22:45 UTC (permalink / raw)
  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,
	linux-kernel

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:
- 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

[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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-07-20 15:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 22:45 [PATCH v4 0/6] Add support for Firefox's gecko profile format Anup Sharma
2023-07-18 22:47 ` [PATCH v4 1/6] perf scripts python: Add initial script file with usage information Anup Sharma
2023-07-18 22:48 ` [PATCH v4 2/6] perf scripts python: Extact necessary information from process event Anup Sharma
2023-07-18 22:49 ` [PATCH v4 3/6] perf scripts python: Add classes and conversion functions Anup Sharma
2023-07-18 22:50 ` [PATCH v4 4/6] perf scripts python: Add trace end processing and PRODUCT and CATEGORIES information Anup Sharma
2023-07-20 15:09   ` Arnaldo Carvalho de Melo
2023-07-18 22:50 ` [PATCH v4 5/6] perf scripts python: implement internal get or create frame, stack and string function Anup Sharma
2023-07-18 22:52 ` [PATCH v4 6/6] perf scripts python: Implement add sample function and thread processing Anup Sharma
2023-07-20 15:13   ` Arnaldo Carvalho de Melo
2023-07-19 11:04 ` [PATCH v4 0/6] Add support for Firefox's gecko profile format Anup Sharma
2023-07-19 15:22   ` Ian Rogers
2023-07-19 21:21     ` Anup Sharma
2023-07-20 15:14   ` Arnaldo Carvalho de Melo
2023-07-20 15:36     ` Arnaldo Carvalho de Melo

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).