Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2098721imm; Wed, 16 May 2018 07:53:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoS4QGqkCcV4yvwGTsuZhh4HfPOBTH8lhJCAuZQi29Nsy8yxFECPjjhciBruvrSE9rkgvyX X-Received: by 2002:a62:415d:: with SMTP id o90-v6mr1311201pfa.140.1526482407653; Wed, 16 May 2018 07:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526482407; cv=none; d=google.com; s=arc-20160816; b=J2T0V3g3x+Lj3J1oAGsbs7dec5NOMS0O9/OT/qZLUWIL4qfScPtI2EKEGLBnyczyTB qgrR+7RJXrJmbLR0lh6t/Pr3UWFa4oaMXUZVth5rP8zRghtbUOXzwX78sfegE2MM/xk0 l18/kASKu5aEiHho1cHwvrBLj51Cz6/CCXJK9JKaVXrWxTQz8wMtyt+CS99ZL6Ms2BzN LN8iBE2GJ585ZtyvJX4l6shiXAe+M1vc/e2r5wN5EGdM6oZvRe1ptcznLNzANZ4NE+et S8dUnzf4O5fjb7A2vxK+BjSqAv/S5/DD14yKGiwEpAHd9RsKa7doboYI1NDV9RU7Iue+ JToA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=WNaD6ezOOMigUTl4zKEh6o5Yve0ulLtXqX2XmNJG/Eg=; b=mRZcK9UNME16penlrnRUKy8s1hLr3ZZG+Dsmosqx77N/qrx6fXtYPPpANmr6Q0iQcp GzCo0yQFikmkx+gux6z4DsBo3jTd9Ds5W8/OJVHjoskkJyMi7KFJbB9kvbRE8ZN6aJyP sIgHpu7VwaqMISgVqIDLKXWW0w7CzrEXmvlZC5uKTh5AWqOe3lSeVPXRvyWzK1cnPPA8 msrDGsdK1+lA1nQLOEDi0NCF6sQ5ZSE3NbyFI3w+9x8PGnRbXkL/UXrTd2SUqijmGzDo JBmfaNad+YoH/nuQtBKIOT6ysBs56rzGv7gzI4+2xqeFKAxWuOb9UTZeBH+V+cnYCF0v VxBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DotVz1bj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si2834491plk.28.2018.05.16.07.53.13; Wed, 16 May 2018 07:53:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DotVz1bj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1752260AbeEPOwG (ORCPT + 99 others); Wed, 16 May 2018 10:52:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:45990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307AbeEPOt3 (ORCPT ); Wed, 16 May 2018 10:49:29 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (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 DCAB02083A; Wed, 16 May 2018 14:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526482168; bh=WZkipVAQ/zZ0Q5oF3NHYBBA9szWhGd+TZQsdklsZdQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DotVz1bjPojw0aNrLuvS51jRrVUcXzlKg7TQLXGAjJnJdtBBxtr+AcIPVxYsC33X9 DFO8Kuyl9abwKVUT/k6Ii1Wjovo8D/h86OEJ1xnwpwJS77I2pwySD1Soo7QdPNvBRQ 4HYLMjuK8y83s4HsvxD42ez//slYs76ZAR6hSOO0= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Ravi Bangoria , Jiri Olsa , Namhyung Kim , Arnaldo Carvalho de Melo Subject: [PATCH 02/11] perf buildid-cache: Warn --purge-all failures Date: Wed, 16 May 2018 11:48:59 -0300 Message-Id: <20180516144908.22212-3-acme@kernel.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180516144908.22212-1-acme@kernel.org> References: <20180516144908.22212-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ravi Bangoria Warn perf buildid-cache --purge-all failures in non verbose mode. Ex.: $ sudo chown root:root /home/ravi/.debug -R $ sudo chmod 700 /home/ravi/.debug/ -R $ ./perf buildid-cache -P Couldn't remove some caches. Error: Permission denied. Suggested-by: Masami Hiramatsu Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20180510043651.12189-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-buildid-cache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index 7a7403913b57..115110a4796a 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c @@ -488,8 +488,12 @@ int cmd_buildid_cache(int argc, const char **argv) } } - if (purge_all) - ret = build_id_cache__purge_all(); + if (purge_all) { + if (build_id_cache__purge_all()) { + pr_warning("Couldn't remove some caches. Error: %s.\n", + str_error_r(errno, sbuf, sizeof(sbuf))); + } + } if (missing_filename) ret = build_id_cache__fprintf_missing(session, stdout); -- 2.14.3