Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp327339lqt; Mon, 18 Mar 2024 08:56:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBQn+psMLMVi2oP1fXmnnElD/s9n3FDX82539Swn5jP6VibX5j4ggboHHhDg3zPBxrRUOTaEb46lLBXYy+6KR2MgrIrzBiUFJEJsMTew== X-Google-Smtp-Source: AGHT+IHa2DXOoRKazNiiNfxhrRbSnZp32deRM1nxsvFMNteGoIX20SCd//6tLjsXLz2OINGko2kf X-Received: by 2002:a17:90a:a88a:b0:29e:343:76ca with SMTP id h10-20020a17090aa88a00b0029e034376camr5472858pjq.45.1710777389864; Mon, 18 Mar 2024 08:56:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710777389; cv=pass; d=google.com; s=arc-20160816; b=NywuUF4ukRd8iC4Bnj4IK0bn37/UnWrMmmrn18u0ORGMl/2lUQa3s2u0aeP/LgiGQ3 5tU1uBfv2KATpzoNFyVwmqO0+2vdPC10n9+InGR/+SzGDkdagEM1GFa/p9z3/z5ZNcaA qfgK6vtYUVliS/feDHEbyM004G9/Jb8uqrtxCzYVq3UAOIf673ZNOCnEwaVohsHQVTot 9TZNzZSpqGx7DvNzMw2UpwuIiujX5ditAwY5DCMOUqNPrTk1wnzcgmWjwchjd8n1BoUF pP0h/mNMz4I7Es+86lz0FSAJ1iNNcdW1jBtXoEuHoE8qetUmpC9LrgBqqU8J0WReP+EO GHfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=EYb8qo4xPTxYbDN86PejyQfy1osBlkxBmxPXIqmBRRk=; fh=ta7HX2H218sANQBNTnTGD11KRcq3Cd2gLKTdqexirrc=; b=okaQrKSYMPge52AYNyjrfAbdDm7pjFePeS9MYZOJ/HGPgM30AyHeiTXkzFv6WZVVvu ZxsAGvDzpxgl8rbtIfiZQ/K2mmGckL7VEr9HNfpp5Gq0rNFYyuK8xHMKwNNi2dhQU+FV sybN7wMe6F5GlHs03MDCAsdB3O15djwyhit/43hGAeT9TYghwaBNf5bVaCIPEyWyiYeD VsztUoTUEC+iIzgjKb7S1kse8yRsS/+Niaxzi8Wcy15Nbk6ANxo4BZJqfXn0jZpn2vV0 z2gNaQFMWj/0ZH81PhxBHgkoWhGTlXE6dwZQZ2hNcGVX5/Q2bB1IDtjngWk8G4zgKeYg BpoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-106344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106344-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id my18-20020a17090b4c9200b0029fc87e54dasi649919pjb.90.2024.03.18.08.56.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 08:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-106344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106344-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B09D3B21A40 for ; Mon, 18 Mar 2024 15:55:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2E6352F83; Mon, 18 Mar 2024 15:55:44 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C7E652F6D for ; Mon, 18 Mar 2024 15:55:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710777344; cv=none; b=osHdL5XXPFHp8V7jKQxpIVu1//gd69WSCOkQYAwp/sI+LnOwPZcJMb2KCMZQrvly1Sy2M1QAY/kbpowS1Zhqs/XA53y/LmlfGhRblAGPIm+Glz+JW0/rIzJt8Vcry/pBdxAfvfFBXPTrK4Dl7FVzgOeFH9nqZkl4J9RgulwRkn8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710777344; c=relaxed/simple; bh=J3kVjYNZKCHPoUNJ+tUmXtQFeVyfeNdZ6VNt7xpM6fY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=g/5Plhn5g0uqBudqSRiV/RvAsx9FkbkuWFyqSdFBY5BfV7lySkTEkwDG/HeP5rckLZeN5WSxo8Q7wfWW35gokguPgP8hc2cvkpVJldwfrHUNRv8689T/aCIt0PDsxxN60IIp3FQLcb9Zsbln3O8MuX6UT7tGyU7FMt70W5wma84= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F1A2C43390; Mon, 18 Mar 2024 15:55:42 +0000 (UTC) Date: Mon, 18 Mar 2024 11:58:02 -0400 From: Steven Rostedt To: Josh Poimboeuf Cc: Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Vince Weaver , Dave Jones , Jann Horn , Miroslav Benes , Andy Lutomirski , Thomas Gleixner , Masami Hiramatsu , Nilay Vaish Subject: Re: [PATCH v2 06/11] x86/unwind/orc: Convert global variables to static Message-ID: <20240318115802.39f89b73@gandalf.local.home> In-Reply-To: <20240229004252.awmammhp63f5udyy@treble> References: <43ae310bf7822b9862e571f36ae3474cfde8f301.1587808742.git.jpoimboe@redhat.com> <20240228183507.78c5f130@gandalf.local.home> <20240229000309.ibtuk7gr27d7cbxz@treble> <20240228191406.21e894b0@gandalf.local.home> <20240229004252.awmammhp63f5udyy@treble> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 28 Feb 2024 16:42:52 -0800 Josh Poimboeuf wrote: > > I'm guessing because we don't have the full dwarf info? > > DWARF isn't needed for that. Even the symbol table has it (as does > System.map). For both globals and statics. It is in System.map, but I guess the real issue is that the compiler can optimize it out. That is, the number is never set as it is static and the compiler doesn't need to do anything to make it valid. To the compiler, the number is just a local variable. I'm not exactly sure how it does that, as it sets the value in one function and uses it in another. But clang appears to not be setting it when it is static. Either removing static or making it volatile makes it work again. Thoughts? -- Steve