Linux Perf
ordered-events.c File Reference
#include <errno.h>
#include <inttypes.h>
#include <linux/list.h>
#include <linux/compiler.h>
#include <linux/string.h>
#include "ordered-events.h"
#include "session.h"
#include "asm/bug.h"
#include "debug.h"
Include dependency graph for ordered-events.c:

Go to the source code of this file.

Macros

#define pr_N(n, fmt, ...)   eprintf(n, debug_ordered_events, fmt, ##__VA_ARGS__)
 
#define pr(fmt, ...)   pr_N(1, pr_fmt(fmt), ##__VA_ARGS__)
 
#define MAX_SAMPLE_BUFFER   (64 * 1024 / sizeof(struct ordered_event))
 

Functions

static void queue_event (struct ordered_events *oe, struct ordered_event *new)
 
static union perf_event__dup_event (struct ordered_events *oe, union perf_event *event)
 
static union perf_eventdup_event (struct ordered_events *oe, union perf_event *event)
 
static void free_dup_event (struct ordered_events *oe, union perf_event *event)
 
static struct ordered_eventalloc_event (struct ordered_events *oe, union perf_event *event)
 
static struct ordered_eventordered_events__new_event (struct ordered_events *oe, u64 timestamp, union perf_event *event)
 
void ordered_events__delete (struct ordered_events *oe, struct ordered_event *event)
 
int ordered_events__queue (struct ordered_events *oe, union perf_event *event, u64 timestamp, u64 file_offset)
 
static int __ordered_events__flush (struct ordered_events *oe)
 
int ordered_events__flush (struct ordered_events *oe, enum oe_flush how)
 
void ordered_events__init (struct ordered_events *oe, ordered_events__deliver_t deliver)
 
void ordered_events__free (struct ordered_events *oe)
 
void ordered_events__reinit (struct ordered_events *oe)
 

Macro Definition Documentation

◆ MAX_SAMPLE_BUFFER

#define MAX_SAMPLE_BUFFER   (64 * 1024 / sizeof(struct ordered_event))

Definition at line 91 of file ordered-events.c.

◆ pr

#define pr (   fmt,
  ... 
)    pr_N(1, pr_fmt(fmt), ##__VA_ARGS__)

Definition at line 15 of file ordered-events.c.

◆ pr_N

#define pr_N (   n,
  fmt,
  ... 
)    eprintf(n, debug_ordered_events, fmt, ##__VA_ARGS__)

Definition at line 12 of file ordered-events.c.

Function Documentation

◆ __dup_event()

static union perf_event* __dup_event ( struct ordered_events oe,
union perf_event event 
)
static

Definition at line 63 of file ordered-events.c.

◆ __ordered_events__flush()

static int __ordered_events__flush ( struct ordered_events oe)
static

Definition at line 188 of file ordered-events.c.

Here is the call graph for this function:

◆ alloc_event()

static struct ordered_event* alloc_event ( struct ordered_events oe,
union perf_event event 
)
static

Definition at line 92 of file ordered-events.c.

Here is the call graph for this function:

◆ dup_event()

static union perf_event* dup_event ( struct ordered_events oe,
union perf_event event 
)
static

Definition at line 77 of file ordered-events.c.

Here is the call graph for this function:

◆ free_dup_event()

static void free_dup_event ( struct ordered_events oe,
union perf_event event 
)
static

Definition at line 83 of file ordered-events.c.

Here is the call graph for this function:

◆ ordered_events__delete()

void ordered_events__delete ( struct ordered_events oe,
struct ordered_event event 
)

Definition at line 151 of file ordered-events.c.

Here is the call graph for this function:

◆ ordered_events__flush()

int ordered_events__flush ( struct ordered_events oe,
enum oe_flush  how 
)

Definition at line 232 of file ordered-events.c.

Here is the call graph for this function:

◆ ordered_events__free()

void ordered_events__free ( struct ordered_events oe)

Definition at line 303 of file ordered-events.c.

Here is the call graph for this function:

◆ ordered_events__init()

void ordered_events__init ( struct ordered_events oe,
ordered_events__deliver_t  deliver 
)

Definition at line 293 of file ordered-events.c.

◆ ordered_events__new_event()

static struct ordered_event* ordered_events__new_event ( struct ordered_events oe,
u64  timestamp,
union perf_event event 
)
static

Definition at line 137 of file ordered-events.c.

Here is the call graph for this function:

◆ ordered_events__queue()

int ordered_events__queue ( struct ordered_events oe,
union perf_event event,
u64  timestamp,
u64  file_offset 
)

Definition at line 159 of file ordered-events.c.

Here is the call graph for this function:

◆ ordered_events__reinit()

void ordered_events__reinit ( struct ordered_events oe)

Definition at line 315 of file ordered-events.c.

Here is the call graph for this function:

◆ queue_event()

static void queue_event ( struct ordered_events oe,
struct ordered_event new 
)
static

Definition at line 17 of file ordered-events.c.