1 # REQUIRES: native && x86_64-linux
3 # FIXME: Investigate why broken with MSAN
6 # RUN: rm -rf %t && mkdir -p %t
7 # RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \
8 # RUN: -filetype=obj -o %t/ELF_x86-64_perf.o %s
9 # RUN: env JITDUMPDIR="%t" llvm-jitlink -perf-support \
10 # RUN: %t/ELF_x86-64_perf.o
11 # RUN: test -f %t/.debug/jit/llvm-IR-jit-*/jit-*.dump
13 # Test ELF perf support for code load records and unwind info
17 .section .text.source,"ax",@progbits
18 .globl source # -- Begin function source
20 .type source,@function
23 .file 1 "/app" "example.c"
24 .loc 1 1 0 # example.c:1:0
27 .loc 1 2 5 prologue_end # example.c:2:5
32 .size source, .Lfunc_end0-source
35 .section .text.passthrough,"ax",@progbits
36 .globl passthrough # -- Begin function passthrough
38 .type passthrough,@function
39 passthrough
: # @passthrough
41 .loc 1 5 0 # example.c:5:0
44 .loc 1 6 5 prologue_end # example.c:6:5
49 .size passthrough, .Lfunc_end1-passthrough
52 .section .text.main,"ax",@progbits
53 .globl main # -- Begin function main
58 .loc 1 9 0 # example.c:9:0
61 .loc 1 10 5 prologue_end # example.c:10:5
66 .size main, .Lfunc_end2-main
69 .section .debug_abbrev,"",@progbits
70 .byte 1 # Abbreviation Code
71 .byte 17 # DW_TAG_compile_unit
72 .byte 1 # DW_CHILDREN_yes
73 .byte 37 # DW_AT_producer
74 .byte 14 # DW_FORM_strp
75 .byte 19 # DW_AT_language
76 .byte 5 # DW_FORM_data2
78 .byte 14 # DW_FORM_strp
79 .byte 16 # DW_AT_stmt_list
80 .byte 23 # DW_FORM_sec_offset
81 .byte 27 # DW_AT_comp_dir
82 .byte 14 # DW_FORM_strp
83 .byte 17 # DW_AT_low_pc
84 .byte 1 # DW_FORM_addr
85 .byte 85 # DW_AT_ranges
86 .byte 23 # DW_FORM_sec_offset
89 .byte 2 # Abbreviation Code
90 .byte 46 # DW_TAG_subprogram
91 .byte 0 # DW_CHILDREN_no
92 .byte 17 # DW_AT_low_pc
93 .byte 1 # DW_FORM_addr
94 .byte 18 # DW_AT_high_pc
95 .byte 6 # DW_FORM_data4
96 .byte 64 # DW_AT_frame_base
97 .byte 24 # DW_FORM_exprloc
98 .ascii "\227B" # DW_AT_GNU_all_call_sites
99 .byte 25 # DW_FORM_flag_present
101 .byte 14 # DW_FORM_strp
102 .byte 58 # DW_AT_decl_file
103 .byte 11 # DW_FORM_data1
104 .byte 59 # DW_AT_decl_line
105 .byte 11 # DW_FORM_data1
106 .byte 73 # DW_AT_type
107 .byte 19 # DW_FORM_ref4
108 .byte 63 # DW_AT_external
109 .byte 25 # DW_FORM_flag_present
112 .byte 3 # Abbreviation Code
113 .byte 36 # DW_TAG_base_type
114 .byte 0 # DW_CHILDREN_no
116 .byte 14 # DW_FORM_strp
117 .byte 62 # DW_AT_encoding
118 .byte 11 # DW_FORM_data1
119 .byte 11 # DW_AT_byte_size
120 .byte 11 # DW_FORM_data1
124 .section .debug_info,"",@progbits
126 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
128 .short 4 # DWARF version number
129 .long .debug_abbrev # Offset Into Abbrev. Section
130 .byte 8 # Address Size (in bytes)
131 .byte 1 # Abbrev [1] 0xb:0x72 DW_TAG_compile_unit
132 .long .Linfo_string0 # DW_AT_producer
133 .short 12 # DW_AT_language
134 .long .Linfo_string1 # DW_AT_name
135 .long .Lline_table_start0 # DW_AT_stmt_list
136 .long .Linfo_string2 # DW_AT_comp_dir
137 .quad 0 # DW_AT_low_pc
138 .long .Ldebug_ranges0 # DW_AT_ranges
139 .byte 2 # Abbrev [2] 0x2a:0x19 DW_TAG_subprogram
140 .quad .Lfunc_begin0 # DW_AT_low_pc
141 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
142 .byte 1 # DW_AT_frame_base
144 # DW_AT_GNU_all_call_sites
145 .long .Linfo_string3 # DW_AT_name
146 .byte 1 # DW_AT_decl_file
147 .byte 1 # DW_AT_decl_line
148 .long 117 # DW_AT_type
150 .byte 2 # Abbrev [2] 0x43:0x19 DW_TAG_subprogram
151 .quad .Lfunc_begin1 # DW_AT_low_pc
152 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
153 .byte 1 # DW_AT_frame_base
155 # DW_AT_GNU_all_call_sites
156 .long .Linfo_string5 # DW_AT_name
157 .byte 1 # DW_AT_decl_file
158 .byte 5 # DW_AT_decl_line
159 .long 117 # DW_AT_type
161 .byte 2 # Abbrev [2] 0x5c:0x19 DW_TAG_subprogram
162 .quad .Lfunc_begin2 # DW_AT_low_pc
163 .long .Lfunc_end2-.Lfunc_begin2 # DW_AT_high_pc
164 .byte 1 # DW_AT_frame_base
166 # DW_AT_GNU_all_call_sites
167 .long .Linfo_string6 # DW_AT_name
168 .byte 1 # DW_AT_decl_file
169 .byte 9 # DW_AT_decl_line
170 .long 117 # DW_AT_type
172 .byte 3 # Abbrev [3] 0x75:0x7 DW_TAG_base_type
173 .long .Linfo_string4 # DW_AT_name
174 .byte 5 # DW_AT_encoding
175 .byte 4 # DW_AT_byte_size
176 .byte 0 # End Of Children Mark
178 .section .debug_ranges,"",@progbits
188 .section .debug_str,"MS",@progbits,1
190 .asciz "clang version 15.0.0 (https://github.com/llvm/llvm-project.git 4ba6a9c9f65bbc8bd06e3652cb20fd4dfc846137)" # string offset=0
192 .asciz "/app/example.c" # string offset=105
194 .asciz "/app" # string offset=120
196 .asciz "source" # string offset=125
198 .asciz "int" # string offset=132
200 .asciz "passthrough" # string offset=136
202 .asciz "main" # string offset=148
203 .ident "clang version 15.0.0 (https://github.com/llvm/llvm-project.git 4ba6a9c9f65bbc8bd06e3652cb20fd4dfc846137)"
204 .section ".note.GNU-stack","",@progbits
206 .section .debug_line,"",@progbits