Expanding data section using bloaty

28 views
Skip to first unread message

rohitsa...@gmail.com

unread,
Apr 19, 2021, 8:52:02 AM4/19/21
to emscripten-discuss
Hi All,
I've created a .a file for my library using emscripten 1.38.28 and linked it with my module. On linking ,size of my wasm got increased more than I expected. While trying to do profiling using bloaty, I realised Data segment space got increased a lot in my new wasm as compared to the previous one. Following is the output of bloaty when I run 
./bloaty -d fullsymbols oldWasm -- newWasm

  +144%  +682Ki  [ = ]       0    Data

  +4.5%  +108Ki  [ = ]       0    Code

  +0.3% +12.7Ki  [ = ]       0    name

  +0.5%    +106  [ = ]       0    Function

  +5.0%     +99  [ = ]       0    Import

  +0.0%      +6  [ = ]       0    Element

  +1.6%      +1  [ = ]       0    Global

   +12%  +804Ki  [ = ]       0    TOTAL

But I am not able to see any detailed info about what's increasing the size of Data segment. Is there anyway I can see the expanded info about Data section mentioned above. Or what could be the reason of this increase. I used -O3 while compiling my .a file.


Regards,

Rohit Saini




Sam Clegg

unread,
Apr 19, 2021, 7:02:52 PM4/19/21
to emscripte...@googlegroups.com
You can use wasm-objdump or wasm-dis to see the actual data in the data section.. and maybe somehow create a diff.  Or at least you might be able to visually what data exists there.

However, my first piece of advice you be to upgrade from 1.38.28.  That version is extremely old now by emscripten standards and a lot has changed since then.  It will be easier to support you if you can upgrade to a 2.0.X version.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/893ead20-e8e7-4b9e-8cc9-47c0b7363738n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages