Received: by 10.192.165.148 with SMTP id m20csp3497196imm; Mon, 23 Apr 2018 07:32:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+jqwnC9UuHV/QoRiQGLObyXjYUR9d5bBSsJUaUf6gYMS7JX+SaNvrbEV/LeX9NeLbNUCQt X-Received: by 10.99.122.5 with SMTP id v5mr17229030pgc.184.1524493972550; Mon, 23 Apr 2018 07:32:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524493972; cv=none; d=google.com; s=arc-20160816; b=l4BbAaXBNV/UJpfjxQaHukdkv5RRBaGHPQ8UbVmoryUuzn63PPpRhpfJrw7mJkaXl3 LWALMwJTn59WUzrINu6kGY/7yuJ0txTIzNqJKiHPqGMxIX+40hkDmtvhUcjTvCM+q7Fm rUzyNZkYyURtM1X0ngkYJYtsMI9thagHlw8sDHPTEITEnGbaMn75mhz14VCvLMlB3OTG Hv6e/N602e/BTEUxih1Vmrj2y7RSrXilMejyDfA5nY/e+HvvnYj2q+ph+Ad0vZAHWVBC EAJelpHdG1dY4ERfUY2gErBz3nQUS9DNg9LvZZmxQ7MCUvKRTAWL4phpbOk7oNd/DML6 F/YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WK6UB8cii5VLZa0touKe7OatE+FwHzhUYSyAA/IjhA0=; b=HZvaBgObsxd8CofYYZNWzrbj6rk6U5SarY5usgKRqsZLWVaCkfu6uII+gc7GIj0tgK JJw9tuJL5D+QlLcZ+MhRKwj31/Tu+B9zCYiLrlF9Yb3MR2Cp1vc7MBd/cI3tXVmCEulb kHtaZVuv9cspxnvzyPQ/qaKXGjkwZQuIELCPMAWywk39iABZaAyQRW/jKhbugb3M5mUR vNAThcdrjVr/eyOqc0fnUs9lZ2cuH25QQiJZHVUbDdyaV6a0IMGqmJa40VPV63hH2+BL 6DaBTK/NaZupsEBn948RXULFAtZEoqL2Wh1LFTf6jtNOymdGXrckyJN9TbJ4xWdgkiE7 B58g== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d127si93159pgc.236.2018.04.23.07.32.37; Mon, 23 Apr 2018 07:32:52 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755415AbeDWO3z (ORCPT + 99 others); Mon, 23 Apr 2018 10:29:55 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45116 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755342AbeDWO3x (ORCPT ); Mon, 23 Apr 2018 10:29:53 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3NER1s3079805 for ; Mon, 23 Apr 2018 10:29:53 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hhg65m1eh-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 23 Apr 2018 10:29:53 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Apr 2018 15:29:50 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 23 Apr 2018 15:29:49 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3NETnE828246080; Mon, 23 Apr 2018 14:29:49 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F04E24204C; Mon, 23 Apr 2018 15:21:13 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4E3042047; Mon, 23 Apr 2018 15:21:13 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 23 Apr 2018 15:21:13 +0100 (BST) From: Thomas Richter To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, Thomas Richter Subject: [PATCH] perf record: Fix s390 random record__auxtrace_init return value Date: Mon, 23 Apr 2018 16:29:40 +0200 X-Mailer: git-send-email 2.13.5 X-TM-AS-GCONF: 00 x-cbid: 18042314-0040-0000-0000-000004320254 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042314-0041-0000-0000-000026362922 Message-Id: <20180423142940.21143-1-tmricht@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-23_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804230145 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Command perf record calls cmd_report +---> record__auxtrace_init +---> auxtrace_record__init() On s390 function auxtrace_record__init() returns random return value due to missing initialization. This sometime causes perf record to exit immediately without error message and creating a perf.data file. Fix this by setting error return code to zero before return from platform specific function which does not set the error code in call cases. Signed-off-by: Thomas Richter --- tools/perf/arch/s390/util/auxtrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c index 6cb48e4cffd9..3afe8256eff2 100644 --- a/tools/perf/arch/s390/util/auxtrace.c +++ b/tools/perf/arch/s390/util/auxtrace.c @@ -87,6 +87,7 @@ struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist, struct perf_evsel *pos; int diagnose = 0; + *err = 0; if (evlist->nr_entries == 0) return NULL; -- 2.14.3