Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp441246rdg; Thu, 12 Oct 2023 09:53:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFheuOJndQ6xDOHRdooXVZZsIozFbjTipyDxSvLZDHMYWj2RevYiXhdMgdHHC1++jGaZKm1 X-Received: by 2002:a05:6358:52c5:b0:14c:4411:2f4b with SMTP id z5-20020a05635852c500b0014c44112f4bmr32232125rwz.22.1697129594238; Thu, 12 Oct 2023 09:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697129594; cv=none; d=google.com; s=arc-20160816; b=AM4AK8sAfQzKOIV/Hn5saV0xRTp+fwTnJwJVT3fR2Dm1iO7u+QT0361DRthrfgmjC8 1K3eKZXcPmRGNocrQOgC7/naHEvMrTzpxoRl4+wygqJ5Zkhns6Iju+u1suUxYCBw4Vy7 GP9IovlFMqBVqbGOvn7kfdC9k/ZYr1crcjtM+dkNDO0oJ0+IoqGkhBIdmJ57ejgZsL/+ NkkqMx07PLmuwCXpij3FfXoPSXEvhzU60pH9lozYR/TT6lE94o/JvQ7bHxAm0YEPr8gz XB+Oolh4u3zHbzQFW2PegPd4iru0zelMU5KLnkASQm/kgq9hLtFNVOV9eGPP1A+kfSuI 4R9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=SiWsQJmKDcrU/TS18lHFomnJ0k5KRFpjamBWB28yErY=; fh=rVgMNPmdt4qvI7dOsUGDK1nOBl45fpF4CucA9Y3kJs0=; b=ElUeq1G0pdgfQfu9BFoNCT6CPfPVU+msj6CMqZa9/mzaxM6Qu99sRBcLNy9aIKpLJ0 JgKhbBVKQcYiSMCGX7dX00fcI/62juAZ9pIaIjeSwqWhyeKFIHIc7iTKpjrGVI+77Be9 YDjNmTRgoTGdGbRMpA+76dtfqtO1Q5KACPW06CVG4PIKtpq7U3FfS8vNjHTXdCDKZ/Qo ru65H0Tx5G0dYKwvmTuXZ3HRUFaRuhXHXbKyl/1Y/TYBHGiUB2LFEmEnwcfk0SFerNO5 +yYD/yrTrWpsGj67S4VeS0H3k/VJCSD5KMcJ7SLmdzvoId0rj8kXUZNotJ7mEvSHtVrr nBXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h13-20020a63530d000000b005898b54186esi2641108pgb.96.2023.10.12.09.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 09:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 07DB380FE286; Thu, 12 Oct 2023 09:53:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235764AbjJLQxD convert rfc822-to-8bit (ORCPT + 99 others); Thu, 12 Oct 2023 12:53:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233290AbjJLQxC (ORCPT ); Thu, 12 Oct 2023 12:53:02 -0400 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53AF5BE; Thu, 12 Oct 2023 09:53:01 -0700 (PDT) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-27d113508bfso947727a91.3; Thu, 12 Oct 2023 09:53:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697129581; x=1697734381; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wbYdyYCLJzWKhagPtB2fZh6NdUcQYAFm57gjL1qGF48=; b=NDEQvwkQkWubFS0l0atPAWvMdLyJD3omUIvoWkhTmVunGbuJPp980w/XuvrUN2A2pe +ejDIvuti8upy6nF3b5l1YtyWvVFsi2C0Nl55ENLl4k6YOSa0eYMLhyV71IkzLBOSBXB b2SWtiGToYJNvF8G5Xp8YYo4XoiiF+3S2hEbx7zRJjZ6vyCtBc0kB07kcX9ZpglFFsDP 1/pyandn6YbTBVy9UkgzcGyBKQA9lovThvkOSUaV3d36VAiop8O+DFQeankxCKn4p7SB jrNU32lp/1Jt0LkUCzW1Ujx34E6zXUTFHBSJnI3JcpzOYhWh4Yk83vmG7SEBfj6zHqB/ kaYg== X-Gm-Message-State: AOJu0Yw4OAEqA02wq8Xnn8b1AERlmknRdLATmPQsbG+KDE94WMhwVM5Y 6SUINky50eTn9ufpvx3Xcq4hjbFH7Vdfpsl4z5M= X-Received: by 2002:a17:90a:2a8f:b0:27d:6b8:93be with SMTP id j15-20020a17090a2a8f00b0027d06b893bemr4680096pjd.42.1697129580644; Thu, 12 Oct 2023 09:53:00 -0700 (PDT) MIME-Version: 1.0 References: <20231012035111.676789-1-namhyung@kernel.org> <20231012091537.GM6307@noisy.programming.kicks-ass.net> In-Reply-To: <20231012091537.GM6307@noisy.programming.kicks-ass.net> From: Namhyung Kim Date: Thu, 12 Oct 2023 09:52:49 -0700 Message-ID: Subject: Re: [RFC 00/48] perf tools: Introduce data type profiling (v1) To: Peter Zijlstra Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ian Rogers , Adrian Hunter , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Linus Torvalds , Stephane Eranian , Masami Hiramatsu , linux-toolchains@vger.kernel.org, linux-trace-devel@vger.kernel.org, Ben Woodard , Joe Mario , Kees Cook , David Blaikie , Xu Liu , Kan Liang , Ravi Bangoria Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 12 Oct 2023 09:53:11 -0700 (PDT) On Thu, Oct 12, 2023 at 2:17 AM Peter Zijlstra wrote: > > On Wed, Oct 11, 2023 at 08:50:23PM -0700, Namhyung Kim wrote: > > > Actually there's a performance issue about getting disassembly from the > > objdump for kernel. On my system, GNU objdump was really slower than the > > one from LLVM for some reason so I had to pass the following option for > > each perf report and perf annotate. > > > > $ sudo perf report --objdump=llvm-objdump ... > > > > # To save it in the config file and drop the command line option > > $ sudo perf config annotate.objdump=llvm-objdump > > > > Even with this change, still the most processing time was spent on the > > objdump to get the disassembly. It'd be nice if we can get the result > > without using objdump at all. > > So the kernel has an instruction decoder, all we need is something that > can pretty print the result. IIRC Masami had an early version of that > somewhere. > > With those bits, and some basic ELF parsing (find in objtool for > instance) you can implement most of objdump yourself. That would be nice, but I'm a bit afraid of dealing with details of instruction decoding especially for unusual ones considering extensibility to user space and other architectures. Thanks, Namhyung