Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Enumerations | Functions
buffer_sync.c File Reference
#include <linux/mm.h>
#include <linux/workqueue.h>
#include <linux/notifier.h>
#include <linux/dcookies.h>
#include <linux/profile.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/oprofile.h>
#include <linux/sched.h>
#include <linux/gfp.h>
#include "oprofile_stats.h"
#include "event_buffer.h"
#include "cpu_buffer.h"
#include "buffer_sync.h"

Go to the source code of this file.

Enumerations

enum  sync_buffer_state { sb_bt_ignore = -2, sb_buffer_start, sb_bt_start, sb_sample_start }
 

Functions

int sync_start (void)
 
void sync_stop (void)
 
void sync_buffer (int cpu)
 
void oprofile_put_buff (unsigned long *buf, unsigned int start, unsigned int stop, unsigned int max)
 

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
Barry Kasindorf
Robert Richter rober.nosp@m.t.ri.nosp@m.chter.nosp@m.@amd.nosp@m..com

This is the core of the buffer management. Each CPU buffer is processed and entered into the global event buffer. Such processing is necessary in several circumstances, mentioned below.

The processing does the job of converting the transitory EIP value into a persistent dentry/offset value that the profiler can record at its leisure.

See fs/dcookies.c for a description of the dentry/offset objects.

Definition in file buffer_sync.c.

Enumeration Type Documentation

Enumerator:
sb_bt_ignore 
sb_buffer_start 
sb_bt_start 
sb_sample_start 

Definition at line 476 of file buffer_sync.c.

Function Documentation

void oprofile_put_buff ( unsigned long buf,
unsigned int  start,
unsigned int  stop,
unsigned int  max 
)

Add the contents of a circular buffer to the event buffer.

Definition at line 570 of file buffer_sync.c.

void sync_buffer ( int  cpu)

Definition at line 489 of file buffer_sync.c.

int sync_start ( void  )

Definition at line 151 of file buffer_sync.c.

void sync_stop ( void  )

Definition at line 188 of file buffer_sync.c.