op_header.h File Reference

various free function acting on a sample file header More...

#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)
 check mtime of samples file header against file all error are fatal
opd_header const read_header (std::string const &sample_filename)
std::string const describe_header (opd_header const &header)
 output a readable form of header, this don't include the cpu type and speed
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

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  ) 
std::string const describe_header ( opd_header const &  header  ) 

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

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 29 Jul 2013 for oprofile by  doxygen 1.6.1