From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757149AbbJHMUS (ORCPT ); Thu, 8 Oct 2015 08:20:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43578 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753458AbbJHMUP (ORCPT ); Thu, 8 Oct 2015 08:20:15 -0400 Date: Thu, 8 Oct 2015 14:20:11 +0200 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML , Frederic Weisbecker , Stephane Eranian , David Ahern , Andi Kleen Subject: Re: [RFC/PATCH 15/38] perf tools: Introduce machine__find*_thread_by_time() Message-ID: <20151008122011.GB6784@krava.landal.opennet> References: <1443763159-29098-1-git-send-email-namhyung@kernel.org> <1443763159-29098-16-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443763159-29098-16-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 02, 2015 at 02:18:56PM +0900, Namhyung Kim wrote: SNIP > diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c > index 674792e8fa2f..ad7c2a00bff8 100644 > --- a/tools/perf/util/thread.c > +++ b/tools/perf/util/thread.c > @@ -160,6 +160,9 @@ int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp, > > /* Override the default :tid entry */ > if (!thread->comm_set) { > + if (!thread->start_time) > + thread->start_time = timestamp; > + > err = comm__override(curr, str, timestamp, exec); > if (err) > return err; > @@ -266,6 +269,7 @@ int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp) > } > > thread->ppid = parent->tid; > + thread->start_time = timestamp; > return thread__clone_map_groups(thread, parent); > } > > diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h > index b8f794d97b75..97026a9660ec 100644 > --- a/tools/perf/util/thread.h > +++ b/tools/perf/util/thread.h > @@ -28,6 +28,7 @@ struct thread { > bool dead; /* thread is in dead_threads list */ > struct list_head comm_list; > u64 db_id; > + u64 start_time; introducing start_time could be in separate patch would ease up the review a bit jirka