From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751312AbdJYLHc (ORCPT ); Wed, 25 Oct 2017 07:07:32 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8989 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747AbdJYLHa (ORCPT ); Wed, 25 Oct 2017 07:07:30 -0400 Subject: Re: [PATCH] perf/tools : remove default system_wide in sched record To: Namhyung Kim , Arnaldo Carvalho de Melo CC: , , , , , , , , References: <1508831134-151993-1-git-send-email-cj.chengjian@huawei.com> <20171024134644.GF7045@kernel.org> <20171025022326.GD12785@sejong> From: "chengjian (D)" Message-ID: Date: Wed, 25 Oct 2017 19:03:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171025022326.GD12785@sejong> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.219.85] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.59F06F81.01F8,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 72e0913eabedec1e55fe84a359d3a601 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/10/25 10:23, Namhyung Kim wrote: > On Tue, Oct 24, 2017 at 10:46:44AM -0300, Arnaldo Carvalho de Melo wrote: >> Em Tue, Oct 24, 2017 at 03:45:34PM +0800, Cheng Jian escreveu: >>> When running perf sched record, there is a bug. >>> >>> It's system_wide when we specify a command line. >> Humm, isn't this because if you trace just a workload you will miss the >> sched-in events? >> >> Perhaps with PERF_RECORD_SWITCH we can solve that... I.e. still get the >> sched-in events while tracing just one workload, not requiring >> system_wide like it is the case now, right? > Yes, but it will lose other task's comm, also (at least) sched-wakeup > (from other task) events are still needed. > > Thanks, > Namhyung > I found that if the parameters -p and -a were specified at the same time, PID/TID(-p/-t) would overwrite SYSTEM_WIDE (-a) in target__validate( ). If we don't specify a process(-p) or a workload, it will make system wide (-a) as the default target. /* Make system wide (-a) the default target. */ if (!argc && target__none(&rec->opts.target)) rec->opts.target.system_wide = true; So don't -a and -p should have the same operation and feedback? It also lose some events when use -p.