From 777e605c7b883b18ba3f4da88908f405156ae898 Mon Sep 17 00:00:00 2001 From: Jamie Wong Date: Tue, 21 Aug 2018 09:55:06 -0700 Subject: [PATCH] Update README.md to link to wiki pages for import instructions Fixes #115 --- README.md | 62 ++++++++++++------------------------------------------- 1 file changed, 13 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 26153f5..e135e7d 100644 --- a/README.md +++ b/README.md @@ -22,57 +22,21 @@ Invoking `speedscope /path/to/profile` will load speedscope in your default brow ## Supported file formats -### Chrome +speedscope is designed to ingest profiles from a variety of different profilers for different programming languages & environments. Click the links below for documentation on how to import from a specific source. -Both the timeline format output by Chrome developers tools (https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference#save) and the `.cpuprofile` format output are supported. The `.cpuprofile` format is useful for viewing flamecharts generated by Node.js applications: -https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27 +- JavaScript + - [Importing from Chrome](https://github.com/jlfwong/speedscope/wiki/Importing-from-Chrome) + - [Importing from Firefox](https://github.com/jlfwong/speedscope/wiki/Importing-from-Firefox) + - [Importing from Node.js](https://github.com/jlfwong/speedscope/wiki/Importing-from-Node.js) +- Ruby + - [Importing from stackprof](https://github.com/jlfwong/speedscope/wiki/Importing-from-stackprof-(ruby)) + - [Importing from rbspy](https://github.com/jlfwong/speedscope/wiki/Importing-from-rbspy-(ruby)) +- Native code + - [Importing from Instruments.app](https://github.com/jlfwong/speedscope/wiki/Importing-from-Instruments.app) (macOS) + - [Importing from `perf`](https://github.com/jlfwong/speedscope/wiki/Importing-from-perf-(linux)) (linux) +- [Importing from custom sources](https://github.com/jlfwong/speedscope/wiki/Importing-from-custom-sources) -### Firefox - -The `profile.json` file format output by Firefox can be saved and import into speedscope: https://developer.mozilla.org/en-US/docs/Tools/Performance - -### Node - -If you record profiling information like so: - - node --prof /path/to/my/script.js - -Then this will generate one or more `isolate*.log` files. You can open -the resulting profile in speedscope by running the following command: - - node --prof-process --preprocess -j isolate*.log | speedscope - - -### Instruments.app - -You can import call trees from OSX Instruments.app into speedscope by -selecting a row in the "Profile" view and select "Edit -> Deep Copy" from the -menu then pasting directly into speedscope. This data contains only aggregate -statistics, so the "Time Order" view and the "Left Heavy" view will look very -similar. - -You can also import `.trace` files for time profiles by dragging them directly -into the browser from Chrome. - -### `stackprof` Ruby profiler - -If the `raw: true` flag is set when recording a dump, the resulting json dump can be imported into speedscope. - -### Linux `perf` - -You can import profiles recorded using `perf record` and formatted using `perf script`. - - perf record -a -F 999 -g -p PID > perf.data - perf script -i perf.data > profile.linux-perf.txt - -Then drop the resulting `perf.txt` into speedscope, or if you have speedscope installed -locally, you can run: - - perf record -a -F 999 -g -p PID > perf.data - perf script -i perf.data | speedscope - - -### `DTrace` - -If you process the output of `DTrace` first with Brendan Gregg's `stackcollapse-*.pl` scripts (https://github.com/brendangregg/FlameGraph#2-fold-stacks), the result can be imported into speedscope. +Contributions to add support for additional formats are welcome! See issues with the ["import source" tag](https://github.com/jlfwong/speedscope/issues?q=is%3Aissue+is%3Aopen+label%3A%22import+source%22) ## Importing via URL