RESOLVED FIXED Bug 118946
fourthTier: It should be possible for a DFG::Node to claim to exit to one CodeOrigin, but then claim that it belongs to a different CodeOrigin for all other purposes
https://bugs.webkit.org/show_bug.cgi?id=118946
Summary fourthTier: It should be possible for a DFG::Node to claim to exit to one Cod...
Filip Pizlo
Reported 2013-07-20 16:47:18 PDT
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.
Attachments
the patch (14.70 KB, patch)
2013-07-21 12:30 PDT, Filip Pizlo
ggaren: review+
Filip Pizlo
Comment 1 2013-07-21 11:38:37 PDT
I don't think we actually need there to be a set bigger than one for the profiling code origins.
Filip Pizlo
Comment 2 2013-07-21 11:41:34 PDT
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.
Filip Pizlo
Comment 3 2013-07-21 12:30:37 PDT
Created attachment 207212 [details] the patch
Geoffrey Garen
Comment 4 2013-07-21 16:16:01 PDT
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?
Filip Pizlo
Comment 5 2013-07-21 16:25:20 PDT
(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.
Filip Pizlo
Comment 6 2013-07-21 16:41:15 PDT
Note You need to log in before you can comment on or make changes to this bug.