[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250829124922.6826cfe6@gandalf.local.home>
Date: Fri, 29 Aug 2025 12:49:22 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Steven Rostedt <rostedt@...nel.org>, Arnaldo Carvalho de Melo
<arnaldo.melo@...il.com>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, bpf@...r.kernel.org, x86@...nel.org,
Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>, Jiri
Olsa <jolsa@...nel.org>, Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Andrii Nakryiko <andrii@...nel.org>, Indu Bhagat <indu.bhagat@...cle.com>,
"Jose E. Marchesi" <jemarch@....org>, Beau Belgrave
<beaub@...ux.microsoft.com>, Jens Remus <jremus@...ux.ibm.com>, Andrew
Morton <akpm@...ux-foundation.org>, Florian Weimer <fweimer@...hat.com>,
Sam James <sam@...too.org>, Kees Cook <kees@...nel.org>, "Carlos O'Donell"
<codonell@...hat.com>
Subject: Re: [PATCH v6 5/6] tracing: Show inode and device major:minor in
deferred user space stacktrace
On Fri, 29 Aug 2025 09:28:41 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> Don't try to "reuse" hashes. Just treat them as opaque numbers.
What do I use to make the hash?
One thing this is trying to do is not have to look up the path name for
every line of a stack trace.
I could just have every instance do the full look up, make a hash from the
path name and build id, and pass the hash to the caller. My worry is the
time it takes to generate that.
Perhaps I could have a hash that maps the pid with the vma->vm_start, and
if that's unique, get the path and build-id and create the hash for that
and send it back to the user. Save the hash for that mapping in the
rhashtable with the pid/vm_start as the key.
Then the code that adds the vma, will see if the pid/vma->start exists, if
it does, return the hash associated with that, if it does not, add it and
trigger the event that a new address has been created.
-- Steve
Powered by blists - more mailing lists