RE: [PATCH 3/4] perf inject --jit: Remove //anon mmap events

From: Steve MacLean
Date: Tue Oct 29 2019 - 23:10:31 EST


> anyway, I wonder if you could just use thread::priv flag for that, like:
>
> thread = machine__findnew_thread(machine, pid, pid);
> if (!thread)
> bad
>
> (int) thread->priv = 1;
>
> and check on thread->priv when ruling the pid out, should be faster then maintain rb tree
>
> thanks,
> jirka

I agree reusing the existing data structure is a better approach. I have drafted a change reusing the void* priv field. It seems looks like it is currently safe to use during perf inject.

I will test it tomorrow then send the new patch