@@ -49,7 +49,7 @@ CHIP_ERROR SilabsTracer::Init()
49
49
TraceBufferClear ();
50
50
51
51
// Initialize the time trackers
52
- memset (mTimeTrackers , 0 , sizeof (mTimeTrackers ));
52
+ memset (mLatestTimeTrackers , 0 , sizeof (mLatestTimeTrackers ));
53
53
memset (mWatermarks , 0 , sizeof (mWatermarks ));
54
54
55
55
return CHIP_NO_ERROR;
@@ -65,7 +65,7 @@ CHIP_ERROR SilabsTracer::StartWatermarksStorage(PersistentStorageDelegate * stor
65
65
void SilabsTracer::TimeTraceBegin (TimeTraceOperation aOperation)
66
66
{
67
67
// Log the start time of the operation
68
- auto & tracker = mTimeTrackers [static_cast <size_t >(aOperation)];
68
+ auto & tracker = mLatestTimeTrackers [static_cast <size_t >(aOperation)];
69
69
tracker.mStartTime = System::SystemClock ().GetMonotonicTimestamp ();
70
70
tracker.mOperation = aOperation;
71
71
tracker.mType = OperationType::kBegin ;
@@ -79,7 +79,7 @@ void SilabsTracer::TimeTraceBegin(TimeTraceOperation aOperation)
79
79
80
80
void SilabsTracer::TimeTraceEnd (TimeTraceOperation aOperation, CHIP_ERROR error)
81
81
{
82
- auto & tracker = mTimeTrackers [static_cast <size_t >(aOperation)];
82
+ auto & tracker = mLatestTimeTrackers [static_cast <size_t >(aOperation)];
83
83
tracker.mEndTime = System::SystemClock ().GetMonotonicTimestamp ();
84
84
tracker.mType = OperationType::kEnd ;
85
85
tracker.mError = error;
@@ -116,7 +116,7 @@ void SilabsTracer::TimeTraceEnd(TimeTraceOperation aOperation, CHIP_ERROR error)
116
116
117
117
void SilabsTracer::TimeTraceInstant (TimeTraceOperation aOperation, CHIP_ERROR error)
118
118
{
119
- auto & tracker = mTimeTrackers [ static_cast < size_t >(aOperation)] ;
119
+ TimeTracker tracker;
120
120
tracker.mStartTime = System::SystemClock ().GetMonotonicTimestamp ();
121
121
tracker.mEndTime = tracker.mStartTime ;
122
122
tracker.mOperation = aOperation;
0 commit comments