Management of binary images. More...
#include "op_list.h"#include "op_config_24.h"#include "op_types.h"#include <time.h>

Go to the source code of this file.
Classes | |
| struct | opd_image |
| A binary (library, application, kernel or module) is represented by a struct opd_image. More... | |
Typedefs | |
| typedef void(* | opd_image_cb )(struct opd_image *) |
| callback function passed to opd_for_each_image() | |
Functions | |
| void | opd_for_each_image (opd_image_cb imagecb) |
| void | opd_init_images (void) |
| initialize opd_image container | |
| void | opd_delete_image (struct opd_image *image) |
| struct opd_image * | opd_get_kernel_image (char const *name, char const *app_name, pid_t tid, pid_t tgid) |
| opd_get_kernel_image - get a kernel image | |
| struct opd_image * | opd_get_image (char const *name, char const *app_name, int kernel, pid_t tid, pid_t tgid) |
| opd_get_image - get an image from the image structure | |
| int | opd_get_nr_images (void) |
| opd_get_nr_images - return number of images | |
Management of binary images.
| typedef void(* opd_image_cb)(struct opd_image *) |
callback function passed to opd_for_each_image()
| void opd_delete_image | ( | struct opd_image * | image | ) |
| image | the image pointer |
Decrement reference count of image, if reference count is zero flush and close the samples files then freeze all memory belonging to this image.
References opd_image::app_name, opd_image::hash_next, opd_image::kernel, opd_image::name, opd_close_image_samples_files(), opd_image::ref_count, opd_image::tgid, opd_image::tid, verbprintf, and vmisc.
Referenced by opd_kill_maps().
| void opd_for_each_image | ( | opd_image_cb | imagecb | ) |
| imagecb | callback to apply onto each existing image struct |
the callback receive a struct opd_image * (not a const struct) and is allowed to freeze the image struct itself.
References opd_image::hash_next, list_entry, list_for_each_safe, and OPD_IMAGE_HASH_SIZE.
| struct opd_image* opd_get_image | ( | char const * | name, | |
| char const * | app_name, | |||
| int | kernel, | |||
| pid_t | tid, | |||
| pid_t | tgid | |||
| ) | [read] |
opd_get_image - get an image from the image structure
| name | name of image | |
| app_name | the application name where belongs this image | |
| kernel | is the image a kernel/module image | |
| tid | thread id | |
| tgid | thread group id |
Get the image specified by the file name name from the image structure. If it is not present, the image is added to the structure. In either case, the image number is returned.
Referenced by opd_get_kernel_image(), opd_handle_fork(), and opd_handle_mapping().
| struct opd_image* opd_get_kernel_image | ( | char const * | name, | |
| char const * | app_name, | |||
| pid_t | tid, | |||
| pid_t | tgid | |||
| ) | [read] |
opd_get_kernel_image - get a kernel image
| name | of image | |
| app_name | application owner of this kernel image. non-null only when separate_kernel_sample != 0 | |
| tid | thread id | |
| tgid | thread group id |
Create and initialise an image adding it to the image lists and to image hash list. Note than at creation reference count is zero, it's caller responsabilities to incr this count.
References opd_get_image().
Referenced by opd_add_kernel_map(), and opd_init_kernel_image().
| int opd_get_nr_images | ( | void | ) |
opd_get_nr_images - return number of images
Referenced by opd_print_24_stats().
| void opd_init_images | ( | void | ) |
initialize opd_image container
References OPD_IMAGE_HASH_SIZE.
1.6.1