All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Harald Gustafsson <hgu1972@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Harald Gustafsson <hgu1972@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Harald Gustafsson <harald.gustafsson@ericsson.com>,
	Song Yuan <song.yuan@ericsson.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: perf events over (net) console?
Date: Thu, 9 Sep 2010 11:41:06 -0300	[thread overview]
Message-ID: <20100909144106.GC4155@ghostprotocols.net> (raw)
In-Reply-To: <20100909132057.GA5259@nowhere>

Em Thu, Sep 09, 2010 at 03:21:00PM +0200, Frederic Weisbecker escreveu:
> In the beginning this could wrap into perf record - | perf pipe | netcat
> and so, until we get the splice support.

Isn't this what Tom Zanussi's live mode, that we have already special
casing 'perf record -' does?

Look at these tools/perf/builtin-record.c excerpts:

static int __cmd_record(int argc, const char **argv)
{
<SNIP>
        if (!strcmp(output_name, "-"))
                pipe_output = 1;
<SNIP>
        if (pipe_output)
                output = STDOUT_FILENO;
        else
                output = open(output_name, flags, S_IRUSR | S_IWUSR);
<SNIP>
	if (pipe_output) {
                err = perf_header__write_pipe(output);
<SNIP>
        if (pipe_output) {
                err = event__synthesize_attrs(&session->header,
                                              process_synthesized_event,
                                              session)
<SNIP>
}

Harald, can you please take a look at the comment for these commits:

commit 454c407ec17a0c63e4023ac0877d687945a7df4a
Author: Tom Zanussi <tzanussi@gmail.com>
Date:   Sat May 1 01:41:20 2010 -0500

    perf: add perf-inject builtin

commit 529870e37473a9fc609078f03cc5b4148cf06a87
Author: Tom Zanussi <tzanussi@gmail.com>
Date:   Thu Apr 1 23:59:16 2010 -0500

    perf record: Introduce special handling for pipe output

commit 8dc58101f2c838355d44402aa77646649d10dbec
Author: Tom Zanussi <tzanussi@gmail.com>
Date:   Thu Apr 1 23:59:15 2010 -0500

    perf: Add pipe-specific header read/write and event processing code

Using live mode you can stream to a perf.data for later analisys or do
it live, piping it to trace scripts, etc.

Doing it using splice, talking directly to an in kernel mini-server, etc
are all optimizations that we should think about, but if you can try
using the live mode and see if it is ok, that would be good.

A mini binary with just record can come in handy if you like and should
be rather easy to build, please let me know if you think it is a good
idea and if you need help, lemme know.

- Arnaldo

  reply	other threads:[~2010-09-09 14:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 11:06 perf events over (net) console? Harald Gustafsson
2010-09-09 11:19 ` Peter Zijlstra
2010-09-09 11:29   ` Frederic Weisbecker
2010-09-09 11:35     ` Peter Zijlstra
2010-09-09 11:40       ` Frederic Weisbecker
2010-09-09 11:40     ` Ingo Molnar
2010-09-09 12:31       ` Harald Gustafsson
2010-09-09 12:47         ` Peter Zijlstra
2010-09-09 13:07           ` Ingo Molnar
2010-09-09 13:21             ` Frederic Weisbecker
2010-09-09 14:41               ` Arnaldo Carvalho de Melo [this message]
2010-09-09 17:42                 ` Harald Gustafsson

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=20100909144106.GC4155@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=harald.gustafsson@ericsson.com \
    --cc=hgu1972@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=song.yuan@ericsson.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.