1 /** 2 * @file opd_sample_files.h 3 * Management of sample files 4 * 5 * @remark Copyright 2002 OProfile authors 6 * @remark Read the file COPYING 7 * 8 * @author John Levon 9 * @author Philippe Elie 10 */ 11 12 #ifndef OPD_SAMPLE_FILES_H 13 #define OPD_SAMPLE_FILES_H 14 15 #include "op_list.h" 16 #include "odb.h" 17 18 struct opd_image; 19 20 /** one samples file when profiling on a 2.2/2.4 kernel */ 21 struct opd_24_sfile { 22 /** lru list of sample file */ 23 struct list_head lru_next; 24 /** the sample file itself */ 25 odb_t sample_file; 26 }; 27 28 /** 29 * sync all samples files 30 */ 31 void opd_sync_samples_files(void); 32 33 /** 34 * @param image the image pointer to work on 35 * 36 * close all samples files belonging to this image 37 */ 38 void opd_close_image_samples_files(struct opd_image * image); 39 40 /** 41 * opd_open_24_sample_file - open an image sample file 42 * @param image image to open file for 43 * @param counter counter number 44 * @param cpu_nr cpu number 45 * 46 * Open image sample file for the image, counter 47 * counter and set up memory mappings for it. 48 * image->kernel and image->name must have meaningful 49 * values. 50 * 51 * Returns 0 on success. 52 */ 53 int opd_open_24_sample_file(struct opd_image * image, int counter, int cpu_nr); 54 55 /** 56 * @param sfile sample file to act on 57 * 58 * put sfile at the head of samples files lru list 59 */ 60 void opd_24_sfile_lru(struct opd_24_sfile * sfile); 61 62 63 #endif /* OPD_SAMPLE_FILES_H */ 64