All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: Tom Zanussi <zanussi@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: Re: [PATCH 0/4] libtracefs: Creating synthetic events
Date: Wed, 21 Jul 2021 23:45:19 -0400	[thread overview]
Message-ID: <20210721234519.7e1f3d3c@oasis.local.home> (raw)
In-Reply-To: <20210722033917.367982-1-rostedt@goodmis.org>

On Wed, 21 Jul 2021 23:39:13 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> Add an interface to libtracefs that makes it easy to create synthetic
> events. For example:
> 

I forgot to add (although it's in the man page)

	#define start_event "sched_waking"
	#define start_field "pid"

	#define end_event "sched_switch"
	#define end_field "next_pid"

	#define match_name "pid"

-- Steve


> 	struct tracefs_synth *synth;
> 	struct tep_handle *tep;
> 	struct trace_seq seq;
> 
> 	/* Load all events from the system */
> 	tep = tracefs_local_events(NULL);
> 	
> 	/* Initialize the synthetic event */
> 	synth = tracefs_synth_init(tep, "wakeup_lat",
> 				   NULL, start_event,
> 				   NULL, end_event,
> 				   match_name,
> 				   start_field, end_field);
> 
> 	/* The tep is no longer needed */
> 	tep_free(tep);
> 
> 

      parent reply	other threads:[~2021-07-22  3:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22  3:39 [PATCH 0/4] libtracefs: Creating synthetic events Steven Rostedt
2021-07-22  3:39 ` [PATCH 1/4] libtracefs: Add tracefs_list_pop() to remove the last item Steven Rostedt
2021-07-22  3:39 ` [PATCH 2/4] libtracefs: Create a way to create a synthetic event Steven Rostedt
2021-07-22  3:39 ` [PATCH 3/4] libtracefs: Add TRACEFS_TIMESTAMP and TRACEFS_TIMESTAMP_USECS to synth Steven Rostedt
2021-07-22  3:39 ` [PATCH 4/4] libtracefs: Add man pages for creating synthetic events Steven Rostedt
2021-07-22  3:45 ` Steven Rostedt [this message]

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=20210721234519.7e1f3d3c@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=bristot@redhat.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=zanussi@kernel.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 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.