summaryrefslogtreecommitdiff
path: root/tools/Makefile.sources
diff options
context:
space:
mode:
authorAkash Goel <akash.goel@intel.com>2016-10-25 11:38:22 +0300
committerPetri Latvala <petri.latvala@intel.com>2016-10-25 11:38:22 +0300
commit128d27a01cce753f19e82844fead910f10ec13b3 (patch)
tree35c21fdd4fb0be389acc0abf9bc9f427b2c71b6e /tools/Makefile.sources
parent1df15aff40282afc5bdb111550beb218a53f615e (diff)
This patch provides a test utility which helps capture GuC firmware logs and
then dump them to file. The logs are pulled from a debugfs file '/sys/kernel/debug/dri/guc_log' and by default stored into a file 'guc_log_dump.dat'. The name, including the location, of the output file can be changed through a command line argument. The utility goes into an infinite loop where it waits for the arrival of new logs and as soon as new set of logs are produced it captures them in its local buffer which is then flushed out to the file on disk. Any time when logging needs to be ended, User can stop this utility (CTRL+C). Before entering into a loop, it first discards whatever logs are present in the debugfs file. This way User can first launch this utility and then start a workload/activity for which GuC firmware logs are to be actually captured and keep running the utility for as long as its needed, like once the workload is over this utility can be forcefully stopped. If the logging wasn't enabled on GuC side by the Driver at boot time, utility will first enable the logging and later on when it is stopped (CTRL+C) it will also pause the logging on GuC side. v2: - Use combination of alarm system call & SIGALRM signal to run the utility for required duration. (Tvrtko) - Fix inconsistencies, do minor cleanup and refactoring. (Tvrtko) v3: - Fix discrepancy for the output file command line option and update the Usage/help string. v4: - Update the exit condition for flusher thread, now will exit only after the capture loop is over and not when the flag to stop logging is set. This handles a corner case, due to which the dump of last captured buffer was getting missed. - Add a newline character at the end of assert messages. - Avoid the assert for the case, which occurs very rarely, when there are no bytes read from the relay file. Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Akash Goel <akash.goel@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v3)
Diffstat (limited to 'tools/Makefile.sources')
-rw-r--r--tools/Makefile.sources1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/Makefile.sources b/tools/Makefile.sources
index 2bb6c8e1..be58871c 100644
--- a/tools/Makefile.sources
+++ b/tools/Makefile.sources
@@ -19,6 +19,7 @@ tools_prog_lists = \
intel_gpu_time \
intel_gpu_top \
intel_gtt \
+ intel_guc_logger \
intel_infoframes \
intel_l3_parity \
intel_lid \