1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +00:00

instruments/trace-cmd: Only insert trace markers if enabled

Check to see if the instrument is enabled before adding start and stop
trace markers.
This commit is contained in:
Marc Bonnici 2018-02-01 11:24:13 +00:00 committed by setrofim
parent 9a556721b6
commit ed77855949

View File

@ -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()