translation_unit
comment "// SPDX-License-Identifier: GPL-2.0"
preproc_include
#include "#include"
system_lib_string "<linux/bitops.h>"
preproc_include
#include "#include"
system_lib_string "<linux/types.h>"
preproc_include
#include "#include"
system_lib_string "<linux/slab.h>"
preproc_include
#include "#include"
system_lib_string "<linux/sched/clock.h>"
preproc_include
#include "#include"
system_lib_string "<asm/cpu_entry_area.h>"
preproc_include
#include "#include"
system_lib_string "<asm/debugreg.h>"
preproc_include
#include "#include"
system_lib_string "<asm/perf_event.h>"
preproc_include
#include "#include"
system_lib_string "<asm/tlbflush.h>"
preproc_include
#include "#include"
system_lib_string "<asm/insn.h>"
preproc_include
#include "#include"
system_lib_string "<asm/io.h>"
preproc_include
#include "#include"
system_lib_string "<asm/msr.h>"
preproc_include
#include "#include"
system_lib_string "<asm/timer.h>"
preproc_include
#include "#include"
string_literal
" "\""
string_content "../perf_event.h"
" "\""
comment "/* Waste a full page so it can be mapped into the cpu_entry_"...
macro_type_specifier
identifier "DEFINE_PER_CPU_PAGE_ALIGNED"
( "("
type_descriptor
struct_specifier
struct "struct"
type_identifier "debug_store"
ERROR
, ","
identifier "cpu_debug_store"
) ")"
; ";"
comment "/* The size of a BTS record in bytes: */"
preproc_def
#define "#define"
identifier "BTS_RECORD_SIZE"
preproc_arg "24"
preproc_def
#define "#define"
identifier "PEBS_FIXUP_SIZE"
preproc_arg "PAGE_SIZE"
comment "/*\n * pebs_record_32 for p4 and core not supported\n\nstruct p"...
union_specifier (+52 nodes collapsed)
; ";"
union_specifier (+482 nodes collapsed)
; ";"
comment "/*\n * Map PEBS Load Latency Data Source encodings to generic"...
preproc_function_def
#define "#define"
identifier "P"
preproc_params
( "("
identifier "a"
, ","
identifier "b"
) ")"
preproc_arg "PERF_MEM_S(a, b)"
preproc_def
#define "#define"
identifier "OP_LH"
preproc_arg "(P(OP, LOAD) | P(LVL, HIT))"
preproc_function_def
#define "#define"
identifier "LEVEL"
preproc_params
( "("
identifier "x"
) ")"
preproc_arg "P(LVLNUM, x)"
preproc_def
#define "#define"
identifier "REM"
preproc_arg "P(REMOTE, REMOTE)"
preproc_def
#define "#define"
identifier "SNOOP_NONE_MISS"
preproc_arg "(P(SNOOP, NONE) | P(SNOOP, MISS))"
comment "/* Version for Sandy Bridge and later */"
declaration (+516 nodes collapsed)
comment "/* Patch up minor differences in the bits */"
function_definition (+128 nodes collapsed)
function_definition (+187 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+133 nodes collapsed)
function_definition (+22 nodes collapsed)
function_definition (+104 nodes collapsed)
function_definition (+226 nodes collapsed)
function_definition (+104 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+22 nodes collapsed)
comment "/* Version for Lion Cove and later */"
declaration (+409 nodes collapsed)
function_definition (+94 nodes collapsed)
comment "/* Version for Panthercove and later */"
comment "/* L2 hit */"
preproc_def
#define "#define"
identifier "PNC_PEBS_DATA_SOURCE_MAX"
preproc_arg "16"
declaration (+340 nodes collapsed)
comment "/* Version for Arctic Wolf and later */"
comment "/* L2 hit */"
preproc_def
#define "#define"
identifier "ARW_PEBS_DATA_SOURCE_MAX"
preproc_arg "16"
declaration (+266 nodes collapsed)
comment "/* L2 miss */"
preproc_def
#define "#define"
identifier "OMR_DATA_SOURCE_MAX"
preproc_arg "16"
declaration (+400 nodes collapsed)
function_definition
storage_class_specifier
static "static"
type_identifier "u64"
function_declarator
identifier "parse_omr_data_source"
parameter_list
( "("
parameter_declaration
type_identifier "u8"
identifier "dse"
) ")"
compound_statement
{ "{"
declaration
union_specifier
union "union"
type_identifier "omr_encoding"
identifier "omr"
; ";"
declaration
type_identifier "u64"
init_declarator
identifier "val"
= "="
number_literal "0"
; ";"
expression_statement
assignment_expression
field_expression
identifier "omr"
. "."
field_identifier "omr_full"
= "="
identifier "dse"
; ";"
expression_statement
assignment_expression
identifier "val"
= "="
subscript_expression
identifier "omr_data_source"
[ "["
field_expression
identifier "omr"
. "."
field_identifier "omr_source"
] "]"
; ";"
if_statement (+84 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
field_expression
identifier "omr"
. "."
field_identifier "omr_remote"
) ")"
expression_statement
assignment_expression
identifier "val"
|= "|="
identifier "REM"
; ";"
expression_statement (+28 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_expression
identifier "omr"
. "."
field_identifier "omr_source"
== "=="
number_literal "0x2"
) ")"
compound_statement
{ "{"
declaration
type_identifier "u8"
init_declarator
identifier "snoop"
= "="
binary_expression
field_expression
identifier "omr"
. "."
field_identifier "omr_snoop"
| "|"
field_expression
identifier "omr"
. "."
field_identifier "omr_promoted"
; ";"
if_statement any 1:2
if "if" any 1:2
parenthesized_expression
( "("
binary_expression
identifier "snoop"
== "=="
number_literal "0x0"
) ")"
expression_statement
assignment_expression
identifier "val"
|= "|="
call_expression
identifier "P"
argument_list
( "("
identifier "SNOOP"
, ","
identifier "NA"
) ")"
; ";"
else_clause (+72 nodes collapsed)
} "}"
else_clause
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression
field_expression
identifier "omr"
. "."
field_identifier "omr_source"
> ">"
number_literal "0x2"
&& "&&"
binary_expression
field_expression
identifier "omr"
. "."
field_identifier "omr_source"
< "<"
number_literal "0x7"
) ")"
compound_statement
{ "{"
expression_statement (+21 nodes collapsed)
} "}"
return_statement
return "return"
identifier "val"
; ";"
} "}"
function_definition (+177 nodes collapsed)
function_definition (+149 nodes collapsed)
function_definition (+118 nodes collapsed)
comment "/* Retrieve the latency data for e-core of ADL */"
function_definition (+150 nodes collapsed)
function_definition (+67 nodes collapsed)
comment "/* Retrieve the latency data for e-core of MTL */"
function_definition (+67 nodes collapsed)
function_definition (+342 nodes collapsed)
function_definition (+323 nodes collapsed)
function_definition (+74 nodes collapsed)
function_definition (+74 nodes collapsed)
function_definition (+340 nodes collapsed)
function_definition (+74 nodes collapsed)
function_definition (+240 nodes collapsed)
function_definition (+138 nodes collapsed)
struct_specifier (+52 nodes collapsed)
; ";"
struct_specifier (+62 nodes collapsed)
; ";"
comment "/*\n * Same as pebs_record_nhm, with two additional fields.\n "...
struct_specifier (+68 nodes collapsed)
; ";"
union_specifier (+64 nodes collapsed)
; ";"
preproc_def
#define "#define"
identifier "PEBS_HSW_TSX_FLAGS"
preproc_arg "0xff00000000ULL"
comment "/* Same as HSW, plus TSC */"
struct_specifier (+72 nodes collapsed)
; ";"
function_definition (+102 nodes collapsed)
function_definition (+48 nodes collapsed)
declaration
storage_class_specifier
static "static"
macro_type_specifier
identifier "DEFINE_PER_CPU"
( "("
ERROR
type_descriptor
primitive_type "void"
abstract_pointer_declarator
* "*"
, ","
type_descriptor
type_identifier "insn_buffer"
) ")"
identifier ""
; ";"
function_definition (+135 nodes collapsed)
function_definition (+103 nodes collapsed)
function_definition (+92 nodes collapsed)
function_definition (+51 nodes collapsed)
function_definition (+347 nodes collapsed)
function_definition (+156 nodes collapsed)
function_definition (+260 nodes collapsed)
function_definition (+108 nodes collapsed)
function_definition (+75 nodes collapsed)
function_definition (+32 nodes collapsed)
function_definition (+105 nodes collapsed)
function_definition (+358 nodes collapsed)
function_definition (+39 nodes collapsed)
function_definition (+37 nodes collapsed)
function_definition (+150 nodes collapsed)
function_definition (+43 nodes collapsed)
comment "/*\n * BTS\n */"
declaration (+21 nodes collapsed)
function_definition (+104 nodes collapsed)
function_definition (+91 nodes collapsed)
function_definition (+569 nodes collapsed)
function_definition (+36 nodes collapsed)
comment "/*\n * PEBS\n */"
declaration (+75 nodes collapsed)
declaration (+65 nodes collapsed)
declaration (+35 nodes collapsed)
declaration (+25 nodes collapsed)
declaration (+34 nodes collapsed)
declaration (+70 nodes collapsed)
declaration (+135 nodes collapsed)
declaration (+135 nodes collapsed)
declaration (+105 nodes collapsed)
declaration (+115 nodes collapsed)
declaration (+175 nodes collapsed)
declaration (+175 nodes collapsed)
declaration (+175 nodes collapsed)
declaration (+148 nodes collapsed)
declaration (+152 nodes collapsed)
declaration (+143 nodes collapsed)
declaration (+152 nodes collapsed)
function_definition (+156 nodes collapsed)
comment "/*\n * We need the sched_task callback even for per-cpu event"...
function_definition (+62 nodes collapsed)
function_definition (+62 nodes collapsed)
function_definition (+172 nodes collapsed)
preproc_function_def
#define "#define"
identifier "PEBS_DATACFG_CNTRS"
preproc_params
( "("
identifier "x"
) ")"
preproc_arg "((x >> PEBS_DATACFG_CNTR_SHIFT) & PEBS_DATACFG_CNTR_MASK)"
preproc_function_def
#define "#define"
identifier "PEBS_DATACFG_CNTR_BIT"
preproc_params
( "("
identifier "x"
) ")"
preproc_arg "(((1ULL << x) & PEBS_DATACFG_CNTR_MASK) << PEBS_DATACFG_CNTR"...
preproc_function_def
#define "#define"
identifier "PEBS_DATACFG_FIX"
preproc_params
( "("
identifier "x"
) ")"
preproc_arg "((x >> PEBS_DATACFG_FIX_SHIFT) & PEBS_DATACFG_FIX_MASK)"
preproc_function_def
#define "#define"
identifier "PEBS_DATACFG_FIX_BIT"
preproc_params
( "("
identifier "x"
) ")"
preproc_arg "(((1ULL << (x)) & PEBS_DATACFG_FIX_MASK)\t\t\t\\\n\t << PEBS_DATAC"...
function_definition (+266 nodes collapsed)
function_definition (+102 nodes collapsed)
function_definition (+135 nodes collapsed)
preproc_def
#define "#define"
identifier "PERF_PEBS_MEMINFO_TYPE"
preproc_arg "(PERF_SAMPLE_ADDR | PERF_SAMPLE_DATA_SRC | \\\n\t\t\t\tPERF_SAMP"...
function_definition (+291 nodes collapsed)
function_definition (+190 nodes collapsed)
function_definition (+136 nodes collapsed)
function_definition (+125 nodes collapsed)
function_definition (+83 nodes collapsed)
function_definition (+252 nodes collapsed)
function_definition (+55 nodes collapsed)
function_definition (+79 nodes collapsed)
function_definition (+418 nodes collapsed)
function_definition (+125 nodes collapsed)
function_definition (+90 nodes collapsed)
function_definition (+179 nodes collapsed)
function_definition (+52 nodes collapsed)
function_definition (+46 nodes collapsed)
function_definition (+470 nodes collapsed)
function_definition (+54 nodes collapsed)
function_definition (+84 nodes collapsed)
function_definition (+72 nodes collapsed)
preproc_def
#define "#define"
identifier "PERF_X86_EVENT_PEBS_HSW_PREC"
preproc_arg "(PERF_X86_EVENT_PEBS_ST_HSW | \\\n\t\t PERF_X86_EVENT_PEBS_LD_HS"...
function_definition (+185 nodes collapsed)
function_definition (+101 nodes collapsed)
preproc_def
#define "#define"
identifier "PERF_SAMPLE_ADDR_TYPE"
preproc_arg "(PERF_SAMPLE_ADDR |\t\t\\\n\t\t\t\t PERF_SAMPLE_PHYS_ADDR |\t\\\n\t\t\t\t P"...
function_definition (+810 nodes collapsed)
function_definition (+223 nodes collapsed)
function_definition (+178 nodes collapsed)
function_definition (+331 nodes collapsed)
preproc_def
#define "#define"
identifier "PEBS_LATENCY_MASK"
preproc_arg "0xffff"
function_definition (+68 nodes collapsed)
function_definition (+106 nodes collapsed)
function_definition (+108 nodes collapsed)
function_definition (+258 nodes collapsed)
comment "/*\n * With adaptive PEBS the layout depends on what fields a"...
function_definition (+763 nodes collapsed)
function_definition (+50 nodes collapsed)
function_definition (+823 nodes collapsed)
function_definition (+241 nodes collapsed)
comment "/*\n * Special variant of intel_pmu_save_and_restart() for au"...
function_definition (+246 nodes collapsed)
type_definition (+46 nodes collapsed)
declaration
storage_class_specifier
static "static"
struct_specifier
struct "struct"
type_identifier "pt_regs"
identifier "dummy_iregs"
; ";"
function_definition (+83 nodes collapsed)
function_definition (+233 nodes collapsed)
function_definition (+221 nodes collapsed)
function_definition (+290 nodes collapsed)
function_definition (+113 nodes collapsed)
function_definition (+771 nodes collapsed)
function_definition (+214 nodes collapsed)
function_definition (+172 nodes collapsed)
function_definition (+410 nodes collapsed)
function_definition (+526 nodes collapsed)
function_definition (+82 nodes collapsed)
comment "/*\n * PEBS probe and setup\n */"
function_definition (+676 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+70 nodes collapsed)