00001 /** 00002 * @file opd_sample_files.h 00003 * Management of sample files 00004 * 00005 * @remark Copyright 2002 OProfile authors 00006 * @remark Read the file COPYING 00007 * 00008 * @author John Levon 00009 * @author Philippe Elie 00010 */ 00011 00012 #ifndef OPD_SAMPLE_FILES_H 00013 #define OPD_SAMPLE_FILES_H 00014 00015 #include "op_list.h" 00016 #include "odb.h" 00017 00018 struct opd_image; 00019 00020 /** one samples file when profiling on a 2.2/2.4 kernel */ 00021 struct opd_24_sfile { 00022 /** lru list of sample file */ 00023 struct list_head lru_next; 00024 /** the sample file itself */ 00025 odb_t sample_file; 00026 }; 00027 00028 /** 00029 * sync all samples files 00030 */ 00031 void opd_sync_samples_files(void); 00032 00033 /** 00034 * @param image the image pointer to work on 00035 * 00036 * close all samples files belonging to this image 00037 */ 00038 void opd_close_image_samples_files(struct opd_image * image); 00039 00040 /** 00041 * opd_open_24_sample_file - open an image sample file 00042 * @param image image to open file for 00043 * @param counter counter number 00044 * @param cpu_nr cpu number 00045 * 00046 * Open image sample file for the image, counter 00047 * counter and set up memory mappings for it. 00048 * image->kernel and image->name must have meaningful 00049 * values. 00050 * 00051 * Returns 0 on success. 00052 */ 00053 int opd_open_24_sample_file(struct opd_image * image, int counter, int cpu_nr); 00054 00055 /** 00056 * @param sfile sample file to act on 00057 * 00058 * put sfile at the head of samples files lru list 00059 */ 00060 void opd_24_sfile_lru(struct opd_24_sfile * sfile); 00061 00062 00063 #endif /* OPD_SAMPLE_FILES_H */
1.6.1