init.c File Reference

#include "config.h"
#include "oprofiled.h"
#include "opd_stats.h"
#include "opd_sfile.h"
#include "opd_pipe.h"
#include "opd_kernel.h"
#include "opd_trans.h"
#include "opd_anon.h"
#include "opd_perfmon.h"
#include "opd_printf.h"
#include "opd_extended.h"
#include "op_version.h"
#include "op_config.h"
#include "op_deviceio.h"
#include "op_get_time.h"
#include "op_libiberty.h"
#include "op_fileio.h"
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <sys/time.h>
#include <wait.h>
#include <string.h>
Include dependency graph for init.c:

Go to the source code of this file.

Functions

static void opd_sighup (void)
static void opd_alarm (void)
static void opd_sigterm (void)
static void opd_sigchild (void)
static void opd_do_jitdumps (void)
static void opd_open_files (void)
static void complete_dump (void)
static void opd_do_samples (char const *opd_buf, ssize_t count)
static void opd_do_read (char *buf, size_t size)
static void clean_exit (void)
static void opd_26_init (void)
static void opd_26_start (void)
static void opd_26_exit (void)

Variables

size_t kernel_pointer_size
static fd_t devfd
static char * sbuf
static size_t s_buf_bytesize
char * session_dir
static char start_time_str [32]
static int jit_conversion_running
struct oprofiled_ops opd_26_ops

Detailed Description

Daemon set up and main loop for 2.6

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

Definition in file init.c.


Function Documentation

static void clean_exit ( void   )  [static]

Definition at line 274 of file init.c.

References op_lock_file, and perfmon_exit().

Referenced by opd_26_init().

Here is the call graph for this function:

Here is the caller graph for this function:

static void complete_dump ( void   )  [static]

Done writing out the samples, indicate with complete_dump file

Definition at line 101 of file init.c.

References op_dump_status, and sfile_lru_clear().

Referenced by opd_do_samples().

Here is the call graph for this function:

Here is the caller graph for this function:

static void opd_26_exit ( void   )  [static]

Definition at line 358 of file init.c.

References op_get_time(), opd_print_stats(), sbuf, and vmlinux.

Here is the call graph for this function:

static void opd_26_init ( void   )  [static]
static void opd_26_start ( void   )  [static]

Definition at line 351 of file init.c.

References opd_do_read(), s_buf_bytesize, and sbuf.

Here is the call graph for this function:

static void opd_alarm ( void   )  [static]

opd_alarm - sync files and report stats

Definition at line 254 of file init.c.

References opd_print_stats(), and sfile_sync_files().

Referenced by opd_do_read().

Here is the call graph for this function:

Here is the caller graph for this function:

static void opd_do_jitdumps ( void   )  [static]

Definition at line 149 of file init.c.

References jit_conversion_running, OP_BINDIR, session_dir, start_time_str, and vmisc.

Referenced by opd_do_read(), and opd_sigterm().

Here is the caller graph for this function:

static void opd_do_read ( char *  buf,
size_t  size 
) [static]

opd_do_read - enter processing loop

Parameters:
buf buffer to read into
size size of buffer

Read some of a buffer from the device and process the contents.

Definition at line 200 of file init.c.

References devfd, is_jitconv_requested(), op_read_device(), opd_alarm(), opd_close_pipe(), opd_do_jitdumps(), opd_do_samples(), opd_open_pipe(), opd_sigchild(), opd_sighup(), opd_sigterm(), perfmon_start(), perfmon_stop(), signal_alarm, signal_child, signal_hup, signal_term, signal_usr1, signal_usr2, verbprintf, and vmisc.

Referenced by opd_26_start().

Here is the call graph for this function:

Here is the caller graph for this function:

static void opd_do_samples ( char const *  opd_buf,
ssize_t  count 
) [static]

opd_do_samples - process a sample buffer

Parameters:
opd_buf buffer to process

Process a buffer of samples.

If the sample could be processed correctly, it is written to the relevant sample file.

Definition at line 136 of file init.c.

References complete_dump(), kernel_pointer_size, OPD_DUMP_COUNT, opd_process_samples(), opd_stats, verbprintf, and vmisc.

Referenced by opd_do_read().

Here is the call graph for this function:

Here is the caller graph for this function:

static void opd_open_files ( void   )  [static]

opd_open_files - open necessary files

Open the device files and the log file, and mmap() the hash map.

Definition at line 66 of file init.c.

References devfd, kernel_pointer_size, op_get_time(), op_log_file, op_open_device(), opd_create_pipe(), and opd_open_logfile().

Referenced by opd_26_init().

Here is the call graph for this function:

Here is the caller graph for this function:

static void opd_sigchild ( void   )  [static]

Definition at line 292 of file init.c.

References jit_conversion_running, verbprintf, and vmisc.

Referenced by opd_do_read().

Here is the caller graph for this function:

static void opd_sighup ( void   )  [static]

re-open files for logrotate/opcontrol --reset

Definition at line 263 of file init.c.

References opd_open_logfile(), and sfile_close_files().

Referenced by opd_do_read().

Here is the call graph for this function:

Here is the caller graph for this function:

static void opd_sigterm ( void   )  [static]

Definition at line 281 of file init.c.

References op_get_time(), opd_do_jitdumps(), opd_ext_deinitialize(), and opd_print_stats().

Referenced by opd_do_read().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

fd_t devfd [static]

Definition at line 47 of file init.c.

Referenced by opd_do_read(), and opd_open_files().

int jit_conversion_running [static]

Definition at line 52 of file init.c.

Referenced by opd_do_jitdumps(), and opd_sigchild().

Definition at line 45 of file init.c.

Referenced by is_escape_code(), opd_26_init(), opd_do_samples(), opd_open_files(), and pop_buffer_value().

Initial value:
 {
    .init = opd_26_init,
    .start = opd_26_start,
    .exit = opd_26_exit,
}

Definition at line 368 of file init.c.

Referenced by get_ops().

size_t s_buf_bytesize [static]

Definition at line 49 of file init.c.

Referenced by opd_26_init(), and opd_26_start().

char* sbuf [static]

Definition at line 48 of file init.c.

Referenced by opd_26_exit(), opd_26_init(), and opd_26_start().

char* session_dir

Definition at line 70 of file oprofiled.c.

Referenced by ibs_init(), main(), and opd_do_jitdumps().

char start_time_str[32] [static]

Definition at line 51 of file init.c.

Referenced by opd_26_init(), and opd_do_jitdumps().


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1