From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751929AbeAIJQC (ORCPT + 1 other); Tue, 9 Jan 2018 04:16:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58724 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbeAIJPz (ORCPT ); Tue, 9 Jan 2018 04:15:55 -0500 Date: Tue, 9 Jan 2018 10:15:51 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Peter Zijlstra , lkml , Ingo Molnar , David Ahern , Andi Kleen , Alexander Shishkin , kernel-team@lge.com Subject: Re: [PATCH 12/12] perf report: Add --task option to display monitored tasks Message-ID: <20180109091551.GA11520@krava> References: <20180107160356.28203-1-jolsa@kernel.org> <20180107160356.28203-13-jolsa@kernel.org> <20180109015607.GA7138@sejong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180109015607.GA7138@sejong> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 09 Jan 2018 09:15:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 09, 2018 at 10:56:07AM +0900, Namhyung Kim wrote: SNIP > > +static struct task *task_list(struct task *task, struct machine *machine) > > +{ > > + struct thread *parent_thread, *thread = task->thread; > > + struct task *parent_task; > > + > > + /* Already listed. */ > > + if (!list_empty(&task->list)) > > + return NULL; > > + > > + /* Last one in the chain. */ > > + if (thread->ppid == -1) > > + return task; > > + > > + parent_thread = machine__findnew_thread(machine, -1, thread->ppid); > > I think it should be machine__find_thread() since creating a new > thread at this stage would lack thread->priv anyway. ugh, that's right.. I tried to stay safe, but the NULL in priv would bring it down anyway Arnaldo, I already see changed version on top of your branch, please let me know if you make also this change or I should send v2 thanks, jirka