Getting information about inlined / not inlined functions

I am looking for options i can add to the Rustflags so that cargo build emits information which functions of my programm are inlined or not and posibly why not.
The output of rustc -vV:
rustc 1.89.0 (29483883e 2025-08-04)
binary: rustc
commit-hash: 29483883eed69d5fb4db01964cdf2af4d86e9cb2
commit-date: 2025-08-04
host: x86_64-unknown-linux-gnu
release: 1.89.0
LLVM version: 20.1.7

I would suggest you describe the problem you're trying to solve using that information. What's your end goal?

There are 2 issues which i think depends on the inlining decission of LLvm.
There is a general performance issue.
The programm is at the moment a chess engine. It genrates the legal moves from a chess position. White and Black pieces are handelt equal. Sometimes there are quit bit differences in the perfomance. So i want to find out which functions have to be inlined for optimal and symmetric perfomance to set sem manually. So i hopefully can overcome playing with inline-threshold.
i found options to show he inlining infomation but only for rustc and system functions. so i wonder if i an get this informaton also for my functions.

I think that one of the effective ways to study this kind of problem is examining the assembly code, perhaps using a tool such as cargo-show-asm. This way, you can see what functions are inlined into the selected function, and what sort of things that function is doing otherwise, so you can see more differences than just inlining or lack of inlining.

There’s the really nifty cargo-remark that tells LLVM to generate optimization "remarks", including for every non-inlined callsite the reason it failed to inline that particular call, and then compiles a nice HTML report from the remarks.

2 Likes