opd_kernel.c File Reference

#include "opd_kernel.h"
#include "opd_sfile.h"
#include "opd_trans.h"
#include "opd_printf.h"
#include "opd_stats.h"
#include "oprofiled.h"
#include "op_fileio.h"
#include "op_config.h"
#include "op_libiberty.h"
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
Include dependency graph for opd_kernel.c:

Go to the source code of this file.

Functions

static LIST_HEAD (modules)
void opd_create_vmlinux (char const *name, char const *arg)
void opd_create_xen (char const *name, char const *arg)
static struct kernel_imageopd_create_module (char const *name, vma_t start, vma_t end)
static void opd_clear_modules (void)
void opd_reread_module_info (void)
struct kernel_imagefind_kernel_image (struct transient const *trans)

Variables

static struct kernel_image vmlinux_image
static struct kernel_image xen_image

Detailed Description

Dealing with the kernel and kernel module samples

Remarks:
Copyright 2002 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.

Definition in file opd_kernel.c.


Function Documentation

struct kernel_image* find_kernel_image ( struct transient const *  trans  )  [read]

find a kernel image by PC value

Parameters:
trans holds PC value to look up

find the kernel image which contains this PC.

Return NULL if not found.

Definition at line 208 of file opd_kernel.c.

References kernel_image::end, kernel_image::list, list_entry, list_for_each, no_vmlinux, operf_transient::pc, kernel_image::start, trans, vmlinux_image, and xen_image.

Referenced by opd_put_ibs_sample(), and sfile_find().

Here is the caller graph for this function:

static LIST_HEAD ( modules   )  [static]
static void opd_clear_modules ( void   )  [static]

Clear and free all kernel image information and reset values.

Definition at line 112 of file opd_kernel.c.

References kernel_image::list, list_entry, list_for_each_safe, list_init(), kernel_image::name, and sfile_clear_kernel().

Referenced by opd_reread_module_info().

Here is the call graph for this function:

Here is the caller graph for this function:

static struct kernel_image* opd_create_module ( char const *  name,
vma_t  start,
vma_t  end 
) [static, read]

Allocate and initialise a kernel image description

Parameters:
name image name
start start address
end end address

Definition at line 95 of file opd_kernel.c.

References kernel_image::end, kernel_image::list, list_add(), kernel_image::name, and kernel_image::start.

Referenced by opd_reread_module_info().

Here is the call graph for this function:

Here is the caller graph for this function:

void opd_create_vmlinux ( char const *  name,
char const *  arg 
)

create the kernel image

Definition at line 37 of file opd_kernel.c.

References kernel_image::end, kernel_image::list, list_init(), kernel_image::name, no_vmlinux, kernel_image::start, verbprintf, vmisc, and vmlinux_image.

Referenced by opd_26_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void opd_create_xen ( char const *  name,
char const *  arg 
)

Definition at line 62 of file opd_kernel.c.

References kernel_image::end, kernel_image::list, list_init(), kernel_image::name, no_xen, kernel_image::start, verbprintf, vmisc, and xen_image.

Referenced by opd_26_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void opd_reread_module_info ( void   ) 

opd_reread_module_info - parse /proc/modules for kernel modules

Definition at line 139 of file opd_kernel.c.

References kernel_image::end, kernel_image::name, no_vmlinux, op_close_file(), op_get_line(), op_try_open_file(), opd_clear_modules(), opd_create_module(), kernel_image::start, verbprintf, and vmodule.

Referenced by code_module_loaded(), and opd_26_init().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

struct kernel_image vmlinux_image [static]

Definition at line 33 of file opd_kernel.c.

Referenced by find_kernel_image(), and opd_create_vmlinux().

struct kernel_image xen_image [static]

Definition at line 35 of file opd_kernel.c.

Referenced by find_kernel_image(), and opd_create_xen().


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1