opd_sample_files.c File Reference

Management of sample files. More...

#include <sys/types.h>
#include "opd_sample_files.h"
#include "opd_image.h"
#include "opd_printf.h"
#include "opd_events.h"
#include "oprofiled.h"
#include "op_sample_file.h"
#include "op_file.h"
#include "op_config.h"
#include "op_mangle.h"
#include "op_events.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
Include dependency graph for opd_sample_files.c:

Defines

#define LRU_AMOUNT   1000

Functions

void opd_24_sfile_lru (struct opd_24_sfile *sfile)
int opd_open_24_sample_file (struct opd_image *image, int counter, int cpu_nr)
 opd_open_24_sample_file - open an image sample file
void opd_sync_samples_files (void)
 sync all samples files
void opd_close_image_samples_files (struct opd_image *image)

Detailed Description

Management of sample files.

Remarks:
Copyright 2002 OProfile authors
Read the file COPYING
Author:
John Levon
Philippe Elie

Define Documentation

#define LRU_AMOUNT   1000

Function Documentation

void opd_24_sfile_lru ( struct opd_24_sfile sfile  ) 
Parameters:
sfile sample file to act on

put sfile at the head of samples files lru list

References opd_24_sfile::lru_next.

Referenced by opd_put_image_sample().

void opd_close_image_samples_files ( struct opd_image image  ) 
Parameters:
image the image pointer to work on

close all samples files belonging to this image

References opd_24_sfile::lru_next, NR_CPUS, odb_close(), op_nr_counters, opd_24_sfile::sample_file, and opd_image::sfiles.

Referenced by opd_delete_image().

int opd_open_24_sample_file ( struct opd_image image,
int  counter,
int  cpu_nr 
)

opd_open_24_sample_file - open an image sample file

Parameters:
image image to open file for
counter counter number
cpu_nr cpu number

Open image sample file for the image, counter counter and set up memory mappings for it. image->kernel and image->name must have meaningful values.

Returns 0 on success.

References create_path(), fill_header(), opd_image::kernel, opd_24_sfile::lru_next, opd_image::mtime, odb_get_data(), odb_init(), odb_open(), ODB_RDWR, opd_24_sfile::sample_file, opd_image::sfiles, verbprintf, and vsfile.

Referenced by opd_put_image_sample().

void opd_sync_samples_files ( void   ) 

Generated on 27 Aug 2012 for oprofile by  doxygen 1.6.1