oprofiled.c File Reference

Initialisation and setup. More...

#include "config.h"
#include "oprofiled.h"
#include "opd_printf.h"
#include "opd_events.h"
#include "opd_extended.h"
#include "op_config.h"
#include "op_version.h"
#include "op_hw_config.h"
#include "op_libiberty.h"
#include "op_file.h"
#include "op_abi.h"
#include "op_string.h"
#include "op_cpu_type.h"
#include "op_popt.h"
#include "op_lockfile.h"
#include "op_list.h"
#include "op_fileio.h"
#include <sys/types.h>
#include <sys/resource.h>
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <dirent.h>
#include <limits.h>
Include dependency graph for oprofiled.c:

Classes

struct  opd_hashed_name

Defines

#define OPD_IMAGE_FILTER_HASH_SIZE   32

Functions

void opd_open_logfile (void)
 opd_open_logfile - open the log file
int is_image_ignored (char const *name)
 is_image_ignored - check if we must ignore this image
int opd_read_fs_int (char const *path, char const *name, int fatal)
 return the int in the given oprofilefs file
int main (int argc, char const *argv[])

Variables

sig_atomic_t signal_alarm
 global variable positioned by signal handler
sig_atomic_t signal_hup
sig_atomic_t signal_term
sig_atomic_t signal_child
sig_atomic_t signal_usr1
sig_atomic_t signal_usr2
uint op_nr_counters
op_cpu cpu_type
int no_event_ok
int vsfile
 log all sample file name manipulation; sample files open, close, sfile LRU etc.
int vsamples
 log samples, voluminous.
int varcs
 log arc, very voluminous.
int vmodule
 kernel module handling
int vmisc
 all others not fitting in above category, not voluminous.
int vext
 extended feature
int separate_lib
int separate_kernel
int separate_thread
int separate_cpu
int no_vmlinux
char * vmlinux
char * kernel_range
char * session_dir
int no_xen
char * xenimage
char * xen_range
struct oprofiled_ops opd_26_ops

Detailed Description

Initialisation and setup.

Remarks:
Copyright 2002, 2003 OProfile authors
Read the file COPYING
Author:
John Levon
Philippe Elie Modified by Aravind Menon for Xen These modifications are: Copyright (C) 2005 Hewlett-Packard Co.

Define Documentation

#define OPD_IMAGE_FILTER_HASH_SIZE   32

Function Documentation

int is_image_ignored ( char const *  name  ) 

is_image_ignored - check if we must ignore this image

Parameters:
name the name to check

Return true if the image should not be profiled

References list_entry, list_for_each, opd_hashed_name::name, opd_hashed_name::next, and op_hash_string().

int main ( int  argc,
char const *  argv[] 
)
void opd_open_logfile ( void   ) 

opd_open_logfile - open the log file

Open the logfile on stdout and stderr. This function assumes that 1 and 2 are the lowest close()d file descriptors. Failure to open on either descriptor is a fatal error.

References op_log_file.

int opd_read_fs_int ( char const *  path,
char const *  name,
int  fatal 
)

return the int in the given oprofilefs file

return the int in the given oprofilefs file, error is fatal if !is_fatal

References op_read_int_from_file().


Variable Documentation

char* kernel_range
int no_xen

Referenced by opd_create_xen().

char* session_dir
sig_atomic_t signal_alarm

global variable positioned by signal handler

sig_atomic_t signal_child
sig_atomic_t signal_hup
sig_atomic_t signal_term
sig_atomic_t signal_usr1
sig_atomic_t signal_usr2
int varcs

log arc, very voluminous.

named "arcs"

int vext

extended feature

Referenced by code_ibs_fetch_sample(), and code_ibs_op_sample().

int vmisc

all others not fitting in above category, not voluminous.

char* vmlinux
int vmodule

kernel module handling

Referenced by opd_reread_module_info().

int vsamples
int vsfile

log all sample file name manipulation; sample files open, close, sfile LRU etc.

named "sfile"

voluminous. FIXME need to be splitted (filename manip, files handling) ?

char* xen_range
char* xenimage

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1