diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-06-16 10:27:35 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-06-16 10:27:35 +0200 |
commit | 02469a95096a549508c5adf61d84a1d72851c85b (patch) | |
tree | 130c83a2f6937ffa81d00ec661d223cab7a37715 /tools/perf/util/util.c | |
parent | 2c95afc1e83d93fac3be6923465e1753c2c53b0a (diff) | |
parent | 2fd457a34525ea3bc609e377b46af759af8a7934 (diff) |
Merge tag 'perf-core-for-mingo-20160615' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Add --ldlat option to 'perf mem' to specify load latency for loads
event (e.g. cpu/mem-loads/ ) (Jiri Olsa)
Build fixes:
- Fix libunwind related compile error for static cross build (He Kuang)
Infrastructure changes:
- UI refactorings to support headers with multiple lines, non-evsel
hists browsers, toggle showing callchains, etc (Jiri Olsa)
- More prep work for caching probe definitions, paving the way
for supporting SDT (Statically Defined Traces) userspace probes (Masami Hiramatsu)
- Handle NULL at perf_config_set__delete() (Taeung Song)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/util.c')
-rw-r--r-- | tools/perf/util/util.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 23504ad5d6dd..e08b9a092a23 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -97,20 +97,17 @@ int rm_rf(char *path) scnprintf(namebuf, sizeof(namebuf), "%s/%s", path, d->d_name); - ret = stat(namebuf, &statbuf); + /* We have to check symbolic link itself */ + ret = lstat(namebuf, &statbuf); if (ret < 0) { pr_debug("stat failed: %s\n", namebuf); break; } - if (S_ISREG(statbuf.st_mode)) - ret = unlink(namebuf); - else if (S_ISDIR(statbuf.st_mode)) + if (S_ISDIR(statbuf.st_mode)) ret = rm_rf(namebuf); - else { - pr_debug("unknown file: %s\n", namebuf); - ret = -1; - } + else + ret = unlink(namebuf); } closedir(dir); |