impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-CR](cdh5-trunk) IMPALA-3166: basic perf support and asm dumps for codegened code
Date Wed, 11 May 2016 23:57:06 GMT
Hello Internal Jenkins, Dan Hecht,

I'd like you to reexamine a change.  Please visit

to look at the new patch set (#8).

Change subject: IMPALA-3166: basic perf support and asm dumps for codegened code

IMPALA-3166: basic perf support and asm dumps for codegened code

Adds support for communicating function-level symbols to perf by writing
/tmp/perf-<pid>.data if the --perf_map=true argument is set. Perf must
be run under the same user as Impala. I.e. 'sudo perf top' does not
work. To get perf to work under a non-root user you will probably need
to disable some kernel security features that perf complains about:

sudo bash -c 'echo -1 > /proc/sys/kernel/perf_event_paranoid'
sudo bash -c 'echo 0 > /proc/sys/kernel/kptr_restrict'

Once you get it working you should see IR function names concatenated with
the fragment instance id in 'perf top'. 'perf annotate' does not work.

Implements --asm_module_dir, analogous to --opt_module_dir. We dump
disassembly to files there. Debug symbols are interleaved with the
assembly if they are available. I enabled them for the debug
build, now that we have some purpose for them.  In some cases
it would be useful to have them for the release build, but
they make the llvm module much larger so I haven't enabled them

The asm dump for a random exception constructor looks like this:

Disassembly for __cxx_global_var_init.165:324bc8754182e7c6:22735c36d7a2bc0 (0x7f50f2140300):
0:              movabsq $0, %rax
10:             movb    (%rax), %cl
12:             cmpb    $0, %cl
15:             jne     17
17:             movabsq $0, %rax
27:             movq    $1, (%rax)
34:             retq

Change-Id: If25de61e46f4db005956686cddbd4d71a1424528
M be/CMakeLists.txt
M be/src/codegen/CMakeLists.txt
A be/src/codegen/
A be/src/codegen/codegen-symbol-emitter.h
M be/src/codegen/
M be/src/codegen/llvm-codegen.h
M cmake_modules/FindLlvm.cmake
7 files changed, 356 insertions(+), 2 deletions(-)

  git pull ssh:// refs/changes/93/2793/8
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If25de61e46f4db005956686cddbd4d71a1424528
Gerrit-PatchSet: 8
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Tim Armstrong <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Skye Wanderman-Milne <>
Gerrit-Reviewer: Tim Armstrong <>

View raw message