diff options
Diffstat (limited to 'simpleperf/event_fd.h')
-rw-r--r-- | simpleperf/event_fd.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/simpleperf/event_fd.h b/simpleperf/event_fd.h index 0b3b0e69..e4e20ce4 100644 --- a/simpleperf/event_fd.h +++ b/simpleperf/event_fd.h @@ -59,7 +59,6 @@ class EventFd { // It tells the kernel to start counting and recording events specified by // this file. bool SetEnableEvent(bool enable); - bool SetFilter(const std::string& filter); bool ReadCounter(PerfCounter* counter); @@ -87,21 +86,6 @@ class EventFd { // Discard the size of the data we have read, so the kernel can reuse the space for new data. virtual void DiscardMmapData(size_t discard_size); - // Manage the aux buffer, which receive auxiliary data sent by the kernel. - // aux_buffer_size: should be power of two, and mod PAGE_SIZE is zero. - virtual bool CreateAuxBuffer(size_t aux_buffer_size, bool report_error); - bool HasAuxBuffer() const { return aux_buffer_size_ != 0; } - virtual void DestroyAuxBuffer(); - - // Get available aux data, which can appear in one or two continuous buffers. - // buf1: return pointer to the first buffer - // size1: return data size in the first buffer - // buf2: return pointer to the second buffer - // size2: return data size in the second buffer - // Return value: return how many bytes of aux data has been read before. - virtual uint64_t GetAvailableAuxData(char** buf1, size_t* size1, char** buf2, size_t* size2); - virtual void DiscardAuxData(size_t discard_size); - // [callback] is called when there is data available in the mapped buffer. virtual bool StartPolling(IOEventLoop& loop, const std::function<bool()>& callback); virtual bool StopPolling(); @@ -134,14 +118,10 @@ class EventFd { void* mmap_addr_; size_t mmap_len_; - // the first page of mapped area, whose content can be changed by the kernel at any time - volatile perf_event_mmap_page* mmap_metadata_page_; - // starting from the second page of mapped area, containing records written by the kernel - char* mmap_data_buffer_; + perf_event_mmap_page* mmap_metadata_page_; // The first page of mmap_area. + char* mmap_data_buffer_; // Starting from the second page of mmap_area, + // containing records written by then kernel. size_t mmap_data_buffer_size_; - // receiving auxiliary data (like instruction tracing data generated by etm) from the kernel - char* aux_buffer_ = nullptr; - size_t aux_buffer_size_ = 0; IOEventRef ioevent_ref_; |