本文整理汇总了C++中dataLog函数的典型用法代码示例。如果您正苦于以下问题:C++ dataLog函数的具体用法?C++ dataLog怎么用?C++ dataLog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dataLog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dataLog
void VM::throwException(ExecState* exec, Exception* exception)
{
if (Options::breakOnThrow()) {
dataLog("In call frame ", RawPointer(exec), " for code block ", *exec->codeBlock(), "\n");
CRASH();
}
ASSERT(exec == topCallFrame || exec == exec->lexicalGlobalObject()->globalExec() || exec == exec->vmEntryGlobalObject()->globalExec());
interpreter->notifyDebuggerOfExceptionToBeThrown(exec, exception);
setException(exception);
}
示例2: switch
static const char *symbolLookupCallback(
void* opaque, uint64_t referenceValue, uint64_t* referenceType, uint64_t referencePC,
const char** referenceName)
{
// Set this if you want to debug an unexpected reference type. Currently we only encounter these
// if we try to disassemble garbage, since our code generator never uses them. These include things
// like PC-relative references.
static const bool crashOnUnexpected = false;
char* symbolString = static_cast<char*>(opaque);
switch (*referenceType) {
case LLVMDisassembler_ReferenceType_InOut_None:
return 0;
case LLVMDisassembler_ReferenceType_In_Branch:
*referenceName = 0;
*referenceType = LLVMDisassembler_ReferenceType_InOut_None;
snprintf(
symbolString, symbolStringSize, "0x%lx",
static_cast<unsigned long>(referenceValue));
return symbolString;
default:
if (crashOnUnexpected) {
dataLog("referenceValue = ", referenceValue, "\n");
dataLog("referenceType = ", RawPointer(referenceType), ", *referenceType = ", *referenceType, "\n");
dataLog("referencePC = ", referencePC, "\n");
dataLog("referenceName = ", RawPointer(referenceName), "\n");
RELEASE_ASSERT_NOT_REACHED();
}
*referenceName = "unimplemented reference type!";
*referenceType = LLVMDisassembler_ReferenceType_InOut_None;
snprintf(
symbolString, symbolStringSize, "unimplemented:0x%lx",
static_cast<unsigned long>(referenceValue));
return symbolString;
}
}
示例3: locker
void Worklist::enqueue(PassRefPtr<Plan> passedPlan)
{
RefPtr<Plan> plan = passedPlan;
MutexLocker locker(m_lock);
if (Options::verboseCompilationQueue()) {
dump(locker, WTF::dataFile());
dataLog(": Enqueueing plan to optimize ", plan->key(), "\n");
}
ASSERT(m_plans.find(plan->key()) == m_plans.end());
m_plans.add(plan->key(), plan);
m_queue.append(plan);
m_planEnqueued.signal();
}
示例4: ASSERT
void JITToDFGDeferredCompilationCallback::compilationDidComplete(
CodeBlock* codeBlock, CompilationResult result)
{
ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT);
if (Options::verboseOSR())
dataLog("Optimizing compilation of ", *codeBlock, " result: ", result, "\n");
if (result == CompilationSuccessful)
codeBlock->install();
codeBlock->alternative()->setOptimizationThresholdBasedOnCompilationResult(result);
}
示例5: coalesce
void coalesce()
{
unsigned moveIndex = m_worklistMoves.takeLastMove();
const MoveOperands& moveOperands = m_coalescingCandidates[moveIndex];
IndexType u = getAlias(moveOperands.srcIndex);
IndexType v = getAlias(moveOperands.dstIndex);
if (isPrecolored(v))
std::swap(u, v);
if (traceDebug)
dataLog("Coalescing move at index", moveIndex, " u = ", u, " v = ", v, "\n");
if (u == v) {
addWorkList(u);
if (traceDebug)
dataLog(" Coalesced\n");
} else if (isPrecolored(v) || m_interferenceEdges.contains(InterferenceEdge(u, v))) {
addWorkList(u);
addWorkList(v);
if (traceDebug)
dataLog(" Constrained\n");
} else if (canBeSafelyCoalesced(u, v)) {
combine(u, v);
addWorkList(u);
m_hasCoalescedNonTrivialMove = true;
if (traceDebug)
dataLog(" Safe Coalescing\n");
} else {
m_activeMoves.quickSet(moveIndex);
if (traceDebug)
dataLog(" Failed coalescing, added to active moves.\n");
}
}
示例6: dataLog
void CallLinkInfo::visitWeak(RepatchBuffer& repatchBuffer)
{
auto handleSpecificCallee = [&] (JSFunction* callee) {
if (Heap::isMarked(callee->executable()))
m_hasSeenClosure = true;
else
m_clearedByGC = true;
};
if (isLinked()) {
if (stub()) {
if (!stub()->visitWeak(repatchBuffer)) {
if (Options::verboseOSR()) {
dataLog(
"Clearing closure call from ", *repatchBuffer.codeBlock(), " to ",
listDump(stub()->variants()), ", stub routine ", RawPointer(stub()),
".\n");
}
unlink(repatchBuffer);
m_clearedByGC = true;
}
} else if (!Heap::isMarked(m_callee.get())) {
if (Options::verboseOSR()) {
dataLog(
"Clearing call from ", *repatchBuffer.codeBlock(), " to ",
RawPointer(m_callee.get()), " (",
m_callee.get()->executable()->hashFor(specializationKind()),
").\n");
}
handleSpecificCallee(m_callee.get());
unlink(repatchBuffer);
}
}
if (haveLastSeenCallee() && !Heap::isMarked(lastSeenCallee())) {
handleSpecificCallee(lastSeenCallee());
clearLastSeenCallee();
}
}
示例7: main
int main(int argc, char** argv)
{
WTF::initializeThreading();
if (argc != 8
|| !parseValue(argv[2], &numThreadGroups)
|| !parseValue(argv[3], &numThreadsPerGroup)
|| !parseValue(argv[4], &workPerCriticalSection)
|| !parseValue(argv[5], &workBetweenCriticalSections)
|| !parseValue(argv[6], &toyLockSpinLimit)
|| sscanf(argv[7], "%lf", &secondsPerTest) != 1)
usage();
if (rangeVariable) {
dataLog("Running with rangeMin = ", rangeMin, ", rangeMax = ", rangeMax, ", rangeStep = ", rangeStep, "\n");
for (unsigned value = rangeMin; value <= rangeMax; value += rangeStep) {
dataLog("Running with value = ", value, "\n");
*rangeVariable = value;
runEverything<Benchmark>(argv[1]);
}
} else
runEverything<Benchmark>(argv[1]);
for (auto& entry : results) {
printf("%s = {", entry.key.data());
bool first = true;
for (double value : entry.value) {
if (first)
first = false;
else
printf(", ");
printf("%.3lf", value);
}
printf("};\n");
}
return 0;
}
示例8: dataLog
JSValue ModuleLoaderObject::evaluate(ExecState* exec, JSValue key, JSValue moduleRecordValue)
{
if (Options::dumpModuleLoadingState())
dataLog("Loader [evaluate] ", printableModuleKey(exec, key), "\n");
JSGlobalObject* globalObject = exec->lexicalGlobalObject();
if (globalObject->globalObjectMethodTable()->moduleLoaderEvaluate)
return globalObject->globalObjectMethodTable()->moduleLoaderEvaluate(globalObject, exec, key, moduleRecordValue);
JSModuleRecord* moduleRecord = jsDynamicCast<JSModuleRecord*>(moduleRecordValue);
if (!moduleRecord)
return jsUndefined();
return moduleRecord->evaluate(exec);
}
示例9: GCPHASE
void Heap::visitException(HeapRootVisitor& visitor)
{
GCPHASE(MarkingException);
if (!m_vm->exception() && !m_vm->lastException())
return;
visitor.visit(m_vm->addressOfException());
visitor.visit(m_vm->addressOfLastException());
if (Options::logGC() == GCLogging::Verbose)
dataLog("Exceptions:\n", m_slotVisitor);
m_slotVisitor.donateAndDrain();
}
示例10: dataLog
void BlockDirectory::stopAllocatingForGood()
{
if (false)
dataLog(RawPointer(this), ": BlockDirectory::stopAllocatingForGood!\n");
m_localAllocators.forEach(
[&] (LocalAllocator* allocator) {
allocator->stopAllocatingForGood();
});
auto locker = holdLock(m_localAllocatorsLock);
while (!m_localAllocators.isEmpty())
m_localAllocators.begin()->remove();
}
示例11: dataLog
void BytecodeLivenessAnalysis::dumpResults()
{
CodeBlock* codeBlock = m_graph.codeBlock();
dataLog("\nDumping bytecode liveness for ", *codeBlock, ":\n");
Interpreter* interpreter = codeBlock->vm()->interpreter;
Instruction* instructionsBegin = codeBlock->instructions().begin();
unsigned i = 0;
for (BytecodeBasicBlock* block : m_graph) {
dataLogF("\nBytecode basic block %u: %p (offset: %u, length: %u)\n", i++, block, block->leaderOffset(), block->totalLength());
dataLogF("Successors: ");
for (unsigned j = 0; j < block->successors().size(); j++) {
BytecodeBasicBlock* successor = block->successors()[j];
dataLogF("%p ", successor);
}
dataLogF("\n");
if (block->isEntryBlock()) {
dataLogF("Entry block %p\n", block);
continue;
}
if (block->isExitBlock()) {
dataLogF("Exit block: %p\n", block);
continue;
}
for (unsigned bytecodeOffset = block->leaderOffset(); bytecodeOffset < block->leaderOffset() + block->totalLength();) {
const Instruction* currentInstruction = &instructionsBegin[bytecodeOffset];
dataLogF("Live variables: ");
FastBitVector liveBefore = getLivenessInfoAtBytecodeOffset(bytecodeOffset);
for (unsigned j = 0; j < liveBefore.numBits(); j++) {
if (liveBefore.get(j))
dataLogF("%u ", j);
}
dataLogF("\n");
codeBlock->dumpBytecode(WTF::dataFile(), codeBlock->globalObject()->globalExec(), instructionsBegin, currentInstruction);
OpcodeID opcodeID = interpreter->getOpcodeID(instructionsBegin[bytecodeOffset].u.opcode);
unsigned opcodeLength = opcodeLengths[opcodeID];
bytecodeOffset += opcodeLength;
}
dataLogF("Live variables: ");
FastBitVector liveAfter = block->out();
for (unsigned j = 0; j < liveAfter.numBits(); j++) {
if (liveAfter.get(j))
dataLogF("%u ", j);
}
dataLogF("\n");
}
}
示例12: arrayModeFromStructure
void ArrayProfile::computeUpdatedPrediction(CodeBlock* codeBlock, OperationInProgress operation)
{
const bool verbose = false;
if (m_lastSeenStructure) {
m_observedArrayModes |= arrayModeFromStructure(m_lastSeenStructure);
m_mayInterceptIndexedAccesses |=
m_lastSeenStructure->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero();
if (!codeBlock->globalObject()->isOriginalArrayStructure(m_lastSeenStructure))
m_usesOriginalArrayStructures = false;
if (!structureIsPolymorphic()) {
if (!m_expectedStructure)
m_expectedStructure = m_lastSeenStructure;
else if (m_expectedStructure != m_lastSeenStructure) {
if (verbose)
dataLog(*codeBlock, " bc#", m_bytecodeOffset, ": making structure polymorphic because ", RawPointer(m_expectedStructure), " (", m_expectedStructure->classInfo()->className, ") != ", RawPointer(m_lastSeenStructure), " (", m_lastSeenStructure->classInfo()->className, ")\n");
m_expectedStructure = polymorphicStructure();
}
}
m_lastSeenStructure = 0;
}
if (hasTwoOrMoreBitsSet(m_observedArrayModes)) {
if (verbose)
dataLog(*codeBlock, " bc#", m_bytecodeOffset, ": making structure polymorphic because two or more bits are set in m_observedArrayModes\n");
m_expectedStructure = polymorphicStructure();
}
if (operation == Collection
&& expectedStructure()
&& !Heap::isMarked(m_expectedStructure)) {
if (verbose)
dataLog(*codeBlock, " bc#", m_bytecodeOffset, ": making structure during GC\n");
m_expectedStructure = polymorphicStructure();
}
}
示例13: moduleLoaderObjectModuleDeclarationInstantiation
EncodedJSValue JSC_HOST_CALL moduleLoaderObjectModuleDeclarationInstantiation(ExecState* exec)
{
JSModuleRecord* moduleRecord = jsDynamicCast<JSModuleRecord*>(exec->argument(0));
if (!moduleRecord)
return JSValue::encode(jsUndefined());
if (Options::dumpModuleLoadingState())
dataLog("Loader [link] ", moduleRecord->moduleKey(), "\n");
moduleRecord->link(exec);
if (exec->hadException())
return JSValue::encode(jsUndefined());
return JSValue::encode(jsUndefined());
}
示例14: moduleLoaderPrototypeModuleDeclarationInstantiation
EncodedJSValue JSC_HOST_CALL moduleLoaderPrototypeModuleDeclarationInstantiation(ExecState* exec)
{
VM& vm = exec->vm();
auto scope = DECLARE_THROW_SCOPE(vm);
JSModuleRecord* moduleRecord = jsDynamicCast<JSModuleRecord*>(vm, exec->argument(0));
if (!moduleRecord)
return JSValue::encode(jsUndefined());
if (Options::dumpModuleLoadingState())
dataLog("Loader [link] ", moduleRecord->moduleKey(), "\n");
moduleRecord->link(exec);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
return JSValue::encode(jsUndefined());
}
示例15: dataLog
void ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete(
CodeBlock* codeBlock, CompilationResult result)
{
if (Options::verboseOSR()) {
dataLog(
"Optimizing compilation of ", *codeBlock, " (for ", *m_dfgCodeBlock,
") result: ", result, "\n");
}
if (result == CompilationSuccessful)
m_dfgCodeBlock->jitCode()->dfg()->osrEntryBlock = codeBlock;
// FIXME: if we failed, we might want to just turn off OSR entry rather than
// totally turning off tier-up.
m_dfgCodeBlock->jitCode()->dfg()->setOptimizationThresholdBasedOnCompilationResult(
m_dfgCodeBlock.get(), result);
}