Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twiggy dominators depth 1 doesn't add up to the whole file size #175

Closed
alexcrichton opened this issue Oct 5, 2018 · 2 comments
Closed
Assignees
Labels
assigned bug Something isn't working pr attached Pull Request created for this issue wasm

Comments

@alexcrichton
Copy link
Contributor

Using this wasm file you get:

$ twiggy dominators -d 1 foo.wasm
 Retained Bytes │ Retained % │ Dominator Tree
────────────────┼────────────┼────────────────────────────────────────
          84355 ┊     39.68% ┊ export "format"
          16045 ┊      7.55% ┊ "function names" subsection
          10997 ┊      5.17% ┊ table[0]
           3465 ┊      1.63% ┊ func[18]
           1836 ┊      0.86% ┊ func[86]
           1199 ┊      0.56% ┊ func[26]
           1059 ┊      0.50% ┊ func[104]
            965 ┊      0.45% ┊ func[2]
            710 ┊      0.33% ┊ func[96]
            340 ┊      0.16% ┊ func[149]
            327 ┊      0.15% ┊ func[150]
            261 ┊      0.12% ┊ func[158]
            140 ┊      0.07% ┊ func[52]
            140 ┊      0.07% ┊ func[74]
            138 ┊      0.06% ┊ func[155]
            137 ┊      0.06% ┊ func[50]
            125 ┊      0.06% ┊ func[92]
            117 ┊      0.06% ┊ func[119]
            106 ┊      0.05% ┊ func[14]
             87 ┊      0.04% ┊ func[108]
             75 ┊      0.04% ┊ func[146]
             70 ┊      0.03% ┊ func[201]
             63 ┊      0.03% ┊ export "__wbindgen_malloc"
             56 ┊      0.03% ┊ func[199]
             53 ┊      0.02% ┊ func[93]
             42 ┊      0.02% ┊ export "__wbindgen_global_argument_ptr"
             34 ┊      0.02% ┊ export "__wbindgen_free"
             28 ┊      0.01% ┊ export "__indirect_function_table"
             22 ┊      0.01% ┊ export "__heap_base"
             21 ┊      0.01% ┊ export "__data_end"
             12 ┊      0.01% ┊ func[87]
             11 ┊      0.01% ┊ export "memory"
              8 ┊      0.00% ┊ type[10]
              8 ┊      0.00% ┊ global[0]
              7 ┊      0.00% ┊ type[4]
              7 ┊      0.00% ┊ type[11]
              6 ┊      0.00% ┊ type[3]
              6 ┊      0.00% ┊ type[7]
              5 ┊      0.00% ┊ type[5]
              5 ┊      0.00% ┊ type[8]
              5 ┊      0.00% ┊ type[14]
              4 ┊      0.00% ┊ type[0]
              4 ┊      0.00% ┊ type[1]
              3 ┊      0.00% ┊ type[6]

The file itself is 212k bytes, but the numbers on the left don't seem to add up to that. Is some data left out by accident perhaps?

@fitzgen fitzgen added bug Something isn't working wasm labels Oct 5, 2018
@fitzgen
Copy link
Member

fitzgen commented Oct 5, 2018

This is most likely "garbage" that we can't figure out how it is referenced from any function. We should add some sort of total unreachable stuff row to this output.

@data-pup
Copy link
Member

Working on this now, pardon the delay! Took care of text output today, should be able to fix the csv and json output & put a PR for this up shortly!

@data-pup data-pup self-assigned this Feb 19, 2019
@data-pup data-pup added the pr attached Pull Request created for this issue label Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned bug Something isn't working pr attached Pull Request created for this issue wasm
Projects
None yet
Development

No branches or pull requests

3 participants