summaryrefslogtreecommitdiff
path: root/tools/perf/util
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-05-20 08:36:09 +0200
committerIngo Molnar <mingo@kernel.org>2014-05-20 08:36:09 +0200
commit6480c56130ba073df84d57d61062ec4118b10bbe (patch)
tree219d542060729e5ed5d4d13c30d73cf9cf5c2bb0 /tools/perf/util
parent722e76e60f2775c21b087ff12c5e678cf0ebcaaf (diff)
parent97eac381b113932bd7bd4a5c3c68b18e9ff7a2a0 (diff)
downloadlinux-6480c56130ba073df84d57d61062ec4118b10bbe.tar.gz
linux-6480c56130ba073df84d57d61062ec4118b10bbe.tar.bz2
linux-6480c56130ba073df84d57d61062ec4118b10bbe.zip
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core
Pull perf/core improvements and fixes from Jiri Olsa: * Add libdw DWARF post unwind support for ARM (Jean Pihet) * Consolidate types.h for ARM and ARM64 (Jean Pihet) * Fix possible null pointer dereference in session.c (Masanari Iida) * Cleanup, remove unused variables in map_switch_event() (Dongsheng Yang) * Remove nr_state_machine_bugs in perf latency (Dongsheng Yang) * Remove usage of trace_sched_wakeup(.success) (Peter Zijlstra) Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 55960f22233c..64a186edc7be 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1625,13 +1625,14 @@ out_delete_map:
void perf_session__fprintf_info(struct perf_session *session, FILE *fp,
bool full)
{
- int fd = perf_data_file__fd(session->file);
struct stat st;
- int ret;
+ int fd, ret;
if (session == NULL || fp == NULL)
return;
+ fd = perf_data_file__fd(session->file);
+
ret = fstat(fd, &st);
if (ret == -1)
return;