X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..14957cd040308e3eeec43d26bae5d76da13fcd85:/bytecode/SamplingTool.cpp?ds=inline diff --git a/bytecode/SamplingTool.cpp b/bytecode/SamplingTool.cpp index 3f0babc..f47e698 100644 --- a/bytecode/SamplingTool.cpp +++ b/bytecode/SamplingTool.cpp @@ -43,7 +43,7 @@ namespace JSC { void SamplingFlags::sample() { - uint32_t mask = 1 << 31; + uint32_t mask = static_cast(1 << 31); unsigned index; for (index = 0; index < 32; ++index) { @@ -337,7 +337,7 @@ void SamplingTool::dump(ExecState* exec) if (blockPercent >= 1) { //Instruction* code = codeBlock->instructions().begin(); - printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_executable->sourceURL().UTF8String().c_str(), codeBlock->lineNumberForBytecodeOffset(exec, 0), record->m_sampleCount, m_sampleCount, blockPercent); + printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_executable->sourceURL().utf8().data(), codeBlock->lineNumberForBytecodeOffset(0), record->m_sampleCount, m_sampleCount, blockPercent); if (i < 10) { HashMap lineCounts; codeBlock->dump(exec); @@ -347,7 +347,7 @@ void SamplingTool::dump(ExecState* exec) int count = record->m_samples[op]; if (count) { printf(" [% 4d] has sample count: % 4d\n", op, count); - unsigned line = codeBlock->lineNumberForBytecodeOffset(exec, op); + unsigned line = codeBlock->lineNumberForBytecodeOffset(op); lineCounts.set(line, (lineCounts.contains(line) ? lineCounts.get(line) : 0) + count); } }