diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2013-03-18 10:57:32 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2013-03-18 10:57:57 +0100 |
| commit | aa1262b3876ec5249ff464618a7dcd46b3ca54e2 (patch) | |
| tree | b150bb2c83c073e1f0e298ba7899148f7d991ef7 /tools/perf/builtin-script.c | |
| parent | 806b2139db236e0cbd0b5833ab0ce139f0196bcd (diff) | |
| parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) | |
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to the newly
added ITG-3200 driver.
Diffstat (limited to 'tools/perf/builtin-script.c')
| -rw-r--r-- | tools/perf/builtin-script.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index b363e7b292b2..92d4658f56fb 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -692,7 +692,7 @@ static int parse_output_fields(const struct option *opt __maybe_unused, const char *arg, int unset __maybe_unused) { char *tok; - int i, imax = sizeof(all_output_options) / sizeof(struct output_option); + int i, imax = ARRAY_SIZE(all_output_options); int j; int rc = 0; char *str = strdup(arg); @@ -909,18 +909,6 @@ static const char *ends_with(const char *str, const char *suffix) return NULL; } -static char *ltrim(char *str) -{ - int len = strlen(str); - - while (len && isspace(*str)) { - len--; - str++; - } - - return str; -} - static int read_script_info(struct script_desc *desc, const char *filename) { char line[BUFSIZ], *p; @@ -1487,7 +1475,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) return -1; } - perf_session__fprintf_info(session, stdout, show_full_info); + if (!script_name && !generate_script_lang) + perf_session__fprintf_info(session, stdout, show_full_info); if (!no_callchain) symbol_conf.use_callchain = true; |
