Skip to content

Commit

Permalink
Add doc for source-map option to using.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
mason-lgtm committed Oct 1, 2024
1 parent 0fc4a54 commit 4ba799b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions doc/using.md
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,33 @@ $ ./bloaty -c config.bloaty -d bloaty_package,compileunits bloaty
100.0% 29.5Mi 100.0% 6.69Mi TOTAL
```

# Source maps

Bloaty provides a `--source-map` option which allows
specifying a source map for the binary. It takes an ID and
source map file name, separated by '='. The ID can be the
build ID or path to the binary file as specified in the
command line.

For example, to use the `compileunits` and `inlines` data
sources for Wasm, a source map must be provided. For Wasm,
the ID can be the text in the `sourceMappingURL` section of
the binary.

```cmdoutput
$ ./bloaty -d compileunits --domain=file --source-map=o.wasm=o.wasm.map o.wasm
FILE SIZE
--------------
45.0% 49 [section sourceMappingURL]
19.3% 21 Main.java
12.8% 14 [section Export]
7.3% 8 [WASM Header]
6.4% 7 [section Code]
5.5% 6 [section Type]
3.7% 4 [section Function]
100.0% 109 TOTAL
```

# Source filter

Sometimes, you are only interested in parts of the binary
Expand Down

0 comments on commit 4ba799b

Please sign in to comment.