linux-trace-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>,
	"linux-trace-devel@vger.kernel.org" 
	<linux-trace-devel@vger.kernel.org>,
	Linux-trace Users <linux-trace-users@vger.kernel.org>
Cc: Zamir SUN <sztsian@gmail.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>,
	zsun@redhat.com, Vitaly Chikunov <vt@altlinux.org>,
	Tzvetomir Stoyanov <tstoyanov@vmware.com>,
	Yordan Karadzhov <ykaradzhov@vmware.com>,
	Ben Hutchings <ben@decadent.org.uk>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Tony Jones <tonyj@suse.de>, John Kacur <jkacur@redhat.com>,
	Clark Williams <williams@redhat.com>,
	powertop@lists.01.org, Al Stone <ahs3@debian.org>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Jes Sorensen <jes.sorensen@gmail.com>
Subject: [ANNOUNCE] libtracefs.git
Date: Fri, 20 Nov 2020 20:03:14 -0500	[thread overview]
Message-ID: <20201120200314.21efabe5@oasis.local.home> (raw)

I split out the libtracefs code from trace-cmd.git using "git subtree",
which recreates all the commits of a directory and makes that directory
a stand alone. I then updated the Makefiles, and copied over some of
the header files used to build the library. I pushed this up to:

  https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/

What libtracefs.so will be use for, is to allow programs to have an API
to access the tracefs directory. Right now, it has a very limited set
of functions that do the bare minimum, for example, to print all sched
events:

	const char *tracefs_dir;
	char **sched_events;
	char *event;
	int i;

	tracefs_dir = tracefs_get_tracing_dir();

	sched_events = tracefs_system_events(tracefs_dir, "sched");
	if (!sched_events)
		return -1;
	for (i = 0; sched_events[i]; i++)
		printf("sched event: %s\n", sched_events[i]);

	tracefs_list_free(sched_events);

We plan on adding man pages for all the functions, as well as expand
the functionality. For example (TBD):

	char **funcs;

	funcs = tracefs_available_filter_functions(tracefs_dir, ".*lock.*");

Which would return a list of all functions that have "lock" in its name
that can be traced by the function tracer.

Same for setting and getting the ftrace filter, enabling disable
events, and even setting filters and histograms. The version of this
library is at 0.1.0 as we are working on it. It is currently at the
stage that kernelshark can use it. Once libtracecmd is ready, then
kernelshark will become its own repo as well.

The repo is still a little rough around the edges, and needs some
loving for making sure the library is installed properly, but it is now
out there for people to have a look, and better yet, send patches! :-)

Note: From now on, updates to libtraceevent and libtracefs will now be
made in their corresponding git repos on kernel.org, and no longer
fixed in trace-cmd or the kernel proper (with some exceptions). After a
couple of years, when these are packaged in all major repos, I tend to
remove the code from these other locations.

-- Steve

                 reply	other threads:[~2020-11-21  1:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20201120200314.21efabe5@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=acme@kernel.org \
    --cc=ahs3@debian.org \
    --cc=ben@decadent.org.uk \
    --cc=jes.sorensen@gmail.com \
    --cc=jkacur@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=linux-trace-users@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=powertop@lists.01.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=sztsian@gmail.com \
    --cc=tonyj@suse.de \
    --cc=tstoyanov@vmware.com \
    --cc=vt@altlinux.org \
    --cc=williams@redhat.com \
    --cc=ykaradzhov@vmware.com \
    --cc=zsun@redhat.com \
    --subject='Re: [ANNOUNCE] libtracefs.git' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).