perf evlist: Factor out a function to propagate maps for a single evsel
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / session.c
index f51eb54aeeb3a7fa8cd172a1d670ba82ac3e2394..8a4537ee9bc374166c31d05f6e48b6ca6943a4b3 100644 (file)
@@ -170,7 +170,7 @@ static void perf_session__delete_threads(struct perf_session *session)
        machine__delete_threads(&session->machines.host);
 }
 
-static void perf_session_env__exit(struct perf_session_env *env)
+static void perf_session_env__exit(struct perf_env *env)
 {
        zfree(&env->hostname);
        zfree(&env->os_release);
@@ -784,10 +784,18 @@ static void branch_stack__printf(struct perf_sample *sample)
 
        printf("... branch stack: nr:%" PRIu64 "\n", sample->branch_stack->nr);
 
-       for (i = 0; i < sample->branch_stack->nr; i++)
-               printf("..... %2"PRIu64": %016" PRIx64 " -> %016" PRIx64 "\n",
-                       i, sample->branch_stack->entries[i].from,
-                       sample->branch_stack->entries[i].to);
+       for (i = 0; i < sample->branch_stack->nr; i++) {
+               struct branch_entry *e = &sample->branch_stack->entries[i];
+
+               printf("..... %2"PRIu64": %016" PRIx64 " -> %016" PRIx64 " %hu cycles %s%s%s%s %x\n",
+                       i, e->from, e->to,
+                       e->flags.cycles,
+                       e->flags.mispred ? "M" : " ",
+                       e->flags.predicted ? "P" : " ",
+                       e->flags.abort ? "A" : " ",
+                       e->flags.in_tx ? "T" : " ",
+                       (unsigned)e->flags.reserved);
+       }
 }
 
 static void regs_dump__printf(u64 mask, u64 *regs)