perf tools: Add inverted call graph report support.
[deliverable/linux.git] / tools / perf / util / session.c
index b723f211881cdcc4e124afc26b29d07d20977d36..558bcf99694935a706fd2d0e4dde914880918c7f 100644 (file)
@@ -247,9 +247,14 @@ int perf_session__resolve_callchain(struct perf_session *self,
        callchain_cursor_reset(&self->callchain_cursor);
 
        for (i = 0; i < chain->nr; i++) {
-               u64 ip = chain->ips[i];
+               u64 ip;
                struct addr_location al;
 
+               if (callchain_param.order == ORDER_CALLEE)
+                       ip = chain->ips[i];
+               else
+                       ip = chain->ips[chain->nr - i - 1];
+
                if (ip >= PERF_CONTEXT_MAX) {
                        switch (ip) {
                        case PERF_CONTEXT_HV:
This page took 0.0317 seconds and 5 git commands to generate.