Received: by 10.223.185.116 with SMTP id b49csp8783633wrg; Fri, 2 Mar 2018 07:55:40 -0800 (PST) X-Google-Smtp-Source: AG47ELv1OKB58sHkTePXwsumbueOdLvQk5zvVXD+eojf9qWaKACATqImnoCzSbHnPZ+TFL9RC/Dp X-Received: by 10.101.102.83 with SMTP id z19mr4793824pgv.75.1520006140209; Fri, 02 Mar 2018 07:55:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520006140; cv=none; d=google.com; s=arc-20160816; b=eCxXgQJ8cqtLVFAv/R/r6Vyt65wZL+crf84qYyIboAuLfYtZ0vPNZ2gPxQx816J4l+ R1FNcwrMFUMSuAE6azVC5C4yVgqhyvANY62Iu6mWDOD1JHDCtbcRjcfrHd/zsRvh4fgu 7NnsMKCp2wMZ4hBx5SYBL1tsJPQ1oW7ILsEopjdCcc0iHyo2bgNDB2lg5XZLDCAlwvr6 B3pQvM6X9zZ7G4T29x8O+i48MHkJNtxNmogt8Ul7Mf9PqHi3QcD25i+ZTQXJO1vFoaPj GOjT2+S9kQt23BvdSVth5TZSTBL6WFJtZnXG8t8/G4qVB9JVZqRaNhIbdNNPIB2EPUUQ WS2A== 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:dkim-signature:arc-authentication-results; bh=x5JS6IcEm9ahcNTPfwn8GA2+Z1x4MvSMRVXnrAJUtaw=; b=IsFwaNMaUuGCKkrET4/ctWKKgz8H4epRvPKDx9EHr2LKYNFTrB+Q0aiiwXvAd4vGnF 2nEM1jsX2LfH3Sq/eTdRo2sV1pNrtlfJcyhQIJFCPpvEEfv+NBWnnjTNRUrDj4tOgEDi dsc+RhkvLYL9fxVg/kztXiTPnM8APejQimYhYqK6SSOnWPGWtiXe46Qoaxfubhpttgi5 4RAKNeOL5Op/r6HLKWzFHELysSyi/+JTw9ug8RenfYIA1k+o3zfRHwevkpwiq0OgxnoZ BIPR/MpC+dSiF2iuB/Hk+pCn449SSmmqSye61LXxMzYlKyfbbJtsorGDlsj4qbJ+GfJH x68w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=PqTnj4uz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 94-v6si4949682pla.215.2018.03.02.07.55.25; Fri, 02 Mar 2018 07:55:40 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=PqTnj4uz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1428741AbeCBOux (ORCPT + 99 others); Fri, 2 Mar 2018 09:50:53 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:35045 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426414AbeCBOuv (ORCPT ); Fri, 2 Mar 2018 09:50:51 -0500 Received: by mail-pl0-f66.google.com with SMTP id bb3-v6so5821313plb.2; Fri, 02 Mar 2018 06:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=x5JS6IcEm9ahcNTPfwn8GA2+Z1x4MvSMRVXnrAJUtaw=; b=PqTnj4uzhMCvmPz8qYn+XbjkAuZRnkRJejpqZGIUPbEdYjJxm3+Z7+ZrP9e1w6w8Le TIZaSiBVDMW/mXwlJc6RY1GYza0SJhJ6Z+vr/cEzuHraq+6K6jglkHfRoaflYAy1KZho YjiYdHBNNZtXfOtFASqYQSOhG5ouGwBdfVLl+zEi8J9jxDbwJwDgOtbSz/DuaXNAUxje Te53UXa9iHjbH26O7TJJue7bzntCOBpVRU8zQk8458R2C4nrPJkwyzk1hjAYbF6OFZCr ryOgOzM2TKyXRAup+E3M+rrIj8lfaEH3GXPd7XBhQ4HsbaCEqJFzumE+Mo/mXzkKYHKQ KADg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=x5JS6IcEm9ahcNTPfwn8GA2+Z1x4MvSMRVXnrAJUtaw=; b=QcGX4JnDCIcb2/bl8Q9AXgfcK2kVlqO7BpEKrreBqoFPBc/eTXvfzHcWqYQgKx0UuD N7T07aIZTYAwSHF4tVz0f2Bo6xj2N4AGe62XThOWkDDoaPgCURXMuBupeY/zWkElnvtC sAQl2DptIo8BZ4a/E0YDYB/k2zLIh9r3pXdOiiE4pJeuTAxg5gzRXA/sPYz6Dji9Z4SN OFMS4HoMEI3RHFEl+ABElnPWozBzAHe30vFoB4nhiU/ZFhog/MNSx8534NLOG1HjDdwg qwgC2++QPdsQ5+KRC3trVQTRWWtuVhAsDAirMsvVsvHE1aWkFlLXncOtzDMDeFfQqPQC Estw== X-Gm-Message-State: APf1xPAs2cYFS31P1ZMJPjjC6C5rNgjge5inxD8HgKDSx8DSaSfRbTXk thqgq+ka2bulXMxwuc8ezXkhwA== X-Received: by 2002:a17:902:8b88:: with SMTP id ay8-v6mr5503130plb.197.1520002251107; Fri, 02 Mar 2018 06:50:51 -0800 (PST) Received: from danjae.aot.lge.com ([220.120.166.216]) by smtp.gmail.com with ESMTPSA id w3sm13786535pfw.30.2018.03.02.06.50.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Mar 2018 06:50:50 -0800 (PST) Date: Fri, 2 Mar 2018 23:47:32 +0900 From: Namhyung Kim To: Jiri Olsa Cc: "Du, Changbin" , acme@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kernel-team@lge.com Subject: Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed Message-ID: <20180302144732.GA2471@danjae.aot.lge.com> References: <1519386040-25874-1-git-send-email-changbin.du@intel.com> <20180302105254.234axj7b3nixakav@intel.com> <20180302113845.GC16348@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180302113845.GC16348@krava> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Mar 02, 2018 at 12:38:45PM +0100, Jiri Olsa wrote: > 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.. 100% agreed. > on the other hand it's simple enough and looks > like generic solution would be more tricky What about adding perf_sched__process_comm() to set it in the thread::priv? Thanks, Namhyung