Messages in this thread | | | Date | Mon, 29 Jul 2013 16:19:12 -0600 | From | David Ahern <> | Subject | Re: [PATCH V8 04/15] perf tools: change machine__findnew_thread() to set thread pid |
| |
On 7/28/13 4:43 AM, Adrian Hunter wrote:
>>> - thread = machine__findnew_thread(machine, event->ip.pid); >>> + thread = machine__findnew_thread(machine, event->ip.pid, >>> event->ip.pid); >> >> event->ip.tid? at a minimum current functionality is retained with >> machine__findnew_thread(machine, 0, event->ip.pid) > > perf tools records mmap information against the process's main thread > for which pid == tid. So the correct values are being passed here.
Yes. It's a case by case -- if you want syms use pid, otherwise use tid. It would be less confusing if the API was improved - always take pid and tid along with an arg that says 'want syms' or a separate function name. But I digress.
Looking at your patch does maintain the tid element so it should be fine. I ran a few tests with perf-script and the output is the same after the patch, so..
Acked-by: David Ahern <dsahern@gmail.com>
| |