[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200902085513.748149-5-leon@kernel.org>
Date: Wed, 2 Sep 2020 11:55:13 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Oberparleiter <oberpar@...ux.ibm.com>
Cc: Leon Romanovsky <leonro@...dia.com>, linux-kernel@...r.kernel.org,
Colin Ian King <colin.king@...onical.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH rdma-next 4/4] gcov: Don't print out-of-memory print for all failed files
From: Leon Romanovsky <leonro@...dia.com>
Once GCOV fails to duplicate information, the following error is
printed:
gcov: could not save data for '/home/leonro/src/kernel/drivers/infiniband/hw/mlx5/std_types.gcda' (out of memory)
In the event of out-of-memory such prints are seen for almost every kernel
file, so instead of spamming dmesg, we print the first failure and inform
the user that future prints are suppressed.
Cc: Colin Ian King <colin.king@...onical.com>
Signed-off-by: Leon Romanovsky <leonro@...dia.com>
---
kernel/gcov/fs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c
index 82babf5aa077..b74d426ca99e 100644
--- a/kernel/gcov/fs.c
+++ b/kernel/gcov/fs.c
@@ -685,8 +685,9 @@ static void save_info(struct gcov_node *node, struct gcov_info *info)
else {
node->unloaded_info = gcov_info_dup(info);
if (!node->unloaded_info) {
- pr_warn("could not save data for '%s' "
- "(out of memory)\n",
+ pr_warn_once(
+ "could not save data for first file '%s' "
+ "(out of memory), other files are suppressed\n",
gcov_info_filename(info));
}
}
--
2.26.2
Powered by blists - more mailing lists