Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
event_buffer.c File Reference
#include <linux/vmalloc.h>
#include <linux/oprofile.h>
#include <linux/sched.h>
#include <linux/capability.h>
#include <linux/dcookies.h>
#include <linux/fs.h>
#include <asm/uaccess.h>
#include "oprof.h"
#include "event_buffer.h"
#include "oprofile_stats.h"

Go to the source code of this file.

Functions

 DEFINE_MUTEX (buffer_mutex)
 
void add_event_entry (unsigned long value)
 
void wake_up_buffer_waiter (void)
 
int alloc_event_buffer (void)
 
void free_event_buffer (void)
 

Variables

struct file_operations event_buffer_fops
 

Detailed Description

Remarks
Copyright 2002 OProfile authors
Read the file COPYING
Author
John Levon levon.nosp@m.@mov.nosp@m.ement.nosp@m.aria.nosp@m.n.org

This is the global event buffer that the user-space daemon reads from. The event buffer is an untyped array of unsigned longs. Entries are prefixed by the escape value ESCAPE_CODE followed by an identifying code.

Definition in file event_buffer.c.

Function Documentation

void add_event_entry ( unsigned long  data)

Add data to the event buffer. The data passed is free-form, but typically consists of file offsets, dcookies, context information, and ESCAPE codes.

Definition at line 44 of file event_buffer.c.

int alloc_event_buffer ( void  )

Definition at line 81 of file event_buffer.c.

DEFINE_MUTEX ( buffer_mutex  )
void free_event_buffer ( void  )

Definition at line 102 of file event_buffer.c.

void wake_up_buffer_waiter ( void  )

Definition at line 72 of file event_buffer.c.

Variable Documentation

struct file_operations event_buffer_fops
Initial value:
= {
.open = event_buffer_open,
.release = event_buffer_release,
.read = event_buffer_read,
.llseek = no_llseek,
}

Definition at line 204 of file event_buffer.c.