Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2097719rda; Tue, 24 Oct 2023 12:12:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGw3vP6xSKJX0pObA198aqcVe7Fwt3a3rJbiFLwWinA4x9JVbwn18qQ35nNACpaKox3uaPe X-Received: by 2002:a05:6a21:7803:b0:154:d3ac:2076 with SMTP id be3-20020a056a21780300b00154d3ac2076mr3701114pzc.40.1698174730988; Tue, 24 Oct 2023 12:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698174730; cv=none; d=google.com; s=arc-20160816; b=SmIt93Q4kCIjrAdfWS1RGloOWTa3QFvqZWs8j8CGYl8jNTAaFW759X5VoiP3ZsBgdo HN7lUw8anMQWXTwDIBel+ygZ+27IXZv76VwQubDvm3UWOeg83ML8G6ZgTsxDR5oluZqn k88fherESzi6Se+hBtkhUOz9r98uSeilnJFjyeBORe8NCiBCsKRDX/FcHSarMxUqZUp+ Nprz45j3pO407ZXRVpVwsy3E9eKJIfCrPq/jdEtMESKtBCeYcL98HIiVSSYt613wLibq bI483YI+mhjfvS9/aFsrpFWfBZT9dSQmrXtOrRrTZwNwVZuPhfGk0tdfhnc8ibD/Wq4t JBww== 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=vdh/iG4YcumMbQ+TF2JgVkrEDG6u7D6iO06jbK6Nch4=; fh=InvvdGthjIaAiBo93mBLATxwfbVgK7ITxv58Kzsopn8=; b=fEpAkk4XN8xzrBSZRJJlWWYXwyy9UQUKO7lsEqe8x0LWWE8vIhs7aNF25QrHejgh6O ofIA38qNIlcZSmkAsbbn9jfYZrmbqIJWvHKT+d4pOkXheKtBTRKBnWwGbBTRN/F7lPOy vIiiFI4tvVY01sss0xode2iLfOcBncGCg777Wc4ctZSALVQ2VrRf/h+DW/+HELgMolc6 7f+DCk5R7EfranGlxxVf4ErVt63qEIfjyIS7JmIdE3YaVu9dfXE4OJphX53BfXM9Gj7d 4nlAQeDz5uBVMDks1/ibcXQpZ7pa3Lntw7+kmT4jsqwpi5ssJmXeQLqzHsab0EW1ayae NQng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id d64-20020a633643000000b005855f67e490si8844940pga.690.2023.10.24.12.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 12:12:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 921348088A5D; Tue, 24 Oct 2023 12:12:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234913AbjJXTMD convert rfc822-to-8bit (ORCPT + 99 others); Tue, 24 Oct 2023 15:12:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234699AbjJXTMA (ORCPT ); Tue, 24 Oct 2023 15:12:00 -0400 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF7AF10C6; Tue, 24 Oct 2023 12:11:58 -0700 (PDT) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-5aa7fdd1420so2883474a12.3; Tue, 24 Oct 2023 12:11:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698174718; x=1698779518; 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=0oWWL0uRZSylfCBA5EKpsd4B0UiMiOChwDu1lsgUGs4=; b=UGBiKSp6wh7H4c3scy7XwGlzzdpZh9/61+dKNZlC9D1CmuQKuc18ORVWkpUyeub7hd XyVN6bbB9u+D2kYWYFT3gEv9aN5FTgJQEM5B+HdG/fYLyyZWgErSjCpy8OryFzhJU8hg rvCDtMtmvPltn9pR5J8B+iPyPhOV4JvUZNljXIjN/jf5mqaFXp09KVewnC1culImz/VF BChK0zkz4V4dykgmLQd6krbXAQKX9advrsElODvyQ+Ctlv50++TVE80eu6l66EDXtjk/ MkSvJjwcycakNaiYPGmrqyaGCqTc/P4jdrtTRSO6pIxvIfVssNpTr6qoAiVfw1NxCmxY MytA== X-Gm-Message-State: AOJu0Yx6VBULENsJ1B/y2pY5hoqyrrtHnZV4J2I0TLtmAk7KQ/25Lo7G lbXT/hoNCnHLp5ONYloWKwt0TLzZlyoqZdrfmWA= X-Received: by 2002:a17:90a:19cb:b0:27d:5f1f:8eed with SMTP id 11-20020a17090a19cb00b0027d5f1f8eedmr10021354pjj.14.1698174718081; Tue, 24 Oct 2023 12:11:58 -0700 (PDT) MIME-Version: 1.0 References: <20231012035111.676789-1-namhyung@kernel.org> <20231012035111.676789-16-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Tue, 24 Oct 2023 12:11:46 -0700 Message-ID: Subject: Re: [PATCH 15/48] perf report: Add 'type' sort key To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Peter Zijlstra , 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 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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 24 Oct 2023 12:12:08 -0700 (PDT) On Mon, Oct 23, 2023 at 9:53 AM Arnaldo Carvalho de Melo wrote: > > Em Wed, Oct 11, 2023 at 08:50:38PM -0700, Namhyung Kim escreveu: > > The 'type' sort key is to aggregate hist entries by data type they > > access. Add mem_type field to hist_entry struct to save the type. > > If hist_entry__get_data_type() returns NULL, it'd use the > > 'unknown_type' instance. > > Needed the patch below, doing the same that is a bit before for > libtraceevent I think it can always return unknown_type if libtraceevent is not enabled. Maybe I need to move the definition here then. Thanks, Namhyung > > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c > index c79564c1d5df5db3..3fae226d115ef8e6 100644 > --- a/tools/perf/util/sort.c > +++ b/tools/perf/util/sort.c > @@ -2132,6 +2132,7 @@ struct sort_entry sort_addr = { > .se_width_idx = HISTC_ADDR, > }; > > +#ifdef HAVE_DWARF_SUPPORT > /* --sort type */ > > static int64_t > @@ -2190,7 +2191,7 @@ struct sort_entry sort_type = { > .se_snprintf = hist_entry__type_snprintf, > .se_width_idx = HISTC_TYPE, > }; > - > +#endif // HAVE_DWARF_SUPPORT > > struct sort_dimension { > const char *name; > @@ -2246,7 +2247,9 @@ static struct sort_dimension common_sort_dimensions[] = { > DIM(SORT_LOCAL_RETIRE_LAT, "local_retire_lat", sort_local_p_stage_cyc), > DIM(SORT_GLOBAL_RETIRE_LAT, "retire_lat", sort_global_p_stage_cyc), > DIM(SORT_SIMD, "simd", sort_simd), > +#ifdef HAVE_DWARF_SUPPORT > DIM(SORT_ANNOTATE_DATA_TYPE, "type", sort_type), > +#endif > }; > > #undef DIM