From 30f1c518d6cc7c7ca8c6c6e8cadbcdafab826ee6 Mon Sep 17 00:00:00 2001 From: Sidharth Kshatriya Date: Mon, 15 Apr 2024 13:35:57 +0530 Subject: [PATCH] Preserve the type of the trace time in Task::trace_time() FrameTime is a long (int64 in the trace) while trace_time() casts it to a u32. Preserve the original type by making the function return type FrameTime. --- src/Task.cc | 2 +- src/Task.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Task.cc b/src/Task.cc index 34a6051434a..85471278c8b 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -1974,7 +1974,7 @@ const string& Task::trace_dir() const { return trace->dir(); } -uint32_t Task::trace_time() const { +FrameTime Task::trace_time() const { const TraceStream* trace = trace_stream(); return trace ? trace->time() : 0; } diff --git a/src/Task.h b/src/Task.h index 25f219ce866..4259290a57e 100644 --- a/src/Task.h +++ b/src/Task.h @@ -704,7 +704,7 @@ class Task { * events. |task_time()| returns that "time" wrt this task * only. */ - uint32_t trace_time() const; + FrameTime trace_time() const; /** * Call this to reset syscallbuf_hdr->num_rec_bytes and zero out the data