From 0fce4f435cb1a5e84ea924f0c16cc02e505533e1 Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Sat, 7 Feb 2015 15:58:23 +0100 Subject: [PATCH] tracing: fix "IP only" tracing Only tracing the instruction pointer was broken, memory accesses were always traced additionally. Found by Coverity Scan, CID 25495. Change-Id: Ideb66175865c85bcd48f4b3786d5d8f16810d4f1 --- src/plugins/tracing/TracingPlugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/tracing/TracingPlugin.cc b/src/plugins/tracing/TracingPlugin.cc index 07263476..225ec3f9 100644 --- a/src/plugins/tracing/TracingPlugin.cc +++ b/src/plugins/tracing/TracingPlugin.cc @@ -20,7 +20,7 @@ bool TracingPlugin::run() // ev_step is added in the first loop iteration - if (m_tracetype | TRACE_MEM) { + if (m_tracetype & TRACE_MEM) { simulator.addListener(&ev_mem); } if (m_protoStreamFile) { @@ -35,7 +35,7 @@ bool TracingPlugin::run() simtime_t prevtime = 0, curtime; simtime_diff_t deltatime; - bool record_first_ipevent = m_tracetype | TRACE_IP; + bool record_first_ipevent = m_tracetype & TRACE_IP; while (true) { if (!record_first_ipevent) {