Skip to contentSkip to conversation

perf_counter: First part of 'perf report' conversion to C + elfutils

tip:perfcounters/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message May 26, 2009 Documentation

lore
Share & tools
lore
#0 lore raw
Commit-ID:  8fa66bdcc81dd4fc2c91228074d0a4698120c5a2
Gitweb:     http://git.kernel.org/tip/8fa66bdcc81dd4fc2c91228074d0a4698120c5a2
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 18 May 2009 12:45:42 -0300
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 26 May 2009 13:52:53 +0200

perf_counter: First part of 'perf report' conversion to C + elfutils

Integrate perf-report into 'perf', as builtin-report.c.

Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Thomas Gleixner <[email protected]>

LKML-Reference: <new-submission>

---
 Documentation/perf_counter/Makefile         |    6 +-
 Documentation/perf_counter/builtin-report.c |  751 +++++++++++++++++++++++++++
 Documentation/perf_counter/builtin.h        |    1 +
 Documentation/perf_counter/command-list.txt |    1 +
 Documentation/perf_counter/perf.c           |    1 +
 5 files changed, 755 insertions(+), 5 deletions(-)
Documentation/perf_counter/Makefile +1 -5
index 45daa72..49c601e 100644
@@ -228,7 +228,6 @@ COMPAT_CFLAGS =
 COMPAT_OBJS =
 LIB_H =
 LIB_OBJS =
-PROGRAMS = perf-report
 SCRIPT_PERL =
 SCRIPT_SH =
 TEST_PROGRAMS =
@@ -315,6 +314,7 @@ LIB_OBJS += util/wrapper.o
 
 BUILTIN_OBJS += builtin-help.o
 BUILTIN_OBJS += builtin-record.o
+BUILTIN_OBJS += builtin-report.o
 BUILTIN_OBJS += builtin-stat.o
 BUILTIN_OBJS += builtin-top.o
 
@@ -811,10 +811,6 @@ clean:
 	$(RM) $(htmldocs).tar.gz $(manpages).tar.gz
 	$(RM) PERF-VERSION-FILE PERF-CFLAGS PERF-BUILD-OPTIONS
 
-# temporary hack:
-perf-report: perf-report.cc ../../include/linux/perf_counter.h Makefile
-	g++ -g -O2 -Wall -lrt -o $@ $<
-
 .PHONY: all install clean strip
 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
 .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS
Documentation/perf_counter/builtin-report.c new file +751 -0

751 lines not on this page · raw message

Documentation/perf_counter/builtin.h +1 -0
index d32318a..5bfea57 100644
@@ -16,6 +16,7 @@ extern int check_pager_config(const char *cmd);
 
 extern int cmd_help(int argc, const char **argv, const char *prefix);
 extern int cmd_record(int argc, const char **argv, const char *prefix);
+extern int cmd_report(int argc, const char **argv, const char *prefix);
 extern int cmd_stat(int argc, const char **argv, const char *prefix);
 extern int cmd_top(int argc, const char **argv, const char *prefix);
 extern int cmd_version(int argc, const char **argv, const char *prefix);
Documentation/perf_counter/command-list.txt +1 -0
index d15210a..4390292 100644
@@ -1,6 +1,7 @@
 # List of known perf commands.
 # command name				category [deprecated] [common]
 perf-record                             mainporcelain common
+perf-report                             mainporcelain common
 perf-stat                               mainporcelain common
 perf-top                                mainporcelain common
 
Documentation/perf_counter/perf.c +1 -0
index 1d6d7aa..e8a8584 100644
@@ -250,6 +250,7 @@ static void handle_internal_command(int argc, const char **argv)
 	static struct cmd_struct commands[] = {
 		{ "help", cmd_help, 0 },
 		{ "record", cmd_record, 0 },
+		{ "report", cmd_report, 0 },
 		{ "stat", cmd_stat, 0 },
 		{ "top", cmd_top, 0 },
 		{ "version", cmd_version, 0 },