summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-11-05 08:04:24 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-11-05 08:04:24 -0800
commit62314f93f276df8689cfcb109e9459273fa3b6d8 (patch)
treecf6a1067196ee8e44db57eb435cbc395807caa1e /tools
parent078396ec4c69a680d32480766bb94bc8e93f99fd (diff)
parent313b40e20d6fc3f1d1f7dffcde25d3b0ee8d01e9 (diff)
Merge "Merge android-4.4-p.197 (93ec8fb) into msm-4.4"
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/traceevent/event-parse.c3
-rw-r--r--tools/perf/builtin-stat.c2
-rw-r--r--tools/perf/util/llvm-utils.c6
3 files changed, 5 insertions, 6 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index df3c73e9dea4..9954b069b3ca 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -265,10 +265,10 @@ static int add_new_comm(struct pevent *pevent, const char *comm, int pid)
errno = ENOMEM;
return -1;
}
+ pevent->cmdlines = cmdlines;
cmdlines[pevent->cmdline_count].comm = strdup(comm);
if (!cmdlines[pevent->cmdline_count].comm) {
- free(cmdlines);
errno = ENOMEM;
return -1;
}
@@ -279,7 +279,6 @@ static int add_new_comm(struct pevent *pevent, const char *comm, int pid)
pevent->cmdline_count++;
qsort(cmdlines, pevent->cmdline_count, sizeof(*cmdlines), cmdline_cmp);
- pevent->cmdlines = cmdlines;
return 0;
}
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index e77880b5094d..65a6922db722 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1416,7 +1416,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
run_idx + 1);
status = run_perf_stat(argc, argv);
- if (forever && status != -1) {
+ if (forever && status != -1 && !interval) {
print_counters(NULL, argc, argv);
perf_stat__reset_stats();
}
diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 62f6d7dc2dda..9d02aa93ef90 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -214,14 +214,14 @@ static int detect_kbuild_dir(char **kbuild_dir)
const char *prefix_dir = "";
const char *suffix_dir = "";
+ /* _UTSNAME_LENGTH is 65 */
+ char release[128];
+
char *autoconf_path;
int err;
if (!test_dir) {
- /* _UTSNAME_LENGTH is 65 */
- char release[128];
-
err = fetch_kernel_version(NULL, release,
sizeof(release));
if (err)