mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
perf_counter tools: Prepare for 'perf annotate'
Prepare for the 'perf annotate' implementation by splitting off builtin-annotate.c from builtin-report.c. ( We keep this commit separate to ease the later librarization of the facilities that perf-report and perf-annotate shares. ) Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
6e6b754ffd
commit
8035e42880
6 changed files with 1325 additions and 2 deletions
26
Documentation/perf_counter/Documentation/perf-annotate.txt
Normal file
26
Documentation/perf_counter/Documentation/perf-annotate.txt
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
perf-annotate(1)
|
||||||
|
==============
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
perf-annotate - Read perf.data (created by perf record) and annotate functions
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
[verse]
|
||||||
|
'perf annotate' [-i <file> | --input=file] symbol_name
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
This command displays the performance counter profile information recorded
|
||||||
|
via perf record.
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
-i::
|
||||||
|
--input=::
|
||||||
|
Input file name. (default: perf.data)
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
linkperf:perf-record[1]
|
|
@ -323,12 +323,13 @@ LIB_OBJS += util/symbol.o
|
||||||
LIB_OBJS += util/color.o
|
LIB_OBJS += util/color.o
|
||||||
LIB_OBJS += util/pager.o
|
LIB_OBJS += util/pager.o
|
||||||
|
|
||||||
|
BUILTIN_OBJS += builtin-annotate.o
|
||||||
BUILTIN_OBJS += builtin-help.o
|
BUILTIN_OBJS += builtin-help.o
|
||||||
|
BUILTIN_OBJS += builtin-list.o
|
||||||
BUILTIN_OBJS += builtin-record.o
|
BUILTIN_OBJS += builtin-record.o
|
||||||
BUILTIN_OBJS += builtin-report.o
|
BUILTIN_OBJS += builtin-report.o
|
||||||
BUILTIN_OBJS += builtin-stat.o
|
BUILTIN_OBJS += builtin-stat.o
|
||||||
BUILTIN_OBJS += builtin-top.o
|
BUILTIN_OBJS += builtin-top.o
|
||||||
BUILTIN_OBJS += builtin-list.o
|
|
||||||
|
|
||||||
PERFLIBS = $(LIB_FILE)
|
PERFLIBS = $(LIB_FILE)
|
||||||
EXTLIBS =
|
EXTLIBS =
|
||||||
|
|
1291
Documentation/perf_counter/builtin-annotate.c
Normal file
1291
Documentation/perf_counter/builtin-annotate.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -14,6 +14,7 @@ extern void prune_packed_objects(int);
|
||||||
extern int read_line_with_nul(char *buf, int size, FILE *file);
|
extern int read_line_with_nul(char *buf, int size, FILE *file);
|
||||||
extern int check_pager_config(const char *cmd);
|
extern int check_pager_config(const char *cmd);
|
||||||
|
|
||||||
|
extern int cmd_annotate(int argc, const char **argv, const char *prefix);
|
||||||
extern int cmd_help(int argc, const char **argv, const char *prefix);
|
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_record(int argc, const char **argv, const char *prefix);
|
||||||
extern int cmd_report(int argc, const char **argv, const char *prefix);
|
extern int cmd_report(int argc, const char **argv, const char *prefix);
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
# List of known perf commands.
|
# List of known perf commands.
|
||||||
# command name category [deprecated] [common]
|
# command name category [deprecated] [common]
|
||||||
#
|
#
|
||||||
|
perf-annotate mainporcelain common
|
||||||
|
perf-list mainporcelain common
|
||||||
perf-record mainporcelain common
|
perf-record mainporcelain common
|
||||||
perf-report mainporcelain common
|
perf-report mainporcelain common
|
||||||
perf-stat mainporcelain common
|
perf-stat mainporcelain common
|
||||||
perf-top mainporcelain common
|
perf-top mainporcelain common
|
||||||
perf-list mainporcelain common
|
|
||||||
|
|
|
@ -263,6 +263,7 @@ static void handle_internal_command(int argc, const char **argv)
|
||||||
{ "report", cmd_report, 0 },
|
{ "report", cmd_report, 0 },
|
||||||
{ "stat", cmd_stat, 0 },
|
{ "stat", cmd_stat, 0 },
|
||||||
{ "top", cmd_top, 0 },
|
{ "top", cmd_top, 0 },
|
||||||
|
{ "annotate", cmd_annotate, 0 },
|
||||||
{ "version", cmd_version, 0 },
|
{ "version", cmd_version, 0 },
|
||||||
};
|
};
|
||||||
int i;
|
int i;
|
||||||
|
@ -402,9 +403,11 @@ int main(int argc, const char **argv)
|
||||||
while (1) {
|
while (1) {
|
||||||
static int done_help = 0;
|
static int done_help = 0;
|
||||||
static int was_alias = 0;
|
static int was_alias = 0;
|
||||||
|
|
||||||
was_alias = run_argv(&argc, &argv);
|
was_alias = run_argv(&argc, &argv);
|
||||||
if (errno != ENOENT)
|
if (errno != ENOENT)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (was_alias) {
|
if (was_alias) {
|
||||||
fprintf(stderr, "Expansion of alias '%s' failed; "
|
fprintf(stderr, "Expansion of alias '%s' failed; "
|
||||||
"'%s' is not a perf-command\n",
|
"'%s' is not a perf-command\n",
|
||||||
|
|
Loading…
Reference in a new issue