That's very strange. Is it possible an older build is loaded by the
profiler (maybe it's in the cache?). Try building to a new name and
profiling that maybe.

To see exactly what's going on, you can run wasm-dis or wasm2wat to
disassemble the wasm file, and see if functions have names there. For
example, here is what things look like on a hello world program without and
with --profiling:

-  (import "wasi_snapshot_preview1" "fd_write" (func $fimport$0 (param i32
i32 i32 i32) (result i32)))
+  (import "wasi_snapshot_preview1" "fd_write" (func $__wasi_fd_write
(param i32 i32 i32 i32) (result i32)))

- (export "__wasm_call_ctors" (func $1))
+ (export "__wasm_call_ctors" (func $__wasm_call_ctors))

- (func $1 (; 6 ;)
+ (func $__wasm_call_ctors (; 6 ;)

-    (call $fimport$3)
+    (call $__handle_stack_overflow)

On Thu, Apr 2, 2020 at 11:40 PM Amit Gupta <[email protected]> wrote:

> Yes, I am using --profiling --profiling-funcs flags.
>
> On Thursday, 2 April 2020 16:29:29 UTC+5:30, Amit Gupta wrote:
>>
>> I am trying to profile my wasm build on Chrome using JavaScript Profiler.
>> The code itself is working fine. When I record a snapshot of page load and
>> analyse it, all the function names are coming to be <wasm-unnamed>. This is
>> happening 90% of times. 1-2 times, it worked fine. This is
>> causing ambiguous behaviour. I am using 1.38.28 version of emsdk and Chrome
>> version is Version 80.0.3987.162 (Official Build) (64-bit). Can someone
>> suggest what is happening here? Same issue is happening on Chrome Canary
>> and latest Edge browser too.
>>
> --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/1b90830d-7b30-432f-b7f3-6ef0a380d95b%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/1b90830d-7b30-432f-b7f3-6ef0a380d95b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpSr8bn3ZgTAXbTcrCS45-2Q821W2qFSL0BqSj%2BWnbAdWw%40mail.gmail.com.

Reply via email to