From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbcLFDxG (ORCPT ); Mon, 5 Dec 2016 22:53:06 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34240 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790AbcLFDxE (ORCPT ); Mon, 5 Dec 2016 22:53:04 -0500 Subject: Re: [PATCH 03/10] perf sched timehist: Handle zero sample->tid properly To: Namhyung Kim , Arnaldo Carvalho de Melo References: <20161206034010.6499-1-namhyung@kernel.org> <20161206034010.6499-4-namhyung@kernel.org> Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Andi Kleen , Minchan Kim From: David Ahern Message-ID: Date: Mon, 5 Dec 2016 19:52:57 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161206034010.6499-4-namhyung@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/5/16 7:40 PM, Namhyung Kim wrote: > Sometimes samples have tid of 0 but non-0 pid. It ends up having a Any idea how that happens? > new thread of 0 tid/pid (instead of referring idle task) since tid is > used to search matching task. But I guess it's wrong to use 0 as a > tid when pid is set. This patch uses tid only if it has a non-zero > value or same as pid (of 0).