LWN: Comments on "Data-type profiling for perf" https://lwn.net/Articles/955709/ This is a special feed containing comments posted to the individual LWN article titled "Data-type profiling for perf". en-us Tue, 02 Sep 2025 19:46:43 +0000 Tue, 02 Sep 2025 19:46:43 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net It's not in 6.8 https://lwn.net/Articles/968533/ https://lwn.net/Articles/968533/ Hi-Angel <div class="FormattedComment"> Okay, I figured out what it's caused by: it's because I have `-flto` in default options and evidently there's some bug in `perf` that makes it break when that's defined. After removing flto I managed to compile it.<br> </div> Fri, 05 Apr 2024 12:01:32 +0000 It's not in 6.8 https://lwn.net/Articles/968527/ https://lwn.net/Articles/968527/ Hi-Angel <div class="FormattedComment"> FTR, apparently there's some problem with `perf` in 6.8. I was tired of waiting for 6.8 perf to appear in Arch repos so decided to download PKGBUILD and compile it myself. Well, now I know why it takes for long for perf to get updated: it's unbuildable, the linking stage fails with (also, Idk why text below is not getting aligned, I inserted indentation before it 🤷‍♂️):<br> <p> LINK perf<br> /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib/Scrt1.o: in function `_start':<br> (.text+0x1b): undefined reference to `main'<br> /usr/bin/ld: pmu-events/pmu-events-in.o: in function `map_for_pmu':<br> pmu-events.c:(.text+0x174): undefined reference to `perf_pmu__getcpuid'<br> /usr/bin/ld: pmu-events.c:(.text+0x1ac): undefined reference to `strcmp_cpuid_str'<br> /usr/bin/ld: pmu-events/pmu-events-in.o: in function `pmu_events_table__for_each_event':<br> (.text+0x311): undefined reference to `pmu__name_match'<br> /usr/bin/ld: pmu-events/pmu-events-in.o: in function `pmu_events_table__find_event':<br> (.text+0x4ce): undefined reference to `pmu__name_match'<br> /usr/bin/ld: (.text+0x5e0): undefined reference to `pmu__name_match'<br> /usr/bin/ld: pmu-events/pmu-events-in.o: in function `pmu_events_table__num_events':<br> (.text+0x6f7): undefined reference to `pmu__name_match'<br> /usr/bin/ld: pmu-events/pmu-events-in.o: in function `perf_pmu__find_events_table':<br> (.text+0xa33): undefined reference to `pmu__name_match'<br> /usr/bin/ld: pmu-events/pmu-events-in.o:(.text+0xae3): more undefined references to `pmu__name_match' follow<br> /usr/bin/ld: pmu-events/pmu-events-in.o: in function `find_core_events_table':<br> (.text+0xb79): undefined reference to `strcmp_cpuid_str'<br> /usr/bin/ld: pmu-events/pmu-events-in.o: in function `find_core_metrics_table':<br> (.text+0xc09): undefined reference to `strcmp_cpuid_str'<br> /usr/bin/ld: /home/constantine/Projects/builds/linux-tools/src/linux/tools/perf/libsymbol/libsymbol.a(libsymbol-in.o): in function `__tolower':<br> /home/constantine/Projects/builds/linux-tools/src/linux/tools/lib/symbol/kallsyms.c:52:(.text+0x10): undefined reference to `_ctype'<br> /usr/bin/ld: /home/constantine/Projects/builds/linux-tools/src/linux/tools/perf/libsymbol/libsymbol.a(libsymbol-in.o): in function `__toupper':<br> /home/constantine/Projects/builds/linux-tools/src/linux/tools/lib/symbol/kallsyms.c:59:(.text+0x3e): undefined reference to `_ctype'<br> collect2: error: ld returned 1 exit status<br> <p> </div> Fri, 05 Apr 2024 11:50:57 +0000 It's not in 6.8 https://lwn.net/Articles/966488/ https://lwn.net/Articles/966488/ Hi-Angel <div class="FormattedComment"> Oh, actually, sorry for the confusion, it seems that for some reason Archlinux packages updated the kernel but still didn't update `perf` utility that goes with it, Idk why. It was marked outdated 12 days ago. Anyway, please disregard my comment, will re-test it once Arch update perf to the kernel version.<br> </div> Sat, 23 Mar 2024 09:40:23 +0000 It's not in 6.8 https://lwn.net/Articles/966487/ https://lwn.net/Articles/966487/ Hi-Angel <div class="FormattedComment"> <span class="QuotedText">&gt; on its way to Linux v6.8 in January</span><br> <p> I'm on 6.8.1 and calling a `perf annotate --data-type` results in a `Error: unknown option `data-type'`. So it didn't make it.<br> </div> Sat, 23 Mar 2024 09:36:50 +0000 Data-type profiling for perf https://lwn.net/Articles/956813/ https://lwn.net/Articles/956813/ rwmj <div class="FormattedComment"> This looks fantastic. Next step would be some kind of latency analysis. I wonder if it's possible to see which fields have high latency for writes (which might indicate a cache line "ping-ponging" between cores)?<br> </div> Thu, 04 Jan 2024 10:47:11 +0000 Data-type profiling for perf https://lwn.net/Articles/956170/ https://lwn.net/Articles/956170/ taladar <div class="FormattedComment"> If it is cheaper for the compiler to compute writing the information to a separate file as part of the compile process might also be an option.<br> </div> Wed, 27 Dec 2023 10:14:09 +0000 Data-type profiling for perf https://lwn.net/Articles/956169/ https://lwn.net/Articles/956169/ Wol <div class="FormattedComment"> Sounds to me like a straightforward database file with index ...<br> <p> Cheers,<br> Wol<br> </div> Wed, 27 Dec 2023 10:07:37 +0000 Data-type profiling for perf https://lwn.net/Articles/956161/ https://lwn.net/Articles/956161/ rywang014 <div class="FormattedComment"> Can we do some large scale automations to discover more layout optimizations? It can run a wide range of benchmarks with this tool, and find if there are structs with multiple active cache lines and can be shuffled to a same cache line.<br> </div> Tue, 26 Dec 2023 21:27:23 +0000 Data-type profiling for perf https://lwn.net/Articles/956160/ https://lwn.net/Articles/956160/ DanilaBerezin <div class="FormattedComment"> I think slower builds and bloated binaries are an okay trade off for a debug build. But in general, yeah I would agree, I think if it's possible to create a secondary program that inverts the lists after the build, that would probably be preferable.<br> </div> Tue, 26 Dec 2023 21:08:46 +0000 Data-type profiling for perf https://lwn.net/Articles/956089/ https://lwn.net/Articles/956089/ dankamongmen <div class="FormattedComment"> this looks absolutely outstanding<br> </div> Sun, 24 Dec 2023 00:16:02 +0000 Data-type profiling for perf https://lwn.net/Articles/956062/ https://lwn.net/Articles/956062/ roc <div class="FormattedComment"> We don't really want compilers to emit redundant DWARF tables. That slows down builds and creates bloated binaries. A better approach would be to have a tool that can build inverted location lists from the regular location lists, persistently caching the results by build-ID when that's helpful.<br> </div> Sat, 23 Dec 2023 05:15:19 +0000 Data-type profiling for perf https://lwn.net/Articles/955980/ https://lwn.net/Articles/955980/ acme <div class="FormattedComment"> It's in <a href="https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/log/?h=tmp.perf-tools-next">https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf...</a>, probably will move to perf-tools-next later today, on its way to Linux v6.8 in January.<br> <p> Great article! Should encourage people to test it and help with finding issues, fixing problems and adding more features.<br> </div> Fri, 22 Dec 2023 12:12:48 +0000 Data-type profiling for perf https://lwn.net/Articles/955975/ https://lwn.net/Articles/955975/ Sesse <div class="FormattedComment"> Oh wow, I've been wanting this for some time. At some point, I even wrote a hack for something similar myself :-)<br> </div> Fri, 22 Dec 2023 08:11:05 +0000 Data-type profiling for perf https://lwn.net/Articles/955956/ https://lwn.net/Articles/955956/ pctammela <div class="FormattedComment"> This is really nice, great work!<br> </div> Thu, 21 Dec 2023 16:51:34 +0000