Received: by 10.223.185.116 with SMTP id b49csp8741138wrg; Fri, 2 Mar 2018 07:11:04 -0800 (PST) X-Google-Smtp-Source: AG47ELvSwnizo6NByZuIQZgPdJbfB3KbFegklUDSLzZoiFF8fgSf1aDJupOYLPwpDfklNo1r1cLC X-Received: by 2002:a17:902:a981:: with SMTP id bh1-v6mr5282774plb.298.1520003464154; Fri, 02 Mar 2018 07:11:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520003464; cv=none; d=google.com; s=arc-20160816; b=GyAZ0jPco1VLXPrTBk64M256Ksk7mbjoCgi039I7bhhXAABLEEMuW5yimExOkmrsKM DlW7Q91lAXq/SNbeDecASLcQRIEOd0GS6zDvG+NWxGrUN7naeuBSdUP3usw8u2zolw5T Pk42M2bGDLgJ+591hmhYxhVuOcDQm+S7aFLbweD3XFqvCFr2xZTy70aQW+oJuIZe1QO4 sBZEuyyTtXwSK7xyWWQMmyMQ7Ex19jC4/k/cC4sgB9Yh0aLEBUCVs0DOj2sxpob9R4yJ NSby5Z8+Pk4lilKk3M0T0uQYPwJqm2Ci8k/9XsrvIJek3FtusWzM7u8PPSDy+g8jzXPi xaCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=mqOKFUp80SSE4Tc+HTTQCtuJQd+36ZNgRiQSjL6qicQ=; b=ttaWdR9wCmlhkANDsaGa7WD3sAkANCPLjzbbMH7xaZGvZXT1T4SHrc40uYpge4jLpJ n8NJaLaaSl8LY2aaA8KDWhgYfPD0i3j6hV480VuaVVGdk3ZCS0VQ+LNxokXZZNxa9/if 9TfwESSLqjG1shbMDK3Cb5cFtFe83zu3B2yJniVd99WL52InuOYNBEcxBw//k5OTh90a NshCt9c8eCeiF5ZiMKDYisTtJ6m/5MtB5+7Rh8NzLqJN/sYl7lEkZT3JXSo/n/LB6Hqm 0fXnc5KaF/NyumnEedPANES2ZhZix9kcQWRVZGuszg+GCMuGKhJMQqhwx7hgd0O96utY e0xQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si4782049plp.449.2018.03.02.07.10.49; Fri, 02 Mar 2018 07:11:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936217AbeCBLjE (ORCPT + 99 others); Fri, 2 Mar 2018 06:39:04 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40934 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S936005AbeCBLis (ORCPT ); Fri, 2 Mar 2018 06:38:48 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D85C940FB658; Fri, 2 Mar 2018 11:38:47 +0000 (UTC) Received: from krava (unknown [10.40.205.188]) by smtp.corp.redhat.com (Postfix) with SMTP id 459662026E0E; Fri, 2 Mar 2018 11:38:46 +0000 (UTC) Date: Fri, 2 Mar 2018 12:38:45 +0100 From: Jiri Olsa To: "Du, Changbin" Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed Message-ID: <20180302113845.GC16348@krava> References: <1519386040-25874-1-git-send-email-changbin.du@intel.com> <20180302105254.234axj7b3nixakav@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180302105254.234axj7b3nixakav@intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 02 Mar 2018 11:38:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 02 Mar 2018 11:38:47 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jolsa@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 02, 2018 at 06:52:54PM +0800, Du, Changbin wrote: > Hello, any comment? sry, overlooked this one SNIP > > diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c > > index 68b65b1..c660fe6 100644 > > --- a/tools/perf/util/thread.c > > +++ b/tools/perf/util/thread.c > > @@ -212,6 +212,7 @@ static int ____thread__set_comm(struct thread *thread, const char *str, > > unwind__flush_access(thread); > > } > > > > + thread->comm_changed = true; > > thread->comm_set = true; > > > > return 0; > > diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h > > index 40cfa36..b9a328b 100644 > > --- a/tools/perf/util/thread.h > > +++ b/tools/perf/util/thread.h > > @@ -27,6 +27,7 @@ struct thread { > > int cpu; > > refcount_t refcnt; > > char shortname[3]; > > + bool comm_changed; I don't like that it's in struct thread and set by generic function, and just one command (sched) checks/sets it back.. I'd rather see it in thread::priv area.. on the other hand it's simple enough and looks like generic solution would be more tricky Acked-by: Jiri Olsa jirka