Changeset 39993 in webkit for trunk/JavaScriptCore/bytecode/SamplingTool.cpp
- Timestamp:
- Jan 16, 2009, 3:34:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/SamplingTool.cpp
r39697 r39993 106 106 #if ENABLE(CODEBLOCK_SAMPLING) 107 107 MutexLocker locker(m_scopeSampleMapMutex); 108 ScopeSampleRecord* record = m_scopeSampleMap->get(sample.codeBlock()->ownerNode );108 ScopeSampleRecord* record = m_scopeSampleMap->get(sample.codeBlock()->ownerNode()); 109 109 ASSERT(record); 110 110 record->sample(sample.codeBlock(), sample.vPC()); … … 249 249 250 250 if (blockPercent >= 1) { 251 Instruction* code = codeBlock->instructions().begin();252 printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_scope->sourceURL().UTF8String().c_str(), codeBlock->lineNumberForBytecodeOffset( 0), record->m_sampleCount, m_sampleCount, blockPercent);251 //Instruction* code = codeBlock->instructions().begin(); 252 printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_scope->sourceURL().UTF8String().c_str(), codeBlock->lineNumberForBytecodeOffset(exec, 0), record->m_sampleCount, m_sampleCount, blockPercent); 253 253 if (i < 10) { 254 254 HashMap<unsigned,unsigned> lineCounts; … … 260 260 if (count) { 261 261 printf(" [% 4d] has sample count: % 4d\n", op, count); 262 // It is okay to pass 0 as the CallFrame for lineNumberForBytecodeOffset since 263 // we ensure exception information when Sampling is enabled. 264 unsigned line = codeBlock->lineNumberForBytecodeOffset(0, op); 262 unsigned line = codeBlock->lineNumberForBytecodeOffset(exec, op); 265 263 lineCounts.set(line, (lineCounts.contains(line) ? lineCounts.get(line) : 0) + count); 266 264 }
Note:
See TracChangeset
for help on using the changeset viewer.