Ignore:
Timestamp:
Jan 16, 2009, 3:34:46 PM (16 years ago)
Author:
[email protected]
Message:

2009-01-16 Gavin Barraclough <[email protected]>

Reviewed by Geoff Garen.

Fixes for SamplingTool.

https://bugs.webkit.org/show_bug.cgi?id=23390

  • assembler/MacroAssembler.h: (JSC::MacroAssembler::storePtr):
  • bytecode/SamplingTool.cpp: (JSC::SamplingTool::run): (JSC::SamplingTool::dump):
  • bytecode/SamplingTool.h: (JSC::SamplingTool::encodeSample):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompile):
  • jit/JIT.h: (JSC::JIT::samplingToolTrackCodeBlock):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase):
  • jit/JITInlineMethods.h: (JSC::JIT::emitCTICall_internal):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/SamplingTool.cpp

    r39697 r39993  
    106106#if ENABLE(CODEBLOCK_SAMPLING)
    107107        MutexLocker locker(m_scopeSampleMapMutex);
    108         ScopeSampleRecord* record = m_scopeSampleMap->get(sample.codeBlock()->ownerNode);
     108        ScopeSampleRecord* record = m_scopeSampleMap->get(sample.codeBlock()->ownerNode());
    109109        ASSERT(record);
    110110        record->sample(sample.codeBlock(), sample.vPC());
     
    249249
    250250        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);
    253253            if (i < 10) {
    254254                HashMap<unsigned,unsigned> lineCounts;
     
    260260                    if (count) {
    261261                        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);
    265263                        lineCounts.set(line, (lineCounts.contains(line) ? lineCounts.get(line) : 0) + count);
    266264                    }
Note: See TracChangeset for help on using the changeset viewer.