mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexis Berlemont <alexis.berlemont@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>,
	peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	alexander.shishkin@linux.intel.com
Subject: [PATCH] Implement --delay on perf trace
Date: Mon, 10 Oct 2016 07:43:27 +0200	[thread overview]
Message-ID: <20161010054328.4028-1-alexis.berlemont@gmail.com> (raw)

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.

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

             reply	other threads:[~2016-10-10  5:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10  5:43 Alexis Berlemont [this message]
2016-10-10  5:43 ` [PATCH] perf: implement " Alexis Berlemont
2016-10-24 19:04   ` [tip:perf/core] perf trace: Implement --delay tip-bot for Alexis Berlemont
2016-10-14 16:03 ` [PATCH] Implement --delay on perf trace Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161010054328.4028-1-alexis.berlemont@gmail.com \
    --to=alexis.berlemont@gmail.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®