lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-71fe1052af98fc5b615c067425aeb6fe39a0368c@git.kernel.org>
Date:	Wed, 13 Jul 2016 00:25:26 -0700
From:	tip-bot for Jiri Olsa <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	jolsa@...nel.org, hpa@...or.com, namhyung@...nel.org,
	tglx@...utronix.de, acme@...hat.com, dsahern@...il.com,
	mingo@...nel.org, a.p.zijlstra@...llo.nl,
	linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf tools: Introduce trace_event__tp_format_id()

Commit-ID:  71fe1052af98fc5b615c067425aeb6fe39a0368c
Gitweb:     http://git.kernel.org/tip/71fe1052af98fc5b615c067425aeb6fe39a0368c
Author:     Jiri Olsa <jolsa@...nel.org>
AuthorDate: Sun, 10 Jul 2016 13:07:54 +0200
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 12 Jul 2016 16:14:52 -0300

perf tools: Introduce trace_event__tp_format_id()

To get struct event_format object from tracepoint ID.  It will be used
in following patches.

Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1468148882-10362-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/trace-event.c | 8 ++++++++
 tools/perf/util/trace-event.h | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/tools/perf/util/trace-event.c b/tools/perf/util/trace-event.c
index 8ae051e..c330780 100644
--- a/tools/perf/util/trace-event.c
+++ b/tools/perf/util/trace-event.c
@@ -105,3 +105,11 @@ trace_event__tp_format(const char *sys, const char *name)
 
 	return tp_format(sys, name);
 }
+
+struct event_format *trace_event__tp_format_id(int id)
+{
+	if (!tevent_initialized && trace_event__init2())
+		return ERR_PTR(-ENOMEM);
+
+	return pevent_find_event(tevent.pevent, id);
+}
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index bce5b1d..b0af9c8 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -23,6 +23,8 @@ int trace_event__register_resolver(struct machine *machine,
 struct event_format*
 trace_event__tp_format(const char *sys, const char *name);
 
+struct event_format *trace_event__tp_format_id(int id);
+
 int bigendian(void);
 
 void event_format__fprintf(struct event_format *event,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ