[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250417101804.3117e478@gandalf.local.home>
Date: Thu, 17 Apr 2025 10:18:04 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tracing: Record trace_clock and recover when reboot
On Thu, 17 Apr 2025 14:17:29 +0900
"Masami Hiramatsu (Google)" <mhiramat@...nel.org> wrote:
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -6004,6 +6004,7 @@ struct trace_mod_entry {
> };
>
> struct trace_scratch {
> + char clock[TRACE_CLOCK_NAME_MAX];
> unsigned long text_addr;
> unsigned long nr_entries;
> struct trace_mod_entry entries[];
> @@ -6114,6 +6115,8 @@ static void update_last_data(struct trace_array *tr)
> if (tr->scratch) {
> struct trace_scratch *tscratch = tr->scratch;
>
> + strscpy(tscratch->clock, trace_clocks[tr->clock_id].name,
Why copy the name and not the clock_id?
The clock ids should not change between kernels.
-- Steve
> + TRACE_CLOCK_NAME_MAX);
> memset(tscratch->entries, 0,
> flex_array_size(tscratch, entries, tscratch->nr_entries));
> tscratch->nr_entries = 0;
Powered by blists - more mailing lists