bnjbvr opened PR #3687 from profiling-trampolines
to main
:
This refactors the code as suggested to avoid duplication of demangling (and allows having a single crate depend on the demangling crate dependencies). Also implements supports for trampolines in vtune.
After poking at the code, my understanding was that
module.trampolines()
contained metadata about trampolines for exported wasm functions, whiletrampoline_load()
would be called for trampolines into and out of imported wasm functions. Is that true @alexcrichton? Weirdly enough, even by adding some println statements to check if those trampolines were generated, I could only see the printed messages formodule.trampolines()
, not for the other one. Am I missing something in there?
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Reading over this now, there's actually a fair bit supporting this map right here, but this map is only used for an assert that each item inserted is unique. I think that may mean perhaps that we could remove this entirely? (and not worry about
MethodKind
as a new enum)
bnjbvr updated PR #3687 from profiling-trampolines
to main
.
bnjbvr submitted PR review.
bnjbvr created PR review comment:
Indeed, the module id we feed ourselves and the signature index will always be different anyways, so this sanity check isn't worth the trouble.
Kept the mutex, though, because I'm unclear whether the ittapi function can be called from several threads at the same time :thinking:
bnjbvr updated PR #3687 from profiling-trampolines
to main
.
bnjbvr updated PR #3687 from profiling-trampolines
to main
.
bnjbvr updated PR #3687 from profiling-trampolines
to main
.
bnjbvr updated PR #3687 from profiling-trampolines
to main
.
bnjbvr requested alexcrichton for a review on PR #3687.
alexcrichton submitted PR review.
alexcrichton merged PR #3687.
Last updated: Dec 23 2024 at 12:05 UTC