Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp314258pxk; Wed, 2 Sep 2020 01:56:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNT5F1J+Y6rg8wmYmRFqS28dMTTNUdVtJOB+DERazXmqGYpfP3yp8FPslE0cmpvVyKWHVA X-Received: by 2002:aa7:d296:: with SMTP id w22mr5552697edq.327.1599037006072; Wed, 02 Sep 2020 01:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599037006; cv=none; d=google.com; s=arc-20160816; b=sPgm7IET7l5vJC3zwIP7LXTa5opUOX5oCfSnZdYDlCHt0gu7osmzj5DIWm2FSZz8eR 1SALJtAT0Gy0vQgvvNO6ghxLiXjmpN6PV0/4SIT+PSslOglYtWhZ5Hyl0/kDBVtjPm7V tX0vVnvBKhYLlJesT3zqTiHCf+W36QVLn7IxR4hKlvbb3Ga4ARSWMRSlOGii8BlWozYi SABnG+Cvk6J/MDffyBsNuLTYnJlF1elbinsMV3Rcf2YgZ8K4tG69nwLuP/VmiDgYHJO5 BsU2SDUGWABVxsLiRab89FERA45JqL/hnnSqiWJaRVAi4o4K3cpMTcy8DdwOaTbTgPTe BFhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4vyXXX0r/UrEKjwqdAyFba/z575RE+EejqU1Q5+K+vI=; b=w6CZE5n9UsMEP1xfNtrwipE76dJx8MCyzwPHReaClaf2nS5qGZD7ejl0jAceYnj5bW 61T05yfeCCt2XE3vitfY/8timK2ozP/tw3Fy32jie8FHe/b/xwgHkmYrTCqzV2eknQUN //HpSZrXG6aR8lWzFrmbnM4jZ8+BJ/vy5cx4fwbP1Zz3l+GnZ8qTnpGX+Pi1T9kocIRh Hq1Vyj6EBKgrSuBVQV8JwKJle4cPawhTMjxf09BbUe1f5HKJ2SJPy5eGuiqAZmfTykKR 84yVSMQCzMyjRwOQzj+E6PtO7j4IMycQW6IN4+d6MKXQ1qvTp+8kdXqwXzndgBOJWwah k2Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lUOo8gxW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si2037851edi.411.2020.09.02.01.56.23; Wed, 02 Sep 2020 01:56:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lUOo8gxW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726724AbgIBIzc (ORCPT + 99 others); Wed, 2 Sep 2020 04:55:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:35030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbgIBIza (ORCPT ); Wed, 2 Sep 2020 04:55:30 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B895207EA; Wed, 2 Sep 2020 08:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599036929; bh=XSL6G6Qu2uR5HLAFtRocNyj4crqp5skmu2VNvQ7XRR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lUOo8gxWvD+LiR0t4vNlt6pHdphs40iKwRlOAPyuFeQKwCB6tpFJHnRZkgkJeeBk9 aRljgbYCwf9fyPels69KSbJKoMMNmN5Dmtz9zZujA4B2byKnaDGzDJBeOMn+MIcFrA ubMEIuOP+8X7+xEKP94hnM//nJmVCOo2R/dhda4A= From: Leon Romanovsky To: Linus Torvalds , Peter Oberparleiter Cc: Leon Romanovsky , linux-kernel@vger.kernel.org, Colin Ian King , Andrew Morton Subject: [PATCH rdma-next 4/4] gcov: Don't print out-of-memory print for all failed files Date: Wed, 2 Sep 2020 11:55:13 +0300 Message-Id: <20200902085513.748149-5-leon@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200902085513.748149-1-leon@kernel.org> References: <20200902085513.748149-1-leon@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky 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 Signed-off-by: Leon Romanovsky --- 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