Hmm, the profilers aren't guaranteed to notice every function call - if a
function is called just once, and it's very brief, the profiler might miss
that. So it would be dangerous to use that for removing functions.

I think something like the old approach would make sense to add. See for
example how SAFE_HEAP is now implemented, as a js-optimizer pass
(src/js-optimizer.js, look for "function safeHeap"). That pass replaces
some functions. For PGO, we'd want to just add a little code to the top of
each function, to note that it has been called.

On Thu, Oct 27, 2016 at 4:55 PM, caiiiycuk <[email protected]> wrote:

> What do you think it is possible to use built in profiler of firefox or
> chrome to record call statistics and then use output json file as alternate
> parameter for DEAD_FUNCTIONS.
> For example I get CPU-20161028T023927.cpuprofile from Google Chrome and
> then use it as -s DEAD_FUNCTIONS_EXCLUDE=CPU-20161028T023927.cpuprofile
>
> Is it useful? or I can just write extractor from profiler results and
> generate intersections with all functions from emscripten output, and then
> use this intersection in DEAD_FUNCTIONS
>
> среда, 26 октября 2016 г., 1:54:32 UTC+3 пользователь caiiiycuk написал:
>
>> Hi! i want to find dead functions like in PGO mode. But I saw that PGO is
>> not supported, is there are replacement for this mode in fastcomp?
>>
> --
> 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.

Reply via email to