Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2186516ybl; Thu, 15 Aug 2019 07:53:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6z5mR9xrnKFsETYwavxLgRQaG+YoMeaHqmeK8LuM2SJm+tnMgamwl1I+FeRfCSwE7l/Qd X-Received: by 2002:a17:90b:949:: with SMTP id dw9mr2606518pjb.49.1565880828788; Thu, 15 Aug 2019 07:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565880828; cv=none; d=google.com; s=arc-20160816; b=eg5E5eJryIpxB6EZ0CU0QlSTgF+iDCOlMD6GwRGWgcd+2tVCp0MbC3prBkSs4QBqtf AbSd7PrAesyFvquAoMbpDiXlSoS41EcuZMIUzmBzrK77F4o75P52f7h2ynumqRWujZNG W714zV0i4008k+cHdP7r3ssEoOqmG9jZscMjnNlBUyv6tpYo/OvRSpzlNEhatV+N3zXf lU+EOA5QCuBOjP1di/1BWi552dqtCXOqng9vQE8vdJBnz49PBFehcsRaszj7ZeMob78u NHa3SUYL601lk8jtZb27iU80kAd71PpEEtKMytJW5NrBKlNLG+EdMCdGBrNToCV8uIfH ABGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HYsnrgiPxH9K5IKBwPDoIy5zxkboi4t30RhVCHuCgBY=; b=l3jHHFKUBcybsrrx8DSuNDxCTN+sMOYYQA4u/pEcI/KJ0+Bgn6rLBL1u/kVLUporeG DeipWMmKhIpRYHORMtqxIBSlLjO7KbWCEmijJXbxflry50UXXTPkZGoCp/3m7W6RQMUS DP+FVmkD/+FzxXNkPjl9z7IibcniUbaH7XmW8ycMjKdzHo3pwvoDAdI3azQ2c6fa7iaS ba8F+RmOxYch58EPIlvUc5tbjjdIvcm2QgJRYN5IPIVrh/YMSUaOO79iDDaAy9zXZKdz Sggwn/JR99be/EtAGd7a2bkK0dv9dTOiB4MdxGR5yjF8qTPVzxzNszVGrxQIDUIXDh8l qRKw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si1928702pgc.510.2019.08.15.07.53.33; Thu, 15 Aug 2019 07:53:48 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731824AbfHOMvN (ORCPT + 99 others); Thu, 15 Aug 2019 08:51:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41376 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731645AbfHOMvN (ORCPT ); Thu, 15 Aug 2019 08:51:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C4213C057F2E; Thu, 15 Aug 2019 12:51:12 +0000 (UTC) Received: from krava (unknown [10.43.17.33]) by smtp.corp.redhat.com (Postfix) with SMTP id EA9E75C1D8; Thu, 15 Aug 2019 12:51:09 +0000 (UTC) Date: Thu, 15 Aug 2019 14:51:09 +0200 From: Jiri Olsa To: Mamatha Inamdar Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, jeremie.galarneau@efficios.com, shawn@git.icu, tstoyanov@vmware.com, tglx@linutronix.de, alexey.budankov@linux.intel.com, adrian.hunter@intel.com, songliubraving@fb.com, ravi.bangoria@linux.ibm.com Subject: Re: [PATCH]Perf: Return error code for perf_session__new function on failure Message-ID: <20190815125109.GF30356@krava> References: <20190814092654.7781.81601.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190814092654.7781.81601.stgit@localhost.localdomain> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 15 Aug 2019 12:51:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 14, 2019 at 03:02:18PM +0530, Mamatha Inamdar wrote: > This Patch is to return error code of perf_new_session function > on failure instead of NULL > ---------------------------------------------- > Test Results: > > Before Fix: > > $ perf c2c report -input > failed to open nput: No such file or directory > > $ echo $? > 0 > ------------------------------------------ > After Fix: > > $ ./perf c2c report -input > failed to open nput: No such file or directory > > $ echo $? > 254 > > Signed-off-by: Mamatha Inamdar > Acked-by: Ravi Bangoria > Reported-by: Nageswara R Sastry > Tested-by: Nageswara R Sastry > --- > tools/perf/builtin-annotate.c | 5 +++-- > tools/perf/builtin-buildid-cache.c | 5 +++-- > tools/perf/builtin-buildid-list.c | 5 +++-- > tools/perf/builtin-c2c.c | 6 ++++-- > tools/perf/builtin-diff.c | 9 +++++---- > tools/perf/builtin-evlist.c | 5 +++-- > tools/perf/builtin-inject.c | 5 +++-- > tools/perf/builtin-kmem.c | 5 +++-- > tools/perf/builtin-kvm.c | 9 +++++---- > tools/perf/builtin-lock.c | 5 +++-- > tools/perf/builtin-mem.c | 5 +++-- > tools/perf/builtin-record.c | 5 +++-- > tools/perf/builtin-report.c | 4 ++-- > tools/perf/builtin-sched.c | 11 ++++++----- > tools/perf/builtin-script.c | 9 +++++---- > tools/perf/builtin-stat.c | 11 ++++++----- > tools/perf/builtin-timechart.c | 5 +++-- > tools/perf/builtin-top.c | 5 +++-- > tools/perf/builtin-trace.c | 4 ++-- > tools/perf/util/data-convert-bt.c | 4 +++- > tools/perf/util/session.c | 13 +++++++++---- > 21 files changed, 80 insertions(+), 55 deletions(-) I'm getting few conflicts, please rebase to latest Arnaldo's perf/core patching file builtin-annotate.c patching file builtin-buildid-cache.c patching file builtin-buildid-list.c patching file builtin-c2c.c patching file builtin-diff.c patching file builtin-evlist.c patching file builtin-inject.c patching file builtin-kmem.c patching file builtin-kvm.c patching file builtin-lock.c patching file builtin-mem.c patching file builtin-record.c Hunk #2 succeeded at 1361 (offset 23 lines). patching file builtin-report.c patching file builtin-sched.c patching file builtin-script.c Hunk #1 FAILED at 48. Hunk #2 succeeded at 3073 (offset 1 line). Hunk #3 succeeded at 3743 (offset 1 line). 1 out of 3 hunks FAILED -- saving rejects to file builtin-script.c.rej patching file builtin-stat.c Hunk #1 succeeded at 81 with fuzz 1. Hunk #2 succeeded at 1447 (offset 1 line). Hunk #3 succeeded at 1646 (offset 1 line). patching file builtin-timechart.c patching file builtin-top.c Hunk #1 succeeded at 74 (offset -1 lines). Hunk #2 succeeded at 1668 (offset 25 lines). patching file builtin-trace.c Hunk #1 succeeded at 3573 (offset 320 lines). patching file util/data-convert-bt.c patching file util/session.c Hunk #1 succeeded at 30 (offset 2 lines). Hunk #2 succeeded at 184 (offset 2 lines). Hunk #3 succeeded at 199 (offset 2 lines). Hunk #4 succeeded at 222 (offset 2 lines). Hunk #5 succeeded at 257 (offset 2 lines). thanks, jirka