mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
[vm] Only support instruction tracing for DBC in debug mode.
Flutter uses DBC in release mode. dart-simdbc-checked linux-armv7hf ParticleSystemUpdate (Odroid-C2) -32.73% (-0.8 noise) Tracer (Odroid-C2) 17.72% (0.0 noise) StarryStrings (Odroid-C2) 45.95% (0.1 noise) Richards (Odroid-C2) 49.89% (0.1 noise) DeltaBlueClosures (Odroid-C2) 54.56% (0.1 noise) DeltaBlue (Odroid-C2) 54.27% (3.7 noise) ParticleSystemPaint (Odroid-C2) 56.29% (4.8 noise) Change-Id: I42f9697c7a66f2d8bfb665c32aed90e833d48a75 Reviewed-on: https://dart-review.googlesource.com/21283 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Zach Anderson <zra@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
d2579b6d3c
commit
4f612b749a
2 changed files with 7 additions and 7 deletions
|
@ -558,7 +558,7 @@ Simulator::Simulator() : stack_(NULL), fp_(NULL), pp_(NULL), argdesc_(NULL) {
|
|||
last_setjmp_buffer_ = NULL;
|
||||
top_exit_frame_info_ = 0;
|
||||
|
||||
NOT_IN_PRODUCT(icount_ = 0;)
|
||||
DEBUG_ONLY(icount_ = 0);
|
||||
}
|
||||
|
||||
Simulator::~Simulator() {
|
||||
|
@ -579,7 +579,7 @@ Simulator* Simulator::Current() {
|
|||
return simulator;
|
||||
}
|
||||
|
||||
#if !defined(PRODUCT)
|
||||
#if defined(DEBUG)
|
||||
// Returns true if tracing of executed instructions is enabled.
|
||||
DART_FORCE_INLINE bool Simulator::IsTracingExecution() const {
|
||||
return icount_ > FLAG_trace_sim_after;
|
||||
|
@ -595,7 +595,7 @@ DART_NOINLINE void Simulator::TraceInstruction(uint32_t* pc) const {
|
|||
THR_Print("Disassembler not supported in this mode.\n");
|
||||
}
|
||||
}
|
||||
#endif // !defined(PRODUCT)
|
||||
#endif // defined(DEBUG)
|
||||
|
||||
// Calls into the Dart runtime are based on this interface.
|
||||
typedef void (*SimulatorRuntimeCall)(NativeArguments arguments);
|
||||
|
@ -993,8 +993,8 @@ static DART_NOINLINE bool InvokeNativeAutoScopeWrapper(Thread* thread,
|
|||
|
||||
// Note: all macro helpers are intended to be used only inside Simulator::Call.
|
||||
|
||||
// Counts and prints executed bytecode instructions (in a non-PRODUCT mode).
|
||||
#if !defined(PRODUCT)
|
||||
// Counts and prints executed bytecode instructions (in DEBUG mode).
|
||||
#if defined(DEBUG)
|
||||
#define TRACE_INSTRUCTION \
|
||||
icount_++; \
|
||||
if (IsTracingExecution()) { \
|
||||
|
@ -1002,7 +1002,7 @@ static DART_NOINLINE bool InvokeNativeAutoScopeWrapper(Thread* thread,
|
|||
}
|
||||
#else
|
||||
#define TRACE_INSTRUCTION
|
||||
#endif // !defined(PRODUCT)
|
||||
#endif // defined(DEBUG)
|
||||
|
||||
// Decode opcode and A part of the given value and dispatch to the
|
||||
// corresponding bytecode handler.
|
||||
|
|
|
@ -98,7 +98,7 @@ class Simulator {
|
|||
|
||||
RawObject** fp_;
|
||||
uword pc_;
|
||||
NOT_IN_PRODUCT(uint64_t icount_;)
|
||||
DEBUG_ONLY(uint64_t icount_;)
|
||||
|
||||
SimulatorSetjmpBuffer* last_setjmp_buffer_;
|
||||
uword top_exit_frame_info_;
|
||||
|
|
Loading…
Reference in a new issue