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

Steve MacLean
2019-10-30T03:10:29Z

> 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