1 /** 2 * @file opd_interface.h 3 * 4 * Module / user space interface for 2.6 kernels and above 5 * 6 * @remark Copyright 2002 OProfile authors 7 * @remark Read the file COPYING 8 * 9 * @author John Levon 10 * @author Philippe Elie 11 * Modified by Aravind Menon for Xen 12 * These modifications are: 13 * Copyright (C) 2005 Hewlett-Packard Co. 14 */ 15 16 #ifndef OPD_INTERFACE_H 17 #define OPD_INTERFACE_H 18 19 #define CTX_SWITCH_CODE 1 20 #define CPU_SWITCH_CODE 2 21 #define COOKIE_SWITCH_CODE 3 22 #define KERNEL_ENTER_SWITCH_CODE 4 23 #define USER_ENTER_SWITCH_CODE 5 24 #define MODULE_LOADED_CODE 6 25 #define CTX_TGID_CODE 7 26 #define TRACE_BEGIN_CODE 8 27 /* Code 9 used to be TRACE_END_CODE which is not used anymore */ 28 /* Code 9 is now considered an unknown escape code */ 29 #define XEN_ENTER_SWITCH_CODE 10 30 /* 31 * Ugly work-around for the unfortunate collision between Xenoprof's 32 * DOMAIN_SWITCH_CODE (in use on x86) and Cell's SPU_PROFILING_CODE 33 * (in use with Power): 34 */ 35 #if defined(__powerpc__) 36 #define SPU_PROFILING_CODE 11 37 #define SPU_CTX_SWITCH_CODE 12 38 #else 39 #define DOMAIN_SWITCH_CODE 11 40 /* Code 12 is now considered an unknown escape code */ 41 #endif 42 43 /* AMD's Instruction-Based Sampling (IBS) escape code */ 44 #define IBS_FETCH_SAMPLE 13 45 #define IBS_OP_SAMPLE 14 46 #define LAST_CODE 15 47 48 #endif /* OPD_INTERFACE_H */ 49