From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752301AbbCYOiC (ORCPT ); Wed, 25 Mar 2015 10:38:02 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:19607 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750819AbbCYOh5 (ORCPT ); Wed, 25 Mar 2015 10:37:57 -0400 Message-ID: <5512C821.7020600@oracle.com> Date: Wed, 25 Mar 2015 08:37:21 -0600 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jiri Olsa CC: acme@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Frederic Weisbecker , Peter Zijlstra , Jiri Olsa , Namhyung Kim , Stephane Eranian , Adrian Hunter Subject: Re: [PATCH] perf record: Allow poll timeout to be specified References: <1427213388-127148-1-git-send-email-david.ahern@oracle.com> <20150325123855.GC26966@krava.brq.redhat.com> In-Reply-To: <20150325123855.GC26966@krava.brq.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/25/15 6:38 AM, Jiri Olsa wrote: > On Tue, Mar 24, 2015 at 12:09:48PM -0400, David Ahern wrote: >> Record currently wakes up based on watermarks to read events from the mmaps and >> write them out to the file. The result is a file that can have large blocks of >> events per mmap before a finished round event is added to the stream. This in >> turn affects the quantity of events that have to be passed through the ordered >> events queue before results can be displayed to the user. For commands like >> perf-script this can lead to long unnecessarily long delays before a user gets >> output. Large systems (e.g, 1024 cpus) further compound this effect. I have seen >> instances where I have to wait 45 minutes for perf-script to process a 5GB file >> before any events are shown. > > so you have pipe to perf script, right? $ perf record .... $ perf script ... data > >> >> This patch adds an option to perf-record to allow a user to specify the >> poll timeout in msec. For example using 100 msec timeouts similar to perf-top >> means the mmaps are traversed much more frequently leading to a smoother >> analysis side. > > there's also the '--no-buffering' option that sets: > > attr->watermark = 0; > attr->wakeup_events = 1; > > but that's just the other edge, which is not what you'd want right, that is the other extreme. record would never go to sleep. > > I think it's good to have user side configurable as well > > Acked-by: Jiri Olsa > > thanks, > jirka >