iter->he = he;
he_cache[iter->curr++] = he;
+ callchain_append(he->callchain, &callchain_cursor, sample->period);
+
+ /*
+ * We need to re-initialize the cursor since callchain_append()
+ * advanced the cursor to the end.
+ */
+ callchain_cursor_commit(&callchain_cursor);
+
/*
* The iter->he will be over-written after ->add_next_entry()
* called so inc stats for the original entry now.
if (node == NULL)
return 0;
- callchain_cursor_advance(&callchain_cursor);
-
return fill_callchain_info(al, node, iter->hide_unresolved);
}
.parent = iter->parent,
};
int i;
+ struct callchain_cursor cursor;
+
+ callchain_cursor_snapshot(&cursor, &callchain_cursor);
+
+ callchain_cursor_advance(&callchain_cursor);
/*
* Check if there's duplicate entries in the callchain.
iter->he = he;
he_cache[iter->curr++] = he;
+ callchain_append(he->callchain, &cursor, sample->period);
return 0;
}