summaryrefslogtreecommitdiff
path: root/tools/intel_gpu_top.c
AgeCommit message (Collapse)Author
2013-03-04build: Guard the inclusions of config.h with HAVE_CONFIG_HDamien Lespiau
autoconf can be configured to not generate a config.h but to give the defines with command line arguments instead. In this case, there's no config.h to include. To work in both cases autoconf adds a HAVE_CONFIG_H define on the command line to signal there's a config.h to include. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2012-08-30clang: Fix static analysis warnings from clangBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-05-16intel_gpu_top: allow to work on Gen7Eugeni Dodonov
Somehow nobody noticed this before, but we were missing blt and bsd6 initialization on Gen7. Reported-by: Philippe Lecluse <philippe.lecluse@intel.com> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-03-19intel_gpu_top: Trust the register access is safeChris Wilson
Fixes intel_gpu_top on gen3 which otherwise refuses to do mmio. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-06Move free(cmd) to after last use of cmd in intel_gpu_topAlan Coopersmith
Error: Use after free (CWE 416) Use after free of pointer 'cmd' in call to fprintf at line 496 of tools/intel_gpu_top.c in function 'main'. Previously freed at line 491 with free. [ This bug was found by the Parfait 0.4.2 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09tools/intel_gpu_top: fixup new warningsDaniel Vetter
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08Solaris defines struct winsize in termios.hAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-09intel_gpu_top: use debugfs interface for forcewakeEugeni Dodonov
Using debugfs facilities for forcewake-related stuff. Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-10-19top: Avoid FPE by removing meaningless metricChris Wilson
2011-10-14Allow to output statistics to stdout.Eugeni Dodonov
This allows intel_gpu_top to run both in statistics-collecting mode (collecting the per-ring statistics in gnuplot-friendly format) and ncurses top-like mode at the same time. It also allows to output the statistics directly to stdout, by using "-o -", so the results can be parsed directly via a popen() parsing. If you are using intel_gpu_top as previously (without any command-line arguments), it should change nothing for you. If you were using its logging facilities (e.g., the '-o file'), note that the logging will keep running, but the detailed top-like interface will be on the screen at the same time. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05intel_gpu_top: access hardware before running profiling commandEugeni Dodonov
Without this patch, intel_gpu_top will try to get access to the hardware after running the profiling command in the background. In case such access fails, the main process quits, but the background one will continue running. So let's move this test up, so it is done before we fork. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05intel_gpu_tools: describe -e option in usage screenEugeni Dodonov
This patch adds a short description of '-e' option to the usage screen. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05intel_gpu_top: adopt to kernel coding styleEugeni Dodonov
This patch fixes adopts the code to the kernel coding_style.
2011-09-05intel_gpu_top: support profiling user-specified commandsEugeni Dodonov
This patch adds support for running intel_gpu_top to profile specific commands. The required command will be carried out in separate process, and main intel_gpu_top will leave when the child process will exit. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05intel_gpu_top: support non-interactive modeEugeni Dodonov
This patch adds support for non-interactive mode, invoked by running with '-o output' switch. In this case, no interactive output is being performed, but the execution statistics are being saved into the output file. The output file is generated in both human and gnuplot-readable format. Unlike interactive mode, where non-supported pipes and non-active registers are skipped, the content of such pipes and registers is recorded into the log file to simplify parsing and standardize the list of columns. Also, unlike interactive mode, the registers are not sorted according to the usage - this way, their variation over time can be analysed offline. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05This patch initializes the last_stats[] for registers prior to startingEugeni Dodonov
the monitoring itself. This way, the first measure will already contain the difference from the previous value instead of non-initialized value. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05Revert "intel_gpu_top: initialize monitoring statistics at startup"Eugeni Dodonov
This reverts commit 431fe7803d37f344275fdaceb57c1fbaeee8541c. Will be replaced with more fine-grained commits.
2011-09-05intel_gpu_top: initialize monitoring statistics at startupEugeni Dodonov
This patch initializes the last_stats[] for registers prior to starting the monitoring itself. This way, the first measure will already contain the difference from the previous value instead of non-initialized value. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05intel_gpu_tool: initial support for non-screen outputEugeni Dodonov
This patch adds initial support for non-stdio output, to be used for non-interactive monitoring. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05intel_gpu_top: suport command line parameters and variable samples perEugeni Dodonov
second This patch adds support for getopt, and adds two default parameters to it: -h to show usage notes; and -s to allow user to define number of samples to acquire per second. Manpage documentation is also adjusted accordingly. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05intel_gpu_top: account for time spent in syscallsEugeni Dodonov
This allows intel_gpu_top to properly account for time spent inside system calls. Effectively, with previous implementation, intel_gpu_top could spent longer than 1s between consecutive measures. This attempts to minimize the extra time spent while polling for data. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-02-01Search for the first Intel dri device.Chris Wilson
This is vital in a multi-GPU system so that we only test the Intel card and not the discrete GPUs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-09gpu-top: Correct computation of ring sizeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-07intel_gpu_top: Include BLT ringChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-07intel_gpu_top: Wake the GT power well to read gen6 ring registersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-16intel_gpu_top: Print stats regs on Ironlake as well.Eric Anholt
2010-10-01intel_gpu_top: Sample BSD rings as well as renderChris Wilson
Show how busy the GPU is when decoding video as well as rendering. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-19intel_gpu_top: Fix the "limit printing to terminal height" again.Eric Anholt
2010-04-08Enable compilation on non-Intel, non-DRM systems.Chris Wilson
A few of the tools can be performed post-mortem from a different system, so it is useful to be able to compile those tools on those foreign systems. Obviously, any program to interact with the PCI device or talk to GEM will fail on a non-Intel system. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-25intel_gpu_top: Print stats lines even when there's no done bit on the line.Eric Anholt
2010-02-25intel_gpu_top: Print the vertex/primitive statistics on gen4+.Eric Anholt
This requires that the window be much wider. I'm not sure how we really want to lay out this interface usably, but so far giant windows are working well enough for me.
2009-12-15intel_gpu_top: Fix broken clock reporting.Shuang He
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-12-10Limit printing to terminal height in intel_gpu_top.Kenneth Graunke
When using intel_gpu_top in a small terminal, the most important information (ring idle/busy units) scrolls off the top of the screen. This patch limits the number of lines printed to the terminal height so that the most idle units (at the bottom) are truncated instead. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2009-06-30intel_gpu_top: Move instdone bit definitions to lib to share with _dump.Eric Anholt
2009-06-23Add more 965 INSTDONE bits.Eric Anholt
This shows off the units that are stuck busy in the ut2004 hang.
2009-06-09Make the precentage bars fit in 80 columns.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-09A pedantic addition of a format string to a printf callRobert Bragg
The printf used to clear the screen didn't have a format string, this adds one to avoid a compiler warning. Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-09Adds unicode bars for quickly visualizing the busy percentagesRobert Bragg
It can be a bit easier to digest the percentages with bar graphs than by scanning continually changing numbers. Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-09Increases the sample frequency from 100/sec to 10,000/secRobert Bragg
For a typical vsync locked application running at 60fps, sampling at just under twice a frame doesn't seem to give very stable lists of relevent hardware units because there are a number of units involved that may not be sampled one second to the next. This bumps the sample rate to 10,000 instead which is ~ 170 samples per frame so we tend to hit all the units involved. It also changes the report threshold to a sample count >= 1, so you don't see as many units with a percentage of 0. Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-09Revert "intel_gpu_top:print a visual clue on how big a certain use is"Robert Bragg
This reverts commit 5e13b98da1e7e31cffba84fd257002357d5f2682. We can print prettier graphs using unicode Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-04intel_gpu_top: Print GPU clock information, which seems interesting.Eric Anholt
2009-06-04intel_gpu_top:print a visual clue on how big a certain use isArjan van de Ven
humans are pretty bad at reading percentages quicky; this patch adds a histogram capability to make it more visually clear as to which lines are big ticket items
2009-04-27intel_gpu_top: Add ring information.Eric Anholt
2009-03-27intel_gpu_top: Add more 965 bits.Eric Anholt
2009-03-27Port intel_idle from 2D driver as intel_gpu_top with a better interface.Eric Anholt