opd_sfile.h File Reference

#include "opd_cookie.h"
#include "odb.h"
#include "op_hw_config.h"
#include "op_types.h"
#include "op_list.h"
#include <sys/types.h>
Include dependency graph for opd_sfile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sfile
struct  cg_entry

Defines

#define CG_HASH_SIZE   16
#define UNUSED_EMBEDDED_OFFSET   ~0LLU

Functions

void sfile_clear_kernel (void)
void sfile_clear_anon (struct anon_mapping *)
void sfile_sync_files (void)
void sfile_close_files (void)
int sfile_lru_clear (void)
void sfile_get (struct sfile *sf)
void sfile_put (struct sfile *sf)
struct sfilesfile_find (struct transient const *trans)
void sfile_log_sample (struct transient const *trans)
void sfile_log_sample_count (struct transient const *trans, unsigned long int count)
void sfile_init (void)

Detailed Description

Management of sample files

Remarks:
Copyright 2002 OProfile authors
Read the file COPYING
Author:
John Levon
Philippe Elie

Definition in file opd_sfile.h.


Define Documentation

#define CG_HASH_SIZE   16
#define UNUSED_EMBEDDED_OFFSET   ~0LLU

Definition at line 28 of file opd_sfile.h.

Referenced by create_sfile(), opd_open_sample_file(), and opd_process_samples().


Function Documentation

void sfile_clear_anon ( struct anon_mapping  ) 

clear any sfiles for the given anon mapping

Definition at line 676 of file opd_sfile.c.

References for_each_sfile(), and is_sfile_anon().

Referenced by clear_anon_maps(), and do_lru().

Here is the call graph for this function:

Here is the caller graph for this function:

void sfile_clear_kernel ( void   ) 

clear any sfiles that are for the kernel

Definition at line 670 of file opd_sfile.c.

References for_each_sfile(), and is_sfile_kernel().

Referenced by opd_clear_modules().

Here is the call graph for this function:

Here is the caller graph for this function:

void sfile_close_files ( void   ) 

close sample files

Definition at line 688 of file opd_sfile.c.

References close_sfile(), and for_each_sfile().

Referenced by opd_sighup().

Here is the call graph for this function:

Here is the caller graph for this function:

struct sfile* sfile_find ( struct transient const *  trans  )  [read]

Find the sfile for the current parameters. Note that is required that the PC value be set appropriately (needed for kernel images)

Definition at line 267 of file opd_sfile.c.

References create_sfile(), find_kernel_image(), kern_cmdline::has_cmdline, sfile::hash, kern_cmdline::hash, HASH_BITS, hashes, operf_transient::in_kernel, kern_cmdline::kern_pid, kernel_cmdlines, list_add(), list_entry, list_for_each, lru, NO_COOKIE, OPD_LOST_KERNEL, OPD_LOST_NO_MAPPING, OPD_NO_APP_KERNEL_SAMPLE, OPD_NO_CTX, opd_stats, operf_transient::pc, sfile_get(), sfile_hash(), sfile_put(), operf_transient::tgid, trans, trans_match(), verbose_cookie(), verbprintf, and vsamples.

Referenced by opd_put_ibs_sample(), opd_put_sample(), and opd_put_spu_sample().

Here is the call graph for this function:

Here is the caller graph for this function:

void sfile_get ( struct sfile sf  ) 

remove a sfile from the lru list, protecting it from sfile_lru_clear()

Definition at line 728 of file opd_sfile.c.

References list_del(), and sfile::lru.

Referenced by opd_open_sample_file(), and sfile_find().

Here is the call graph for this function:

Here is the caller graph for this function:

void sfile_init ( void   ) 

initialise hashes

Definition at line 742 of file opd_sfile.c.

References HASH_SIZE, hashes, kernel_cmdlines, and list_init().

Referenced by opd_26_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void sfile_log_sample ( struct transient const *  trans  ) 

Log the sample in a previously located sfile.

Definition at line 534 of file opd_sfile.c.

References sfile_log_sample_count(), and trans.

Referenced by opd_put_sample(), and opd_put_spu_sample().

Here is the call graph for this function:

Here is the caller graph for this function:

void sfile_log_sample_count ( struct transient const *  trans,
unsigned long int  count 
)

Log the event/cycle count in a previously located sfile

Definition at line 540 of file opd_sfile.c.

References operf_transient::current, get_file(), operf_sfile::kernel, operf_transient::last, odb_update_node_with_offset(), OPD_LOST_SAMPLEFILE, opd_stats, operf_transient::pc, sfile_log_arc(), operf_kernel_image::start, TRACING_ON, trans, verbose_sample(), and vsamples.

Referenced by opd_log_ibs_count(), opd_log_ibs_event(), and sfile_log_sample().

Here is the call graph for this function:

Here is the caller graph for this function:

int sfile_lru_clear ( void   ) 

clear out a certain amount of LRU entries return non-zero if the lru is already empty

Definition at line 707 of file opd_sfile.c.

References always_true(), for_one_sfile(), list_empty(), list_entry, list_for_each_safe, lru, and LRU_AMOUNT.

Referenced by complete_dump(), and opd_open_sample_file().

Here is the call graph for this function:

Here is the caller graph for this function:

void sfile_put ( struct sfile sf  ) 

add this sfile to lru list

Definition at line 735 of file opd_sfile.c.

References list_add_tail(), and sfile::lru.

Referenced by opd_open_sample_file(), and sfile_find().

Here is the call graph for this function:

Here is the caller graph for this function:

void sfile_sync_files ( void   ) 

sync sample files

Definition at line 682 of file opd_sfile.c.

References for_each_sfile(), and sync_sfile().

Referenced by opd_alarm().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1