Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932452AbbHGPx3 (ORCPT ); Fri, 7 Aug 2015 11:53:29 -0400 Received: from mail.kernel.org ([198.145.29.136]:37223 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932113AbbHGPx1 (ORCPT ); Fri, 7 Aug 2015 11:53:27 -0400 Date: Fri, 7 Aug 2015 12:38:43 -0300 From: Arnaldo Carvalho de Melo To: kan.liang@intel.com Cc: jolsa@kernel.org, namhyung@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support Message-ID: <20150807153843.GD3325@kernel.org> References: <1438890294-33409-1-git-send-email-kan.liang@intel.com> <1438890294-33409-2-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438890294-33409-2-git-send-email-kan.liang@intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1590 Lines: 40 Em Thu, Aug 06, 2015 at 03:44:53PM -0400, kan.liang@intel.com escreveu: > From: Kan Liang > Here are some examples and test results. > > 1. Comparing the elapsed time and perf.data size from "kernbench -M -H". > > The test command for FULL callgraph and time support. > "perf record -e > '{cpu/cpu-cycles,period=100000/,cpu/instructions,period=20000/p}' > --call-graph fp --time" Jiri, while testing this I noticed that the message for EINVAL when using the cpu// syntax (per-event settings) is cryptic: [root@zoo ~]# perf record -e 'cpu/cpu-cycles,call-graph=fp,time,period=100000/p' ls Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cpu/cpu-cycles,call-graph=fp,time,period=100000/p). /bin/dmesg may provide additional information. No CONFIG_PERF_EVENTS=y kernel support configured? Whereas if we use -F, it is much, much clearer, telling the user exactly what is failing and what needs to be done to make it work: [root@zoo ~]# perf record -F 100000 -e cpu/cpu-cycles/ usleep 1 Maximum frequency rate (25000) reached. Please use -F freq option with lower value or consider tweaking /proc/sys/kernel/perf_event_max_sample_rate. [root@zoo ~]# Hope this is something easy to wire up, given your event parsing kung foo skillz... ;-) - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/