00001 /** 00002 * @file daemon/oprofiled.h 00003 * Initialisation and setup 00004 * 00005 * @remark Copyright 2002, 2003 OProfile authors 00006 * @remark Read the file COPYING 00007 * 00008 * @author John Levon 00009 * @author Philippe Elie 00010 * Modified by Aravind Menon for Xen 00011 * These modifications are: 00012 * Copyright (C) 2005 Hewlett-Packard Co. 00013 */ 00014 00015 #ifndef OPROFILED_H 00016 00017 #include <signal.h> 00018 00019 struct oprofiled_ops { 00020 void (*init)(void); 00021 void (*start)(void); 00022 void (*exit)(void); 00023 }; 00024 00025 00026 /** 00027 * opd_open_logfile - open the log file 00028 * 00029 * Open the logfile on stdout and stderr. This function 00030 * assumes that 1 and 2 are the lowest close()d file 00031 * descriptors. Failure to open on either descriptor is 00032 * a fatal error. 00033 */ 00034 void opd_open_logfile(void); 00035 00036 00037 /** 00038 * is_image_ignored - check if we must ignore this image 00039 * @param name the name to check 00040 * 00041 * Return true if the image should not be profiled 00042 */ 00043 int is_image_ignored(char const * name); 00044 00045 /** return the int in the given oprofilefs file, error is fatal if !is_fatal */ 00046 int opd_read_fs_int(char const * path, char const * name, int is_fatal); 00047 00048 00049 /** global variable positioned by signal handler */ 00050 extern sig_atomic_t signal_alarm; 00051 extern sig_atomic_t signal_hup; 00052 extern sig_atomic_t signal_term; 00053 extern sig_atomic_t signal_child; 00054 extern sig_atomic_t signal_usr1; 00055 extern sig_atomic_t signal_usr2; 00056 00057 extern unsigned int op_nr_counters; 00058 extern int separate_lib; 00059 extern int separate_kernel; 00060 extern int separate_thread; 00061 extern int separate_cpu; 00062 extern int no_vmlinux; 00063 extern char * vmlinux; 00064 extern char * kernel_range; 00065 extern int no_xen; 00066 extern char * xenimage; 00067 extern char * xen_range; 00068 00069 #endif /* OPROFILED_H */
1.6.1