summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/trace.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/trace.cc b/runtime/trace.cc
index 1986eec353..50a179c59d 100644
--- a/runtime/trace.cc
+++ b/runtime/trace.cc
@@ -420,7 +420,7 @@ void Trace::Start(std::unique_ptr<File>&& trace_file_in,
if (the_trace_ != nullptr) {
LOG(ERROR) << "Trace already in progress, ignoring this request";
} else {
- enable_stats = (flags && kTraceCountAllocs) != 0;
+ enable_stats = (flags & kTraceCountAllocs) != 0;
the_trace_ = new Trace(trace_file.release(), buffer_size, flags, output_mode, trace_mode);
if (trace_mode == TraceMode::kSampling) {
CHECK_PTHREAD_CALL(pthread_create, (&sampling_pthread_, nullptr, &RunSamplingThread,
@@ -608,7 +608,7 @@ void Trace::Resume() {
Runtime* runtime = Runtime::Current();
// Enable count of allocs if specified in the flags.
- bool enable_stats = (the_trace->flags_ && kTraceCountAllocs) != 0;
+ bool enable_stats = (the_trace->flags_ & kTraceCountAllocs) != 0;
{
gc::ScopedGCCriticalSection gcs(self,