Management of sample files. More...
#include "opd_cookie.h"#include "odb.h"#include "op_hw_config.h"#include "op_types.h"#include "op_list.h"#include <sys/types.h>

Go to the source code of this file.
Classes | |
| struct | sfile |
| Each set of sample files (where a set is over the physical counter types) will have one of these for it. More... | |
| struct | cg_entry |
| a call-graph entry More... | |
Defines | |
| #define | CG_HASH_SIZE 16 |
| #define | UNUSED_EMBEDDED_OFFSET ~0LLU |
Functions | |
| void | sfile_clear_kernel (void) |
| clear any sfiles that are for the kernel | |
| void | sfile_clear_anon (struct anon_mapping *) |
| clear any sfiles for the given anon mapping | |
| void | sfile_sync_files (void) |
| sync sample files | |
| void | sfile_close_files (void) |
| close sample files | |
| int | sfile_lru_clear (void) |
| clear out a certain amount of LRU entries return non-zero if the lru is already empty | |
| void | sfile_get (struct sfile *sf) |
| remove a sfile from the lru list, protecting it from sfile_lru_clear() | |
| void | sfile_put (struct sfile *sf) |
| add this sfile to lru list | |
| struct sfile * | sfile_find (struct transient const *trans) |
| Find the sfile for the current parameters. | |
| void | sfile_log_sample (struct transient const *trans) |
| Log the sample in a previously located sfile. | |
| void | sfile_log_sample_count (struct transient const *trans, unsigned long int count) |
| Log the event/cycle count in a previously located sfile. | |
| void | sfile_init (void) |
| initialise hashes | |
Management of sample files.
| #define CG_HASH_SIZE 16 |
| #define UNUSED_EMBEDDED_OFFSET ~0LLU |
Referenced by opd_open_sample_file(), and opd_process_samples().
| void sfile_clear_anon | ( | struct anon_mapping * | ) |
clear any sfiles for the given anon mapping
| void sfile_clear_kernel | ( | void | ) |
clear any sfiles that are for the kernel
| void sfile_close_files | ( | void | ) |
close sample files
Find the sfile for the current parameters.
Note that is required that the PC value be set appropriately (needed for kernel images)
References find_kernel_image(), kern_cmdline::has_cmdline, sfile::hash, kern_cmdline::hash, HASH_BITS, kern_cmdline::kern_pid, list_entry, list_for_each, NO_COOKIE, OPD_LOST_KERNEL, OPD_LOST_NO_MAPPING, OPD_NO_APP_KERNEL_SAMPLE, OPD_NO_CTX, opd_stats, sfile_get(), sfile_put(), verbose_cookie(), verbprintf, and vsamples.
| void sfile_get | ( | struct sfile * | sf | ) |
remove a sfile from the lru list, protecting it from sfile_lru_clear()
References sfile::lru.
Referenced by opd_open_sample_file(), and sfile_find().
| void sfile_init | ( | void | ) |
initialise hashes
References HASH_SIZE.
| void sfile_log_sample | ( | struct transient const * | trans | ) |
Log the sample in a previously located sfile.
References sfile_log_sample_count().
| void sfile_log_sample_count | ( | struct transient const * | trans, | |
| unsigned long int | count | |||
| ) |
Log the event/cycle count in a previously located sfile.
References odb_update_node_with_offset(), OPD_LOST_SAMPLEFILE, opd_stats, TRACING_ON, and vsamples.
Referenced by opd_log_ibs_count(), opd_log_ibs_event(), and sfile_log_sample().
| int sfile_lru_clear | ( | void | ) |
clear out a certain amount of LRU entries return non-zero if the lru is already empty
References list_entry, list_for_each_safe, sfile::lru, and LRU_AMOUNT.
Referenced by opd_open_sample_file().
| void sfile_put | ( | struct sfile * | sf | ) |
add this sfile to lru list
References sfile::lru.
Referenced by opd_open_sample_file(), and sfile_find().
| void sfile_sync_files | ( | void | ) |
sync sample files
1.6.1