Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
cpu_buffer.h File Reference
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/cache.h>
#include <linux/sched.h>
#include <linux/ring_buffer.h>

Go to the source code of this file.

Data Structures

struct  op_sample
 
struct  oprofile_cpu_buffer
 

Macros

#define KERNEL_CTX_SWITCH   (1UL << 0)
 
#define IS_KERNEL   (1UL << 1)
 
#define TRACE_BEGIN   (1UL << 2)
 
#define USER_CTX_SWITCH   (1UL << 3)
 

Functions

int alloc_cpu_buffers (void)
 
void free_cpu_buffers (void)
 
void start_cpu_work (void)
 
void end_cpu_work (void)
 
void flush_cpu_work (void)
 
 DECLARE_PER_CPU (struct oprofile_cpu_buffer, op_cpu_buffer)
 
struct op_sampleop_cpu_buffer_write_reserve (struct op_entry *entry, unsigned long size)
 
int op_cpu_buffer_write_commit (struct op_entry *entry)
 
struct op_sampleop_cpu_buffer_read_entry (struct op_entry *entry, int cpu)
 
unsigned long op_cpu_buffer_entries (int cpu)
 

Detailed Description

Remarks
Copyright 2002-2009 OProfile authors
Read the file COPYING
Author
John Levon levon.nosp@m.@mov.nosp@m.ement.nosp@m.aria.nosp@m.n.org
Robert Richter rober.nosp@m.t.ri.nosp@m.chter.nosp@m.@amd.nosp@m..com

Definition in file cpu_buffer.h.

Macro Definition Documentation

#define IS_KERNEL   (1UL << 1)

Definition at line 117 of file cpu_buffer.h.

#define KERNEL_CTX_SWITCH   (1UL << 0)

Definition at line 116 of file cpu_buffer.h.

#define TRACE_BEGIN   (1UL << 2)

Definition at line 118 of file cpu_buffer.h.

#define USER_CTX_SWITCH   (1UL << 3)

Definition at line 119 of file cpu_buffer.h.

Function Documentation

int alloc_cpu_buffers ( void  )

Definition at line 62 of file cpu_buffer.c.

DECLARE_PER_CPU ( struct oprofile_cpu_buffer  ,
op_cpu_buffer   
)
void end_cpu_work ( void  )

Definition at line 112 of file cpu_buffer.c.

void flush_cpu_work ( void  )

Definition at line 117 of file cpu_buffer.c.

void free_cpu_buffers ( void  )

Definition at line 53 of file cpu_buffer.c.

unsigned long op_cpu_buffer_entries ( int  cpu)

Definition at line 176 of file cpu_buffer.c.

struct op_sample* op_cpu_buffer_read_entry ( struct op_entry entry,
int  cpu 
)
read

Definition at line 161 of file cpu_buffer.c.

int op_cpu_buffer_write_commit ( struct op_entry entry)

Definition at line 156 of file cpu_buffer.c.

struct op_sample* op_cpu_buffer_write_reserve ( struct op_entry entry,
unsigned long  size 
)
read

Definition at line 142 of file cpu_buffer.c.

void start_cpu_work ( void  )

Definition at line 95 of file cpu_buffer.c.