From ed77855949f16ed571171cc67225fb879969c369 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 1 Feb 2018 11:24:13 +0000 Subject: [PATCH] instruments/trace-cmd: Only insert trace markers if enabled Check to see if the instrument is enabled before adding start and stop trace markers. --- wa/instruments/trace_cmd.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wa/instruments/trace_cmd.py b/wa/instruments/trace_cmd.py index fbc4a2ad..c2f5438e 100644 --- a/wa/instruments/trace_cmd.py +++ b/wa/instruments/trace_cmd.py @@ -222,7 +222,9 @@ class TraceCmdInstrument(Instrument): raise InstrumentError('trace-cmd is not in PATH; is it installed?') def mark_start(self, context): - self.collector.mark_start() + if self.is_enabled: + self.collector.mark_start() def mark_stop(self, context): - self.collector.mark_stop() + if self.is_enabled: + self.collector.mark_stop()