# Profiled JIT dump lacks machine code

**URL:** <https://discourse.julialang.org/t/profiled-jit-dump-lacks-machine-code/54307>\
**Category:** General Usage\
**Tags:** question, linux, profiling\
**Created:** [January 31, 2021, 12:52am UTC](https://discourse.julialang.org/t/profiled-jit-dump-lacks-machine-code/54307 "2021-01-31T00:52:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bicycle1885](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bicycle1885/32/107_2.png) [@bicycle1885](https://discourse.julialang.org/u/bicycle1885)\
**Post date:** [January 31, 2021, 12:52am UTC](https://discourse.julialang.org/t/profiled-jit-dump-lacks-machine-code/54307/1 "2021-01-31T00:52:24Z")

</div>

Hi all,

I would like to profile Julia functions at instruction level using Linux perf. However, I cannot see disassembled machine code in the result. As you can see below, the disassembled code just after `julia_partition!_53` is omitted with dots:

```julia
~/tmp $ env ENABLE_JITPROFILING=1 perf record -k mono julia-1.6 -e 'sort(randn(100_000_000))'
[perf record: Woken up 5 times to write data]
[perf record: Captured and wrote 1.302 MB perf.data (33900 samples)]
~/tmp $ perf inject --jit --input perf.data --output perf.jit.data
PERFILE2h⏎                                                                                                                     
~/tmp $ perf annotate -i perf.jit.data | head -20
 Percent | Source code & Disassembly of jitted-304678-25.so for cycles:u (12117 samples, percent: local period)
--------------------------------------------------------------------------------------------------------------------
         :
         :
         :
         : Disassembly of section .text:
         :
         : 0000000000000040 <julia_partition!_53>:
         : ...
 Percent | Source code & Disassembly of jitted-304678-31.so for cycles:u (11920 samples, percent: local period)
--------------------------------------------------------------------------------------------------------------------
         :
         :
         :
         : Disassembly of section .text:
         :
         : 0000000000000040 <julia_partition!_45>:
         : ...
 Percent | Source code & Disassembly of jitted-304678-34.so for cycles:u (1587 samples, percent: local period)
-------------------------------------------------------------------------------------------------------------------
~/tmp $ julia-1.6 -q
julia> versioninfo()
Julia Version 1.6.0-beta1
Commit b84990e1ac (2021-01-08 12:42 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 9 3950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.0 (ORCJIT, znver2)
Environment:
  JULIA_PROJECT = @.

julia>

```

The relevant part of the generated object file seems to be filled with zeros:

```julia
~/tmp $ hexdump -C ~/.debug/jit/llvm-IR-jit-20210131-4fc7cb/jitted-304678-25.so | head
00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 03 00 3e 00 01 00 00 00 40 00 00 00 00 00 00 00 |..>.....@.......|
00000020 00 00 00 00 00 00 00 00 18 05 00 00 00 00 00 00 |................|
00000030 00 00 00 00 40 00 00 00 00 00 40 00 09 00 02 00 |....@.....@.....|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000170 00 00 2e 74 65 78 74 00 2e 73 68 73 74 72 74 61 |...text..shstrta|
00000180 62 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74 61 |b..symtab..strta|
00000190 62 00 2e 6e 6f 74 65 2e 67 6e 75 2e 62 75 69 6c |b..note.gnu.buil|
000001a0 64 2d 69 64 00 2e 64 65 62 75 67 5f 6c 69 6e 65 |d-id..debug_line|

```

What I expected is disassembled code with profiling annotations like shown at the bottom of this page [Profiling with Perf - Wasmtime](https://docs.wasmtime.dev/examples-profiling-perf.html).

Any hints are appreciated.
