opd_ibs.h File Reference

AMD Family10h Instruction Based Sampling (IBS) handling. More...

#include <stdint.h>
#include "opd_ibs_macro.h"
Include dependency graph for opd_ibs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ibs_sample
 IBS information is processed in two steps. More...
struct  ibs_fetch_sample
 This struct represents the hardware-level IBS fetch information. More...
struct  ibs_op_sample
 This struct represents the hardware-level IBS op information. More...

Functions

void code_ibs_fetch_sample (struct transient *trans)
 Handle an IBS fetch sample escape code sequence.
void code_ibs_op_sample (struct transient *trans)
 Handle an IBS op sample escape code sequence.
void opd_log_ibs_event (unsigned int event, struct transient *trans)
 Log the specified IBS derived event.
void opd_log_ibs_count (unsigned int event, struct transient *trans, unsigned int count)
 Log the specified IBS cycle count.

Detailed Description

AMD Family10h Instruction Based Sampling (IBS) handling.

Remarks:
Copyright 2008-2010 OProfile authors
Read the file COPYING
Author:
Jason Yeh <jason.yeh@amd.com>
Paul Drongowski <paul.drongowski@amd.com>
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Copyright (c) 2008 Advanced Micro Devices, Inc.

Function Documentation

void code_ibs_fetch_sample ( struct transient trans  ) 

Handle an IBS fetch sample escape code sequence.

An IBS fetch sample is represented as an escape code sequence. (See the comment for the function code_ibs_op_sample() for the sequence of entries in the event buffer.) When this function is called, the ESCAPE_CODE and IBS_FETCH_CODE have already been removed from the event buffer. Thus, 7 more event buffer entries are needed in order to process a complete IBS fetch sample.

void code_ibs_op_sample ( struct transient trans  ) 

Handle an IBS op sample escape code sequence.

An IBS op sample is represented as an escape code sequence:

IBS fetch IBS op --------------- ---------------- ESCAPE_CODE ESCAPE_CODE IBS_FETCH_CODE IBS_OP_CODE Offset Offset IbsFetchLinAd low IbsOpRip low <-- Logical (virtual) RIP IbsFetchLinAd high IbsOpRip high <-- Logical (virtual) RIP IbsFetchCtl low IbsOpData low IbsFetchCtl high IbsOpData high IbsFetchPhysAd low IbsOpData2 low IbsFetchPhysAd high IbsOpData2 high IbsOpData3 low IbsOpData3 high IbsDcLinAd low IbsDcLinAd high IbsDcPhysAd low IbsDcPhysAd high

When this function is called, the ESCAPE_CODE and IBS_OP_CODE have already been removed from the event buffer. Thus, 13 more event buffer entries are needed to process a complete IBS op sample.

The IbsFetchLinAd and IbsOpRip are the linear (virtual) addresses that were generated by the IBS hardware. These addresses are mapped into the offset.

void opd_log_ibs_count ( unsigned int  event,
struct transient trans,
unsigned int  count 
)

Log the specified IBS cycle count.

References sfile_log_sample_count().

void opd_log_ibs_event ( unsigned int  event,
struct transient trans 
)

Log the specified IBS derived event.

References sfile_log_sample_count().


Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1