op_header.h File Reference

#include <iosfwd>
#include <string>
#include "op_sample_file.h"
Include dependency graph for op_header.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void op_check_header (opd_header const &h1, opd_header const &h2, std::string const &filename)
bool is_jit_sample (std::string const &filename)
void check_mtime (std::string const &file, opd_header const &header)
opd_header const read_header (std::string const &sample_filename)
std::string const describe_header (opd_header const &header)
std::string const describe_cpu (opd_header const &header)
 output a readable form of cpu type and speed

Detailed Description

various free function acting on a sample file header

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

Definition in file op_header.h.


Function Documentation

void check_mtime ( std::string const &  file,
opd_header const &  header 
)

check mtime of samples file header against file all error are fatal

std::string const describe_cpu ( opd_header const &  header  ) 

output a readable form of cpu type and speed

Definition at line 246 of file op_header.cpp.

References opd_header::cpu_speed, opd_header::cpu_type, xml_utils::get_profile_header(), op_get_cpu_name(), op_get_cpu_type_str(), and want_xml.

Here is the call graph for this function:

std::string const describe_header ( opd_header const &  header  ) 

output a readable form of header, this don't include the cpu type and speed

Definition at line 233 of file op_header.cpp.

References opd_header::cpu_type, opd_header::ctr_count, opd_header::ctr_event, opd_header::ctr_um, and want_xml.

bool is_jit_sample ( std::string const &  filename  ) 
void op_check_header ( opd_header const &  h1,
opd_header const &  h2,
std::string const &  filename 
)
Parameters:
h1 sample file header
h2 sample file header
filename sample filename

check that the h1 and h2 are coherent (same size, same mtime etc.) all error are fatal

opd_header const read_header ( std::string const &  sample_filename  ) 
Parameters:
sample_filename the sample to open

Return the header of this sample file. Only the magic number is checked the version number is not checked. All error are fatal


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1