These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / tools / perf / util / pstack.c
index a126e6c..b234a6e 100644 (file)
@@ -74,3 +74,10 @@ void *pstack__pop(struct pstack *pstack)
        pstack->entries[pstack->top] = NULL;
        return ret;
 }
+
+void *pstack__peek(struct pstack *pstack)
+{
+       if (pstack->top == 0)
+               return NULL;
+       return pstack->entries[pstack->top - 1];
+}