Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3598692pxb; Mon, 21 Feb 2022 01:25:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVKzbylyYEOVLY4GQ5DKj9UOVVv7D08ioNdJdg8HuDrCsxroDkP2Wt0MWYuli6cyWW7aYJ X-Received: by 2002:a17:902:d88f:b0:14f:4580:5772 with SMTP id b15-20020a170902d88f00b0014f45805772mr18025627plz.63.1645435533667; Mon, 21 Feb 2022 01:25:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645435533; cv=none; d=google.com; s=arc-20160816; b=bWecGVqhPRvz6zTz0xgSs+co4d9NAOxIY5ujNfPegTEeMuC/AtgTUrgZUPfUTZ0ejZ WDX7Ubzs+r1+5AvY6LKnymuEBO1NNmEv1eN0uNRHkAImqMw+cBCqwDhNqngGX80/uVJI XqaiQcIsVoVI6ZnXhBh6rwh+ahhX7R6dK0Mt589vfRR1WDn0Sw+lPenaVfU+JkUmMLrr ji2elYDY+K1HCRZ1+wRsOgsBtkF2DnPcP8Kope0IJdiNEN/RH6qpdDDcTYv1w5Ua5H4k A2EG/b0SUB0BGIg/d29tmI7IxFaEWzE8m1NRcnl6H11OtdoT3urYPgc1VOAmUuLEsj23 gBRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n9crBYb57d1azHAL1ikRm0A47D2RTNJcSC8BWr8rPVU=; b=jyvIwoqr1xvhuF5XFbo7XyLq9ik8unYAxNSSwu+ZWW5KUA64o/QzTu5tbnviQHdou0 +VWB8NkJf7sExYQZ4ibjB8t+U61nla6vW9mHL0Gn3ReqGbtFfeuyMp+W9RZDOOAdPIEA IYcuz5RyOypcY8MP5o0X2BhGcnN50SrsurcDLdOhYfLGnuaSi6u8FrycGlAThI53wAWn cVUjn4s9dScuvIB3aerH+DNTpIlVGTkOkf+tpEZ01JWMd9j4+mr14Wj88UBsX6caOgqd 9Ix7D6K3YQbWYkWiQioeBAU4X5PtrsAFudEvotD+CxBPm+QNVg+jCa1bqshIWHQ3qrqS nMqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YryqbrIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f130si17817841pgc.684.2022.02.21.01.25.20; Mon, 21 Feb 2022 01:25:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YryqbrIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245192AbiBTWoI (ORCPT + 99 others); Sun, 20 Feb 2022 17:44:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:58048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245188AbiBTWoG (ORCPT ); Sun, 20 Feb 2022 17:44:06 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FD70338B7 for ; Sun, 20 Feb 2022 14:43:44 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id vz16so28500953ejb.0 for ; Sun, 20 Feb 2022 14:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=n9crBYb57d1azHAL1ikRm0A47D2RTNJcSC8BWr8rPVU=; b=YryqbrIZeQR7sxpZ5Euib3gH348PG0wFjSba/saHS87EN0nkRmZcnHxP/QR6x6H2UG Z4J2vOctcwyGd9GqDM3BFwSpm3S2x8ayBOEIwRVeaIN/6mb2/bX20Xdi6geyavvDSoLp hZqe8TOCL3zjeQzKkt9fzwLD1RB39DIGxN503+9xjOMRgnyFXI5W3QAQXMxFQWOVQ5Rv 1wpG2Ld94Z96fyJzNiyeULxFmMnleaA2qy41ot9ch7uH1ZFKDaMHIUddpGx8mHfFPccu 501buL6VxuX82Xin35TYVj1WENnMUifODuvHVHDy9xAeirgACTewahcW2wjze56s0d5p pYPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=n9crBYb57d1azHAL1ikRm0A47D2RTNJcSC8BWr8rPVU=; b=eVfXyBKIWt9PWEjqggnjhzXcscQJITo6x7UP8k/J50hnCUPBVT5KbkOelbWwPaarbS z6I6/B3ufRjfLP+kpbwDMvxdFmLIMN8z93cooUzX95ztDm+Sdl9gFIPHAL1qFF9iZmlY Iz6s8iWeu4dz1GkuGD0vWAcw8M0vLe7/iSWp5+BulAJyqGKDJfFKRLLbhP4GVkhUWMK+ ixy0UPeV+3QVcrm2f+XL+FkAG2q8wSYnHODKIb33yaDhwZOhP9pxkStDQYBq4KpNQpim MNMNsNPxBd/OVsXlb/LxRdcnt8ywCG6IoJIt8FL4tnKymZew6EVgvE8du8ALfzNNL+We w9LA== X-Gm-Message-State: AOAM533I4sMXMQEQZ7JmWQ1R6tgFyQ1UQuJkxhj2ZdiS8aHMvDhbVHAw +blzfW4sbGFS8k6/0XlXRcM= X-Received: by 2002:a17:906:af68:b0:6cd:7896:15e with SMTP id os8-20020a170906af6800b006cd7896015emr13960547ejb.420.1645397022789; Sun, 20 Feb 2022 14:43:42 -0800 (PST) Received: from krava ([83.240.63.12]) by smtp.gmail.com with ESMTPSA id gq1sm4558283ejb.58.2022.02.20.14.43.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Feb 2022 14:43:42 -0800 (PST) Date: Sun, 20 Feb 2022 23:43:40 +0100 From: Jiri Olsa To: Alexey Bayduraev Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , linux-kernel , Andi Kleen , Adrian Hunter , Alexander Antonov , Alexei Budankov Subject: Re: [PATCH core] perf data: Adding error message if perf_data__create_dir fails Message-ID: References: <20220218152341.5197-1-alexey.v.bayduraev@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220218152341.5197-1-alexey.v.bayduraev@linux.intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 18, 2022 at 06:23:40PM +0300, Alexey Bayduraev wrote: > There is no notification about data directory creation failure. Add it. > > Signed-off-by: Alexey Bayduraev > --- > tools/perf/builtin-record.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c > index 0bc6529814b2..0306d5911de2 100644 > --- a/tools/perf/builtin-record.c > +++ b/tools/perf/builtin-record.c > @@ -1186,8 +1186,10 @@ static int record__mmap_evlist(struct record *rec, > > if (record__threads_enabled(rec)) { > ret = perf_data__create_dir(&rec->data, evlist->core.nr_mmaps); > - if (ret) > + if (ret) { > + pr_err("Failed to create data directory: %s\n", strerror(errno)); errno will be misleading in here, because perf_data__create_dir calls other syscalls on error path jirka > return ret; > + } > for (i = 0; i < evlist->core.nr_mmaps; i++) { > if (evlist->mmap) > evlist->mmap[i].file = &rec->data.dir.files[i]; > -- > 2.19.0 >