tools: Add LD_PRELOAD-base AUB dumper tool
PATCH 1/1 tools: Add LD_PRELOAD-base AUB dumper tool
From: Kristian Høgsberg Kristensen <[email protected]>
This does everything the aub dump functionality in libdrm does, but without being part of libdrm. This moves the very developer oriented functionality out of core libdrm and adds some flexibility in how we activate it (we can specify filename, for example). Most importantly, this lets us dump aub files for tools and/or drivers that don't use libdrm, without having to add that code to each of those projects.
The tool is used much like strace or valgrind. For example:
$ intel_aubdump -v --output=stuff.aub -- glxgears -geometry 500x500
will launch glxgears with its options and enable aub dumping and pass the -v and --output=stuff.aub options to the aub dumper.
--- configure.ac | 5 +- tools/.gitignore | 1 + tools/Makefile.am | 12 ++ tools/aubdump.c | 505 +++++++++++++++++++++++++++++++++++++++++++++++++ tools/intel_aub.h | 153 +++++++++++++++ tools/intel_aubdump.in | 68 +++++++ 6 files changed, 743 insertions(+), 1 deletion(-) create mode 100644 tools/aubdump.c create mode 100644 tools/intel_aub.h create mode 100644 tools/intel_aubdump.in
configure.ac +4 -1
@@ -255,6 +255,7 @@ AC_CONFIG_FILES([ scripts/Makefile tests/Makefile tools/Makefile + tools/intel_aubdump tools/quick_dump/Makefile tools/null_state_gen/Makefile debugger/Makefile
@@ -264,7 +265,9 @@ AC_CONFIG_FILES([ assembler/test/Makefile assembler/intel-gen4asm.pc overlay/Makefile - ]) + ], + [chmod +x tools/intel_aubdump]) + AC_OUTPUT # Print a summary of the compilation
tools/.gitignore +1 -0
@@ -1,6 +1,7 @@ # Please keep sorted alphabetically hsw_compute_wrpll igt_stats +intel_aubdump intel_audio_dump intel_backlight intel_bios_dumper
tools/Makefile.am +12 -0
@@ -10,3 +10,15 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(LIBUNWIND_LIBS) -lm + +# aubdumper + +module_LTLIBRARIES = intel_aubdump.la +moduledir = $(libdir) +intel_aubdump_la_LDFLAGS = -module -avoid-version -no-undefined +intel_aubdump_la_SOURCES = aubdump.c intel_aub.h +intel_aubdump_la_LIBADD = $(top_builddir)/lib/libintel_tools.la + +bin_SCRIPTS = intel_aubdump +CLEANFILES = $(bin_SCRIPTS) +
tools/aubdump.c new file +505 -0
505 lines not on this page · raw message
tools/intel_aub.h new file +153 -0
153 lines not on this page · raw message
tools/intel_aubdump.in new file +68 -0
68 lines not on this page · raw message
Signature · 6 lines
2.4.6 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx