Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753384AbeAQOZ6 (ORCPT + 1 other); Wed, 17 Jan 2018 09:25:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:38394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbeAQOZ5 (ORCPT ); Wed, 17 Jan 2018 09:25:57 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1EDF20C0F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Wed, 17 Jan 2018 11:25:53 -0300 From: Arnaldo Carvalho de Melo To: Cheng Jian Cc: Jiri Olsa , peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, xiexiuqi@huawei.com, huawei.libin@huawei.com, wangnan0@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] perf/trace : Fix repetitious traces of perf on tracepoint Message-ID: <20180117142553.GA13639@kernel.org> References: <1516106438-4143-1-git-send-email-cj.chengjian@huawei.com> <20180116150622.GB17819@krava> <20180117133342.GH30880@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180117133342.GH30880@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Em Wed, Jan 17, 2018 at 10:33:42AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Jan 16, 2018 at 04:06:22PM +0100, Jiri Olsa escreveu: > > On Tue, Jan 16, 2018 at 08:40:38PM +0800, Cheng Jian wrote: > > > after this patch, perf script(parent-1040, child-1041): > > > test_fork 1040 [002] 36.536079: sched:sched_wakeup_new: comm=test_fork pid=1041 prio=120 target_cpu=003 > > > It will match it only once for tracing task(child-1041). > > > Signed-off-by: Cheng Jian > > the duplicated events are gone.. solution looks ok to me > > Reviewed-and-Tested-by: Jiri Olsa > I noticed that in the past as well, will try to test this too. Unpatched kernel: [root@jouet ~]# perf trace --no-syscalls -e sched:sched_wakeup_new time sleep 1 0.000 sched:sched_wakeup_new:time:13571 [120] success=1 CPU:003) 18446744073709.547 sched:sched_wakeup_new:time:13571 [120] success=1 CPU:003) 18446744073709.551 sched:sched_wakeup_new:time:13571 [120] success=1 CPU:003) 18446744073709.551 sched:sched_wakeup_new:time:13571 [120] success=1 CPU:003) 18446744073709.551 sched:sched_wakeup_new:time:13571 [120] success=1 CPU:003) 0.00user 0.00system 0:01.00elapsed 0%CPU (0avgtext+0avgdata 1996maxresident)k 0inputs+0outputs (0major+71minor)pagefaults 0swaps [root@jouet ~]# Patched kernel: [root@seventh ~]# perf trace --no-syscalls -e sched:sched_wakeup_new time sleep 1 0.000 sched:sched_wakeup_new:comm=time pid=339 prio=120 target_cpu=002) 0.001 sched:sched_wakeup_new:comm=time pid=339 prio=120 target_cpu=002) 0.00user 0.00system 0:01.00elapsed 0%CPU (0avgtext+0avgdata 2084maxresident)k 0inputs+0outputs (0major+75minor)pagefaults 0swaps [root@seventh ~]#