perf record: Move perf_mmap__write_tail to perf.h
[deliverable/linux.git] / tools / perf / perf.h
index 5fb5e1f11d1cc96d706dd348664623edcb102538..a5fc660c1f1286512b299342ad3841509a080194 100644 (file)
@@ -108,6 +108,18 @@ static inline unsigned int perf_mmap__read_head(struct perf_mmap *mm)
        return head;
 }
 
+static inline void perf_mmap__write_tail(struct perf_mmap *md,
+                                        unsigned long tail)
+{
+       struct perf_event_mmap_page *pc = md->base;
+
+       /*
+        * ensure all reads are done before we write the tail out.
+        */
+       /* mb(); */
+       pc->data_tail = tail;
+}
+
 /*
  * prctl(PR_TASK_PERF_EVENTS_DISABLE) will (cheaply) disable all
  * counters in the current task.
This page took 0.046386 seconds and 5 git commands to generate.