lkml.org 
[lkml]   [2018]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 36/48] perf tools: Add perf_mmap__read_tail function
Date
It will be used in following patches.

Link: http://lkml.kernel.org/n/tip-4id1fjlu5ypfqnu9kvpo7l3z@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/util/mmap.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
index bad05b12b9df..eb39d3f85b93 100644
--- a/tools/perf/util/mmap.h
+++ b/tools/perf/util/mmap.h
@@ -79,6 +79,13 @@ static inline u64 perf_mmap__read_head(struct perf_mmap *mm)
return head;
}

+static inline u64 perf_mmap__read_tail(struct perf_mmap *md)
+{
+ struct perf_event_mmap_page *pc = md->base;
+
+ return pc->data_tail;
+}
+
static inline void perf_mmap__write_tail(struct perf_mmap *md, u64 tail)
{
struct perf_event_mmap_page *pc = md->base;
--
2.17.1
\
 
 \ /
  Last update: 2018-09-13 14:58    [W:0.335 / U:4.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site