Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp909295imm; Wed, 15 Aug 2018 08:10:09 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyu0Al3l+YmnVdtz1nTp27tvPs6rWAuU0soTCcXiiB3MHZG7sEWo5qDjmbaRwFl5IpN4axs X-Received: by 2002:a17:902:5481:: with SMTP id e1-v6mr25013138pli.309.1534345809056; Wed, 15 Aug 2018 08:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534345809; cv=none; d=google.com; s=arc-20160816; b=xpUMtOOiLIq0XIUgwO7vyWPHJJlUokxsL7BXuyZNK3grBVrYuiVgHyf7vecoYlHKtU WBxPwpeDbS1GKdZLZlIIJpUNUbYSFTccmD5Ir6AxKiTqw4swvUvZHn2tMBTJYP/qxGsF G4xRka1trtdkCPGTmzmJNmLzuWYBSDpu5stixr9qGSjAQ8sdfpM1976Uok0dB+FVCvrm JmrnLBE8uwXEtfw3rL1s6FsuiivpI0osHMVe0sdK4umy8M5B3tSMRBcD/Suoxzu1FcRg yhYZgpbmcKqEiZPAozYFH6cKW1qWZ6hkgGsDgN0KqyneE6JmXwdKLmcikIP0jPPXwYo3 1e7Q== 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=Ht4nV2kIMef1Mkw5SM1ONFVBcyN4QGWFUMh0skkSvEQ=; b=fNUd3g8j1ZZjf3ucqduwPVHuQAB0tPSUQV2NsnW2Eye8JZZdc746knbTO8zcdEGU9z XImCTTGqrVvko9XdtthITpNqbRMQQLLJCHTQZjajQJ+1yNk98TkPWwnFBZ0wzUSapNYi drlJxa1bi2gNQqTmsQDTcE4HfZ6iaIuRQmdozAHX45pdpmTldr+tFeYw7qvY04CNGiwb VrGlr2I442hKNjkpTf8Ou6/APm2t7ESzJCZwsz90e/M9kB3zO8xq8bHCVQCo/N36+vMh +qn/8fJ+vO1eQI2wbPmlaAUA0NU34X0Qk13JunBRvjKliCjBGkuTSskfLH9gY+eyr4ek 49bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="iDBUwC/3"; 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 a24-v6si23805813pgi.515.2018.08.15.08.09.53; Wed, 15 Aug 2018 08:10:09 -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="iDBUwC/3"; 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 S1730708AbeHOSBJ (ORCPT + 99 others); Wed, 15 Aug 2018 14:01:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:51040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729528AbeHOSBI (ORCPT ); Wed, 15 Aug 2018 14:01:08 -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 17CF6208B1; Wed, 15 Aug 2018 15:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1534345716; bh=saqCbPQdbTOg1bpU2F2dW3RQXhHVCLRVEhgycrZnrhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iDBUwC/3vlBbwhCFcxZhc7CtHTVCBvk1Ankah/+mQrqQkUFfaroSHe6izr1fEndRt P8wrC2HqZl8TGxxBCxnIgwekNXCbAe5VFC2x3wo5ImI/Gu4ax9KmhvVyXqlHaJpW9w W6JAl0FK0G2ftGkFvdx8ZJN75mFcGS8RKyWFnKvo= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Kim Phillips , Adrian Hunter , Alexander Shishkin , Dongjiu Geng , Jiri Olsa , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 30/35] perf arm spe: Fix uninitialized record error variable Date: Wed, 15 Aug 2018 12:06:06 -0300 Message-Id: <20180815150611.32080-31-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180815150611.32080-1-acme@kernel.org> References: <20180815150611.32080-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kim Phillips The auxtrace init variable 'err' was not being initialized, leading perf to abort early in an SPE record command when there was no explicit error, rather only based whatever memory contents were on the stack. Initialize it explicitly on getting an SPE successfully, the same way cs-etm does. Signed-off-by: Kim Phillips Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Dongjiu Geng Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support") Link: http://lkml.kernel.org/r/20180810174512.52900813e57cbccf18ce99a2@arm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/arm64/util/arm-spe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index 1120e39c1b00..5ccfce87e693 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -194,6 +194,7 @@ struct auxtrace_record *arm_spe_recording_init(int *err, sper->itr.read_finish = arm_spe_read_finish; sper->itr.alignment = 0; + *err = 0; return &sper->itr; } -- 2.14.4