#include <stdint.h>
#include "opd_ibs_macro.h"
Go to the source code of this file.
Data Structures | |
struct | ibs_sample |
struct | ibs_fetch_sample |
struct | ibs_op_sample |
Functions | |
void | code_ibs_fetch_sample (struct transient *trans) |
void | code_ibs_op_sample (struct transient *trans) |
void | opd_log_ibs_event (unsigned int event, struct transient *trans) |
void | opd_log_ibs_count (unsigned int event, struct transient *trans, unsigned int count) |
AMD Family10h Instruction Based Sampling (IBS) handling.
Definition in file opd_ibs.h.
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.
Definition at line 353 of file opd_ibs.c.
References operf_transient::event, ibs_derived_event_stats, sfile_log_sample_count(), and trans.
void opd_log_ibs_event | ( | unsigned int | event, | |
struct transient * | trans | |||
) |
Log the specified IBS derived event.
Definition at line 344 of file opd_ibs.c.
References operf_transient::event, ibs_derived_event_stats, sfile_log_sample_count(), and trans.