Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1104492ybi; Fri, 31 May 2019 14:01:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/YEJssZT14MwHR2JUumkEFGFMaMS1vUotsTwuFQIe/25Tklb0259c7U5SrYv407ttUaK+ X-Received: by 2002:a63:d70b:: with SMTP id d11mr11577921pgg.178.1559336474170; Fri, 31 May 2019 14:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559336474; cv=none; d=google.com; s=arc-20160816; b=bs8FMfphSLC/DvEnBGYXOzg3Rimd3QLr7mgVZpmy5WjWzsPquove+8QCXfTVZBhMLN Fb/3P8H8EaDR9IrIyIHN37bekdwfgzxuwMPmZUXZQL4gnFQhgrAL1QihC2u3o0zSxx8C DXbU4kh3JvTD3Z6977i/pWWKUQmmvUWGCHsZgMCuwlSSVK9oXF1zAbiX5YwhgtIuYYWW M6TXoG/Zqb64DE0V2OzCf5B1YpBpaXHAwy4JNqwFIH/Rj6GJCcJ2VTiqaeW1lolABuXb 8WJq6X9QHykqA3gCo8uBth9IBOl1s8K1NvqbYTcMe/67wekpBb0FgnxBRhOaE6ijwj/y wCxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=QZEWi+cNmZoBJktKiK90g7AJjwpQOSlexmUkUs+5YK4=; b=IaAe2a6A9Og6eRH/WsBkjLgrxrnAJhMcGejICEPso4xMCSQUgHGqJ60hnF05jwKONW C2H7J/dImACqJGAKTupHj6vbJYFC3bw62/ikis085PsPe6Kk9aQtTxsynvUEVHhlqhqI AYwc+YvaLzO1GR3pMg6e1iaeIe5tTiGX+VFhUFJpLmoJ5uQExPOQ3otFAeLM7ME4cAWD ZdpzlGlzxDxv/1tVtvXlbF86KheKs2Z3tLosShXHgfG6evnDuR0+sUA31i7i13wr2V/+ ZioTPTC6RtmZ2+BCqKp/WMfgSnrC7Awc1CcHjdWF01tzOKSPoQXF/U6AQ/NUqGcoOJno +6wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=T7PmfnQO; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si7168194pgs.269.2019.05.31.14.00.56; Fri, 31 May 2019 14:01:14 -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=@chromium.org header.s=google header.b=T7PmfnQO; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbfEaU7r (ORCPT + 99 others); Fri, 31 May 2019 16:59:47 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44473 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbfEaU7r (ORCPT ); Fri, 31 May 2019 16:59:47 -0400 Received: by mail-pg1-f194.google.com with SMTP id n2so4668559pgp.11 for ; Fri, 31 May 2019 13:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QZEWi+cNmZoBJktKiK90g7AJjwpQOSlexmUkUs+5YK4=; b=T7PmfnQOdzZe4eG2SOYeA+vx44JZE7ChhJBCQ085DDcWwyGifAYn3jFdX+L9YrDl6y jmh2kIzr/Kz1emx5OthNvsIHCIkhQEFWcPc13uUUY3w2wlHxNftaxbGqr3EIrbwxiGpk kBEjKQFQxtg7PyIl8di8FHNSTE5HXcwPSOsWM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QZEWi+cNmZoBJktKiK90g7AJjwpQOSlexmUkUs+5YK4=; b=KSAxFbqH9pbbZsXiys7eBVYyeaHDRe9tNN6yG6SyrwKBodEYLFBNmSf+UJSxTI8zRZ ToxxIiaAHhcjLVeWI9tf0NXi39//Rcunt5VZr+RzLqJcHvgYwN5mPJVeSahfkzaTS3ZF IPRQkT3dQvEuXDINcMUz8RsO+6Ap7qN9dUhns5C0ARckZwCHuKaq+Hj65g5cYY0dqg0x 2waL2JSM9YZpk4rOuIRRVpW9oduu9pu1nL61XSYF0aR3KWV0TLKkg9XT08NxVYLC+GMc fK4OdOXsbCx7uK5rN8tTWwzaku56aXw3UDvdCG/LNbrt2aPxxt6f8sgAQzxq3ndNsqc0 ebSg== X-Gm-Message-State: APjAAAU45HeGiKwNrhP97d5++ZeHbUBukYUQugSu02AhX8Dj5A5vhJfw Qvq6X+S1ckEhuFCV0vf8UwWvLA== X-Received: by 2002:aa7:82d7:: with SMTP id f23mr12440323pfn.138.1559336386955; Fri, 31 May 2019 13:59:46 -0700 (PDT) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id cm13sm1864887pjb.2.2019.05.31.13.59.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 May 2019 13:59:46 -0700 (PDT) From: Evan Green To: Stephen Rothwell Cc: Douglas Anderson , Evan Green , Konstantin Khlebnikov , linux-kernel@vger.kernel.org, Nicolas Boichat , Marc Zyngier , Manuel Traut , Andrew Morton Subject: [PATCH] scripts/decode_stacktrace: Accept dash/underscore in modules Date: Fri, 31 May 2019 13:59:26 -0700 Message-Id: <20190531205926.42474-1-evgreen@chromium.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The manpage for modprobe mentions that dashes and underscores are treated interchangeably in module names. The stack trace dumps seem to print module names with underscores. Use bash to replace _ with the pattern [-_] so that file names with dashes or underscores can be found. For example, this line: [ 27.919759] hda_widget_sysfs_init+0x2b8/0x3a5 [snd_hda_core] should find a module named snd-hda-core.ko. Signed-off-by: Evan Green --- Note: This should apply atop linux-next. Thanks to Doug for showing me the bash string substitution magic. --- scripts/decode_stacktrace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index fa704f17275e..13e5fbafdf2f 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -28,7 +28,7 @@ parse_symbol() { local objfile=${modcache[$module]} else [[ $modpath == "" ]] && return - local objfile=$(find "$modpath" -name "$module.ko*" -print -quit) + local objfile=$(find "$modpath" -name "${module//_/[-_]}.ko*" -print -quit) [[ $objfile == "" ]] && return modcache[$module]=$objfile fi -- 2.20.1