The sampling profile should have an option to sample from C frames.
Created attachment 300160 [details] WIP
Created attachment 300224 [details] Patch
Created attachment 300238 [details] Patch
Created attachment 300239 [details] Patch
Comment on attachment 300239 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=300239&action=review r=me > Source/JavaScriptCore/runtime/SamplingProfiler.cpp:228 > + resetAtMachineFrame(); I think you may want your own version of resetAtMachineFrame that also calls into the parent's version. The version here should probably veryify that: "isValidFramePointer(m_machineFrame)" > Source/JavaScriptCore/runtime/SamplingProfiler.cpp:608 > + stackTrace.frames.last().frameType = FrameType::Host; Why not add a new frame type? You can make the various functions that look at frame type for the inspector just skip over C frames for now. > Source/JavaScriptCore/runtime/SamplingProfiler.cpp:742 > +#if OS(DARWIN) > + if (Options::sampleCCode()) { > + const char* mangledName = nullptr; > + const char* cxaDemangled = nullptr; > + Dl_info info; > + if (dladdr(cCodePC, &info) && info.dli_sname) > + mangledName = info.dli_sname; > + if (mangledName) { > + cxaDemangled = abi::__cxa_demangle(mangledName, 0, 0, 0); > + return String(cxaDemangled ? cxaDemangled : mangledName); > + } > + } > +#endif Ditto about the FrameType.
Created attachment 300362 [details] Patch for landing
Created attachment 300364 [details] Patch for landing
Created attachment 300365 [details] Patch for landing
Comment on attachment 300365 [details] Patch for landing Clearing flags on attachment: 300365 Committed r211542: <http://trac.webkit.org/changeset/211542>
All reviewed patches have been landed. Closing bug.