I think --emit-symbol-map might help here, it will give you a file that maps the minified names to the original names.
It's odd that -profiling-funcs increases code size that much. it should just affect function names, which should be a small part of total code size. Perhaps look through emcc.py for where it's used, maybe profiling-funcs has another effect on optimizations. On Sun, Jul 23, 2017 at 11:43 AM, caiiiycuk <[email protected]> wrote: > Hi. I need some explanation about minify stage of native optimizer. I know > that when I use at least O2 flag all function names are mangled (minified). > Also I know that -g1 or -profiling-funcs permits name mangling. But in this > case result js file is much bigger. I wonder why there are no option to > provide source maps for mangled names in O2 mode. In that case I still can > use small js file + understandable function names in profiler. > > I trying to build my own profiler that works on js level. To do this I use > uglifyjs. I use it to parse emscripten js file, and modify all functions to > add time counters in their bodies. I can't use browser profiler, because on > ios it never works :(. I get the first version of my profiler, and it works > well! But I have problem with minifying transformed js. Uglifyjs, does > nothing. > > For example, I build project with -O2 the result is 8.6mb. I build it > again with -O2 -profiling-funcs the result is ~14mb. I get this js and use > uglifyjs to mangle names (-m flag), result still ~14mb. Why so? I except > that result should be near 8.6mb. > > Btw, to finish work with profiler I need to get mapping from O2 function > names to original names (like in -profiling-funcs mode). Is it possible to > generate it in some way? > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
