gallivm: use sstream for dissasembling
authorOded Gabbay <oded.gabbay@gmail.com>
Thu, 18 Feb 2016 13:53:23 +0000 (15:53 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 18 Feb 2016 22:18:11 +0000 (00:18 +0200)
commitb3d42934a1cc4ac47367ea632e7467c2ada46aff
tree1732de3aa45ff6eda47285da47c2628a3d0ee311
parent93c62fdee93062890c193b515f522375949dedc9
gallivm: use sstream for dissasembling

Currently, disassemble() directly prints to stdout. This has broke the
profiling support for llvmpipe JIT code.

This patch redirects the output to an sstream object, which is then
either gets printed to stdout (for assembly debugging) or gets written
to a file in /tmp/ (for profiling support).

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp