You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Tim Armstrong (Code Review)" <ge...@cloudera.org> on 2016/04/15 02:24:21 UTC

[Impala-CR](cdh5-trunk) PREVIEW ONLY: basic perf support and asm dumps for codegened code

Tim Armstrong has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/2793

Change subject: PREVIEW ONLY: basic perf support and asm dumps for codegened code
......................................................................

PREVIEW ONLY: basic perf support and asm dumps for codegened code

This depends on the LLVM 3.8 patch.

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 security features that perf complains about.

If 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 temporarily enabled debug symbols in cross-compiled IR. I think we
will want to only have them for the release build, but this gets it
working for now. For some reason the symbols don't show up in some
codegened functions, even if they were copies of cross-compiled
functions.

TODO: address TODOs in code
TODO: license headers
TODO: finalise asm file syntax
TODO: rewrite perf map rather than just appending always?

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


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/93/2793/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If25de61e46f4db005956686cddbd4d71a1424528
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>