Bug 944392 - Tracelogging: Move to vm subdirectory, r=till,bbouvier

--HG--
rename : js/src/TraceLogging.cpp => js/src/vm/TraceLogging.cpp
rename : js/src/TraceLogging.h => js/src/vm/TraceLogging.h
This commit is contained in:
Hannes Verschore 2014-04-09 14:21:20 +02:00
parent 3be7d6b7cd
commit a4b0c524bb
22 changed files with 38 additions and 32 deletions

View File

@ -8,7 +8,6 @@
#include "jscntxt.h"
#include "jsscript.h"
#include "TraceLogging.h"
#include "frontend/BytecodeEmitter.h"
#include "frontend/FoldConstants.h"
@ -16,6 +15,7 @@
#include "frontend/Parser.h"
#include "jit/AsmJSLink.h"
#include "vm/GlobalObject.h"
#include "vm/TraceLogging.h"
#include "jsobjinlines.h"
#include "jsscriptinlines.h"

View File

@ -7,13 +7,13 @@
#include "jit/Bailouts.h"
#include "jscntxt.h"
#include "TraceLogging.h"
#include "jit/BaselineJIT.h"
#include "jit/Ion.h"
#include "jit/IonSpewer.h"
#include "jit/JitCompartment.h"
#include "jit/Snapshots.h"
#include "vm/TraceLogging.h"
#include "jit/IonFrameIterator-inl.h"
#include "vm/Stack-inl.h"

View File

@ -12,6 +12,7 @@
#include "jit/IonSpewer.h"
#include "jit/Recover.h"
#include "vm/ArgumentsObject.h"
#include "vm/TraceLogging.h"
#include "jsscriptinlines.h"

View File

@ -16,6 +16,7 @@
# include "jit/PerfSpewer.h"
#endif
#include "jit/VMFunctions.h"
#include "vm/TraceLogging.h"
#include "jsscriptinlines.h"
@ -344,7 +345,7 @@ BaselineCompiler::emitPrologue()
if (needsEarlyStackCheck())
masm.bind(&earlyStackCheckFailed);
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
Register loggerReg = RegisterSet::Volatile().takeGeneral();
masm.Push(loggerReg);
@ -386,7 +387,7 @@ BaselineCompiler::emitEpilogue()
{
masm.bind(&return_);
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
Register loggerReg = RegisterSet::Volatile().takeGeneral();
masm.Push(loggerReg);

View File

@ -14,6 +14,7 @@
#include "jit/IonSpewer.h"
#include "jit/JitCommon.h"
#include "vm/Interpreter.h"
#include "vm/TraceLogging.h"
#include "jsgcinlines.h"
#include "jsobjinlines.h"

View File

@ -31,6 +31,7 @@
#include "jit/ParallelSafetyAnalysis.h"
#include "jit/RangeAnalysis.h"
#include "vm/ForkJoin.h"
#include "vm/TraceLogging.h"
#include "jsboolinlines.h"
@ -1287,7 +1288,7 @@ CodeGenerator::visitOsrEntry(LOsrEntry *lir)
masm.flushBuffer();
setOsrEntryOffset(masm.size());
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
if (gen->info().executionMode() == SequentialExecution) {
if (!emitTracelogStopEvent(TraceLogger::Baseline))
return false;
@ -6253,7 +6254,7 @@ CodeGenerator::generate()
if (!safepoints_.init(gen->alloc(), graph.totalSlotCount()))
return false;
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
if (!gen->compilingAsmJS() && gen->info().executionMode() == SequentialExecution) {
if (!emitTracelogScriptStart())
return false;
@ -6274,7 +6275,7 @@ CodeGenerator::generate()
return false;
}
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
Label skip;
masm.jump(&skip);
#endif
@ -6283,7 +6284,7 @@ CodeGenerator::generate()
masm.flushBuffer();
setSkipArgCheckEntryOffset(masm.size());
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
if (!gen->compilingAsmJS() && gen->info().executionMode() == SequentialExecution) {
if (!emitTracelogScriptStart())
return false;
@ -6482,7 +6483,7 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints)
if (patchableBackedges_.length() > 0)
ionScript->copyPatchableBackedges(cx, code, patchableBackedges_.begin());
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
for (uint32_t i = 0; i < patchableTraceLoggers_.length(); i++) {
patchableTraceLoggers_[i].fixup(&masm);

View File

@ -10,10 +10,9 @@
#include "mozilla/ThreadLocal.h"
#include "jscompartment.h"
#include "jsworkers.h"
#include "TraceLogging.h"
#include "jsprf.h"
#include "jsworkers.h"
#include "gc/Marking.h"
#include "jit/AliasAnalysis.h"
#include "jit/AsmJSModule.h"
@ -42,6 +41,7 @@
#include "jit/UnreachableCodeElimination.h"
#include "jit/ValueNumbering.h"
#include "vm/ForkJoin.h"
#include "vm/TraceLogging.h"
#include "jscompartmentinlines.h"
#include "jsgcinlines.h"

View File

@ -18,6 +18,7 @@
#include "jit/MIR.h"
#include "jit/ParallelFunctions.h"
#include "vm/ForkJoin.h"
#include "vm/TraceLogging.h"
#ifdef JSGC_GENERATIONAL
# include "jsgcinlines.h"
@ -1136,7 +1137,7 @@ MacroAssembler::printf(const char *output, Register value)
PopRegsInMask(RegisterSet::Volatile());
}
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
void
MacroAssembler::tracelogStart(Register logger, uint32_t textId)
{

View File

@ -10,7 +10,6 @@
#ifdef JS_ION
#include "jscompartment.h"
#include "TraceLogging.h"
#if defined(JS_CODEGEN_X86)
# include "jit/x86/MacroAssembler-x86.h"
@ -1123,7 +1122,7 @@ class MacroAssembler : public MacroAssemblerSpecific
void printf(const char *output);
void printf(const char *output, Register value);
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
void tracelogStart(Register logger, uint32_t textId);
void tracelogStart(Register logger, Register textId);
void tracelogStop(Register logger, uint32_t textId);

View File

@ -18,6 +18,7 @@
#include "jit/MIR.h"
#include "jit/MIRGraph.h"
#include "vm/Shape.h"
#include "vm/TraceLogging.h"
#include "jsscriptinlines.h"
@ -57,7 +58,7 @@ CodeGeneratorARM::generateEpilogue()
{
masm.bind(&returnLabel_);
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
if (!gen->compilingAsmJS() && gen->info().executionMode() == SequentialExecution) {
if (!emitTracelogStopEvent(TraceLogger::IonMonkey))
return false;

View File

@ -995,7 +995,7 @@ CodeGeneratorShared::addCacheLocations(const CacheLocationList &locs, size_t *nu
return firstIndex;
}
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
bool
CodeGeneratorShared::emitTracelogScript(bool isStart)

View File

@ -89,7 +89,7 @@ class CodeGeneratorShared : public LInstructionVisitor
// Patchable backedges generated for loops.
Vector<PatchableBackedgeInfo, 0, SystemAllocPolicy> patchableBackedges_;
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
js::Vector<CodeOffsetLabel, 0, SystemAllocPolicy> patchableTraceLoggers_;
js::Vector<CodeOffsetLabel, 0, SystemAllocPolicy> patchableTLScripts_;
#endif
@ -449,7 +449,7 @@ class CodeGeneratorShared : public LInstructionVisitor
virtual bool visitOutOfLineAbortPar(OutOfLineAbortPar *ool) = 0;
virtual bool visitOutOfLinePropagateAbortPar(OutOfLinePropagateAbortPar *ool) = 0;
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
protected:
bool emitTracelogScript(bool isStart);
bool emitTracelogTree(bool isStart, uint32_t textId);

View File

@ -15,6 +15,7 @@
#include "jit/IonLinker.h"
#include "jit/JitCompartment.h"
#include "jit/RangeAnalysis.h"
#include "vm/TraceLogging.h"
#include "jit/shared/CodeGenerator-shared-inl.h"
@ -48,7 +49,7 @@ CodeGeneratorX86Shared::generateEpilogue()
{
masm.bind(&returnLabel_);
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
if (!gen->compilingAsmJS() && gen->info().executionMode() == SequentialExecution) {
if (!emitTracelogStopEvent(TraceLogger::IonMonkey))
return false;

View File

@ -197,7 +197,6 @@
# include "jswin.h"
#endif
#include "prmjtime.h"
#include "TraceLogging.h"
#include "gc/FindSCCs.h"
#include "gc/GCInternals.h"
@ -213,6 +212,7 @@
#include "vm/ProxyObject.h"
#include "vm/Shape.h"
#include "vm/String.h"
#include "vm/TraceLogging.h"
#include "vm/WrapperObject.h"
#include "jsobjinlines.h"

View File

@ -12,11 +12,11 @@
#include "jsnativestack.h"
#include "prmjtime.h"
#include "TraceLogging.h"
#include "frontend/BytecodeCompiler.h"
#include "jit/IonBuilder.h"
#include "vm/Debugger.h"
#include "vm/TraceLogging.h"
#include "jscntxtinlines.h"
#include "jscompartmentinlines.h"

View File

@ -232,7 +232,7 @@ if CONFIG['MOZ_INSTRUMENTS']:
if CONFIG['ENABLE_TRACE_LOGGING']:
SOURCES += [
'TraceLogging.cpp',
'vm/TraceLogging.cpp',
]
if CONFIG['ENABLE_ION']:

View File

@ -29,7 +29,6 @@
#include "jsprf.h"
#include "jsscript.h"
#include "jsstr.h"
#include "TraceLogging.h"
#include "builtin/Eval.h"
#include "jit/BaselineJIT.h"
@ -38,6 +37,7 @@
#include "vm/Debugger.h"
#include "vm/Opcodes.h"
#include "vm/Shape.h"
#include "vm/TraceLogging.h"
#include "jsatominlines.h"
#include "jsboolinlines.h"

View File

@ -8,12 +8,11 @@
#include "mozilla/MemoryReporting.h"
#include "TraceLogging.h"
#include "frontend/TokenStream.h"
#include "vm/MatchPairs.h"
#include "vm/RegExpStatics.h"
#include "vm/StringBuffer.h"
#include "vm/TraceLogging.h"
#include "vm/Xdr.h"
#include "yarr/YarrSyntaxChecker.h"

View File

@ -72,7 +72,7 @@ PerThreadData::PerThreadData(JSRuntime *runtime)
ionTop(nullptr),
jitJSContext(nullptr),
jitStackLimit(0),
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
traceLogger(nullptr),
#endif
activation_(nullptr),

View File

@ -56,7 +56,7 @@ namespace js {
class PerThreadData;
class ThreadSafeContext;
class AutoKeepAtoms;
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
class TraceLogger;
#endif
@ -541,7 +541,7 @@ class PerThreadData : public PerThreadDataFriendFields
inline void setJitStackLimit(uintptr_t limit);
#if JS_TRACE_LOGGING
#ifdef JS_TRACE_LOGGING
TraceLogger *traceLogger;
#endif

View File

@ -4,16 +4,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "TraceLogging.h"
#include "vm/TraceLogging.h"
#include "mozilla/DebugOnly.h"
#include <string.h>
#include "jsapi.h"
#include "jsscript.h"
#include "mozilla/DebugOnly.h"
#include "vm/Runtime.h"
#include "jit/CompileWrappers.h"
#include "vm/Runtime.h"
using namespace js;