Commit Graph

15 Commits

Author SHA1 Message Date
Marek Olšák 80b8b9c8a4 gallium/hud: add an option to reset the color counter
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-01-05 18:30:00 +01:00
Edmondo Tommasina 57f86fb3a8 gallium/hud: move file initialization to a function
The function will be used later to create the filedescriptor
for other metrics.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-01-01 00:03:38 +01:00
Edmondo Tommasina 22cd9040da gallium/hud: dump hud_driver_query values to files
Dump values for every selected data source in GALLIUM_HUD.

Every data source has its own file and the filename is
equal to the data source identifier.

Set GALLIUM_HUD_DUMP_DIR to dump values to files in this directory.

No values are dumped if the environment variable is not set, the
directory doesn't exist or the user doesn't have write access.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-01-01 00:03:06 +01:00
Steven Toth e99b9395be gallium/hud: Add support for CPU frequency monitoring
Detect all of the CPUs in the system. Expose metrics
for min, max and current frequency in Hz.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-09-30 15:18:46 -06:00
Steven Toth 1d466b9b04 gallium/hud: Add power sensor support
Implement support for power based sensors, reporting units in
milli-watts and watts.

Also, minor cleanup - change the related if block to a switch.

Tested with two different power sensors, including the nouveau
'power1' sensors on a GTX950 card.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-09-29 17:51:15 -06:00
Steven Toth 8c60bcb4c3 gallium/hud: Add support for block I/O, network I/O and lmsensor stats
V8: Feedback based on peer review
    convert if block into a switch
    Constify some func args

V7: Increase precision when measuring lmsensors volts
    Flatten patch series.

V6: Feedback based on peer review
    Simplify sensor initialization (arg passing).
    Constify some func args

V5: Feedback based on peer review
    Convert sprintf to snprintf
    Convert char * to const char *
    int arg converted to bool
    Func changes to take a filename vs a larger struct.
    Omit the space between '*' and the param name.

V4: Merged with master as of 2016/9/27 6pm

V3: Flatten the entire patchset ready for the ML

V2: Additional seperate patches based on feedback
a) configure.ac: Add a comment related to libsensors

b) HUD: Disable Block/NIC I/O stats by default.
Implement configuration option --enable-gallium-extra-hud=yes
and enable both statistics when this option is enabled.

c) Configure.ac: Minor cleanup to user visible configuration settings

d) Configure.ac: HUD stats - build system improvements
Move the -lsensors out of a deeper Makefile, bring it into the configure.ac.
Also, rename a compiler directive to more closely follow the standard.

V1: Initial release to the ML
Three new features:
1. Disk/block I/O device read/write stats MB/ps.
2. Network Interface RX/TX transfer statistics as a percentage
   of the overall NIC speed.
3. lmsensor power, voltage and temperature sensors.

The lmsensor changes makes a dependency on libsensors so support
for the change is opt out by default.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-09-28 16:18:05 -06:00
Marek Olšák 0328b20050 gallium/hud: round max_value to print nicely rounded numbers next to graphs
This improves readability a lot.

Reviewed-by: Brian Paul <brianp@vmware.com>
2016-08-22 16:01:35 +02:00
Nicolai Hähnle 424a614ff1 gallium/hud: add support for batch queries
v2 + v3: be more defensive about allocations

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2015-11-20 17:27:32 +01:00
Marek Olšák 97a65d90fe gallium,hud: allow displaying cumulative values instead of average
The cumulative value is useful for queries like the number of shader
compilations.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-06 20:44:36 +02:00
Brian Paul 86ebd31c67 gallium/hud: replace byte units flag with pipe_driver_query_type
Instead of using a boolean 'is bytes' value, use the pipe_driver_query_type
enum type.  This will let is add support for time values in the next patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-07-07 12:36:48 -06:00
Jason Ekstrand 7a30668ad6 util: Move gallium's linked list to util
The linked list in gallium is pretty much the kernel list and we would like
to have a C-based linked list for all of mesa.  Let's not duplicate and
just steal the gallium one.

Acked-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
2015-05-08 17:16:13 -07:00
Gediminas Jakutis 6fc0cd2f52 gallium/hud: add more options to customize HUD panes
Extends the syntax of GALLIUM_HUD environment variable to:
- Add options to set the size and exact location of each pane.
- Add an option to limit the maximum allowed value of the X axis on a
  pane, clamping the graph down to not go above this value.
- Add an option to auto-adjust the value of the Y axis down to the
  highest value still visible on the graph.

v2:
- Make the patch simpler and smaller.
- With dynamic auto-adjusting on, adjust the Y axis once per pane
  update instead of updating once every several seconds.
- No longer mishandle pane height when having more than one graph per
  pane.
2015-04-26 00:40:08 +02:00
Brian Paul e3cbb18321 gallium/hud: do not use free() for the free_query_data hook
That confuses Gallium's memory debugging code where CALLOC/MALLOC
must be matched with FREE, not free().

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-06-24 14:23:54 -06:00
Christoph Bumiller 3d2790cead gallium/hud: add support for PIPE_QUERY_PIPELINE_STATISTICS
Also, renamed "pixels-rendered" to "samples-passed" because the
occlusion counter increments even if colour and depth writes are
disabled, or (on some implementations) for killed fragments that
passed the depth test when PS early_fragment_tests is set.
2013-04-03 12:54:43 +02:00
Marek Olšák c91cf7d7d2 gallium: implement a heads-up display module
Reviewed-by: Brian Paul <brianp@vmware.com>

v2: lots of cosmetic changes
2013-03-26 01:28:19 +01:00