From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756589AbcAIQfD (ORCPT ); Sat, 9 Jan 2016 11:35:03 -0500 Received: from terminus.zytor.com ([198.137.202.10]:42109 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755926AbcAIQfA (ORCPT ); Sat, 9 Jan 2016 11:35:00 -0500 Date: Sat, 9 Jan 2016 08:34:43 -0800 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: adrian.hunter@intel.com, wangnan0@huawei.com, namhyung@kernel.org, tglx@linutronix.de, acme@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com, mingo@kernel.org, hpa@zytor.com, jolsa@redhat.com Reply-To: acme@redhat.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, jolsa@redhat.com, adrian.hunter@intel.com, wangnan0@huawei.com, namhyung@kernel.org, tglx@linutronix.de To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tests: No need to set attr.sample_freq for tracking !PERF_RECORD_SAMPLE Git-Commit-ID: 239849dde350c9f7356974ca4f62171f50a2c86e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 239849dde350c9f7356974ca4f62171f50a2c86e Gitweb: http://git.kernel.org/tip/239849dde350c9f7356974ca4f62171f50a2c86e Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 7 Jan 2016 16:51:58 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 7 Jan 2016 16:51:58 -0300 perf tests: No need to set attr.sample_freq for tracking !PERF_RECORD_SAMPLE We were asking for a 4kHz sample_freq, making the test fail needlessly when the system reduced /proc/sys/kernel/perf_event_max_sample_rate below that. Before: # perf test -vv dummy 23: Test using a dummy software event to keep tracking : --- start --- test child forked, pid 32421 ------------------------------------------------------------ perf_event_attr: type 1 size 112 config 0x9 { sample_period, sample_freq } 4000 sample_type IP|TID|ID|PERIOD sys_perf_event_open failed, error -22 Unable to open dummy and cycles event test child finished with -2 ---- end ---- Test using a dummy software event to keep tracking: Skip # [root@zoo ~]# cat /proc/sys/kernel/perf_event_max_sample_rate 1000 After: [root@zoo ~]# perf test dummy 23: Test using a dummy software event to keep tracking : Ok Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-487iquegrs2379e5n0pi0tcp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/keep-tracking.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c index a337a6d..6158132 100644 --- a/tools/perf/tests/keep-tracking.c +++ b/tools/perf/tests/keep-tracking.c @@ -55,7 +55,6 @@ int test__keep_tracking(int subtest __maybe_unused) .mmap_pages = UINT_MAX, .user_freq = UINT_MAX, .user_interval = ULLONG_MAX, - .freq = 4000, .target = { .uses_mmap = true, },