[igt-dev] [PATCH i-g-t] lib: Bump debug information for lack-of-memory to warn
Petri Latvala
petri.latvala at intel.com
Fri Jun 15 10:55:38 UTC 2018
On Tue, May 01, 2018 at 02:52:31PM +0100, Chris Wilson wrote:
> At present, we never see the debug output of intel_require_memory() as
> the debug log is not automaticaly dumped on requirement fail (only on
> error). Promote the igt_debug showing the meminfo/slabinfo to igt_warn
> so that they are visible on stderr without any trickery or --debug.
>
> References: e5829165c2ef ("lib: Dump meminfo and slabinfo if we complain about insufficient memory")
> References: https://bugs.freedesktop.org/show_bug.cgi?id=105967
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Petri Latvala <petri.latvala at intel.com>
> ---
> lib/intel_os.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/intel_os.c b/lib/intel_os.c
> index f7ad05acc..37aaf1c8c 100644
> --- a/lib/intel_os.c
> +++ b/lib/intel_os.c
> @@ -291,15 +291,15 @@ void intel_require_memory(uint64_t count, uint64_t size, unsigned mode)
>
> info = igt_sysfs_get(dir, "meminfo");
> if (info) {
> - igt_debug("Insufficient free memory; /proc/meminfo:\n%s",
> - info);
> + igt_warn("Insufficient free memory; /proc/meminfo:\n%s",
> + info);
> free(info);
> }
>
> info = igt_sysfs_get(dir, "slabinfo");
> if (info) {
> - igt_debug("Insuffucient free memory; /proc/slabinfo:\n%s",
> - info);
> + igt_warn("Insufficient free memory; /proc/slabinfo:\n%s",
> + info);
> free(info);
> }
>
> --
> 2.17.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list