Currently a DFG::Node exits and contributes profiling to the same CodeOrigin. Not only should we allow these origins to be different, but we want a node to have a set of CodeOrigins to which it supplies profiling.
I don't think we actually need there to be a set bigger than one for the profiling code origins.
Interestingly, the profiling code origin should also be the code origin we use for doing things like finding the global object. The exit target code origin is the only true special case.
Created attachment 207212 [details] the patch
Comment on attachment 207212 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=207212&action=review r=me > Source/JavaScriptCore/dfg/DFGNode.h:1388 > + // Code origin for profiling. > + CodeOrigin codeOriginForExitTarget; The JIT does this: 1712 m_codeOriginForExitTarget = m_currentNode->codeOriginForExitTarget; 1713 m_codeOriginForExitProfiling = m_currentNode->codeOrigin; So, I don't think this comment that says codeOriginForExitTarget is used for profiling is correct. > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:2875 > + CodeOrigin m_codeOriginForExitProfile; Can you pick either "ForExitProfile" or "ForExitProfiling", and use it everywhere?
(In reply to comment #4) > (From update of attachment 207212 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=207212&action=review > > r=me > > > Source/JavaScriptCore/dfg/DFGNode.h:1388 > > + // Code origin for profiling. > > + CodeOrigin codeOriginForExitTarget; > > The JIT does this: > > 1712 m_codeOriginForExitTarget = m_currentNode->codeOriginForExitTarget; > 1713 m_codeOriginForExitProfiling = m_currentNode->codeOrigin; > > So, I don't think this comment that says codeOriginForExitTarget is used for profiling is correct. Oops, I will fix. It should say "// Code origin for where the node exits to". > > > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:2875 > > + CodeOrigin m_codeOriginForExitProfile; > > Can you pick either "ForExitProfile" or "ForExitProfiling", and use it everywhere? Yeah, ForExitProfile it is.
Landed in http://trac.webkit.org/changeset/152954