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>
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_24_ops |
| struct oprofiled_ops | opd_26_ops |
Initialisation and setup.
| #define OPD_IMAGE_FILTER_HASH_SIZE 32 |
| int is_image_ignored | ( | char const * | name | ) |
is_image_ignored - check if we must ignore this image
| 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().
Referenced by opd_print_24_stats().
| char* kernel_range |
| int no_event_ok |
| int no_vmlinux |
| int no_xen |
Referenced by opd_create_xen().
| uint op_nr_counters |
Referenced by find_counter_event(), opd_close_image_samples_files(), and opd_parse_events().
| struct oprofiled_ops opd_24_ops |
| struct oprofiled_ops opd_26_ops |
| int separate_cpu |
Referenced by start_profiling().
| int separate_kernel |
Referenced by opd_put_sample().
| int separate_lib |
| int separate_thread |
Referenced by opd_handle_fork().
| 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 |
Referenced by opd_add_kernel_map(), and opd_init_kernel_image().
| int vmodule |
kernel module handling
Referenced by opd_add_kernel_map(), opd_clear_module_info(), and opd_reread_module_info().
| int vsamples |
log samples, voluminous.
Referenced by code_ibs_fetch_sample(), code_ibs_op_sample(), opd_put_sample(), sfile_find(), and sfile_log_sample_count().
| 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 |
1.6.1