Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754900AbcJNQFB (ORCPT ); Fri, 14 Oct 2016 12:05:01 -0400 Received: from mail.kernel.org ([198.145.29.136]:52738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbcJNQEw (ORCPT ); Fri, 14 Oct 2016 12:04:52 -0400 Date: Fri, 14 Oct 2016 13:03:57 -0300 From: Arnaldo Carvalho de Melo To: Alexis Berlemont Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com Subject: Re: [PATCH] Implement --delay on perf trace Message-ID: <20161014160357.GH12815@kernel.org> References: <20161010054328.4028-1-alexis.berlemont@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161010054328.4028-1-alexis.berlemont@gmail.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1473 Lines: 46 Em Mon, Oct 10, 2016 at 07:43:27AM +0200, Alexis Berlemont escreveu: > Hi, > > In the perf wiki todo-list, there is an entry regarding initial-delay and > perf trace; the following small patch tries to fulfill this point. It > has been generated against the branch tip/perf/core. > > It has only been implemented in the "trace__run" case. Ok, moved the description to the cset comment and added the entry to tools/perf/Documentation/perf-trace.txt, i.e. to its man page, just copying from the exact same description in 'perf stat' and 'perf record's ones. What is next? :-) - Arnaldo > Ex.: > > $ sudo strace -- ./perf trace --delay 5 sleep 1 2>&1 > ... > fcntl(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 > ioctl(7, PERF_EVENT_IOC_ID, 0x7ffc8fd35718) = 0 > ioctl(11, PERF_EVENT_IOC_SET_OUTPUT, 0x7) = 0 > fcntl(11, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 > ioctl(11, PERF_EVENT_IOC_ID, 0x7ffc8fd35718) = 0 > write(6, "\0", 1) = 1 > close(6) = 0 > nanosleep({0, 5000000}, NULL) = 0 # DELAY OF 5 MS BEFORE ENABLING THE EVNTS > ioctl(3, PERF_EVENT_IOC_ENABLE, 0) = 0 > ioctl(4, PERF_EVENT_IOC_ENABLE, 0) = 0 > ioctl(5, PERF_EVENT_IOC_ENABLE, 0) = 0 > ioctl(7, PERF_EVENT_IOC_ENABLE, 0) = 0 > ... > > Alexis. > > Alexis Berlemont (1): > perf: implement --delay on perf trace > > tools/perf/builtin-trace.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > -- > 2.10.0