aprofutil(1)

πŸ’– aprofutil β€” Mono's AOT profile tool πŸ’–

okay bestie, gather round, because this little cutie from the General Commands Manual is about to become your new obsession. it's aprofutil, and no cap, it's giving "tiny tool, big main character energy" 🫢


✨ NAME ✨

aprofutil β€” Mono's AOT profile tool


🌸 SYNOPSIS 🌸

aprofutil [options] <your-aot-profile.aotprofile>

so yeah, it's aprofutil, you throw some [options] at it, and then you hand it your very own <your-aot-profile.aotprofile> file. that's the whole vibe check. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

the AOT profile tool is, literally, a tool to inspect AOT profiler files. that's its whole job. it woke up and chose profiling.

it can be used to show, filter and write the profiler file content in readable text form. so like, the chaotic binary soup goes in, and pretty readable text comes out. iconic behavior, honestly. ✨


πŸ‘‘ OPTIONS πŸ‘‘

here's the full menu, bestie, no skips, no cuts, every single one of them:

  • -h, --help, -? β€” show this message and exit
  • -a, --all β€” show modules, types and methods in the profile
  • -d, --modules β€” show modules in the profile
  • --filter-method=VALUE β€” filter by method with regex VALUE
  • --filter-module=VALUE β€” filter by module with regex VALUE
  • --filter-type=VALUE β€” filter by type with regex VALUE
  • -m, --methods β€” show methods in the profile
  • -o, --output=VALUE β€” write profile to OUTPUT file
  • -s, --summary β€” show summary of the profile
  • -t, --types β€” show types in the profile
  • -v, --verbose β€” output information about progress during the run of the tool

πŸŽ€ EXAMPLES πŸŽ€

okay this is the part where it gets fun. real commands, real output, let's go πŸƒβ™€οΈπŸ’¨

πŸ“ Display modules and summary of XA startup profile

mono aprofutil.exe -sd startup.aotprofile

Output:

Modules:
     41C38B0A-2032-45CE-8638-0299CED65330 mscorlib
     0326DF03-2158-4F7A-9A2B-B7A9419F021D Mono.Android
     8FB63BB4-1195-4173-A9ED-0EC341B07C32 System
     74C06E06-C1C7-4A4C-B64E-EAC7DBB08BBC Java.Interop
     11E2319F-6A26-461C-9C46-C972248BEE4B System.Core
     7999CC4B-D566-4ECA-8A72-469344172CA3 Xamarin.Forms.Platform.Android
     C5089213-328B-451D-BA87-D6585C120780 Xamarin.Forms.Performance.Integration.Droid
     D754F8AE-503C-41C8-B16F-647FC662507A Xamarin.Android.Support.v7.AppCompat
     929ECB6D-1171-4C66-8470-DD32AC608969 Xamarin.Android.Support.Fragment
     F841E23B-59A8-4AE2-9A84-D2FC1D891B4A Xamarin.Forms.Core
     945CCBF8-C2DB-468B-B3BD-D7ACA37B69AD Xamarin.Forms.Performance.Integration
     AF20FA19-F07E-4BD4-B5ED-104706EA660E Xamarin.Forms.Xaml
     629C84F8-0988-42EF-8BC5-872173A0A71F FormsViewGroup
     60398815-8E62-487E-A553-781F56A0849D Xamarin.Android.Support.Design
     F0C550D7-665A-40B5-A307-8E9B49976D87 Xamarin.Android.Support.Core.UI
     23A34485-DE75-440E-BA9D-E235F664E990 Xamarin.Android.Support.Compat
Summary:
     Modules:         16
     Types:          907
     Methods:      4,230

look at all those GUIDs, they ate πŸ’… and yes, -sd is just -s and -d holding hands, we love a combo.

🌈 Filter Java.Interop.Runtime type in XA startup profile

mono aprofutil.exe --filter-type Java.Interop.Runtime -sa startup.aotprofile

Output:

Modules:
     0326DF03-2158-4F7A-9A2B-B7A9419F021D Mono.Android
Types:
     Java.Interop.Runtime
Methods:
     bool Java.Interop.Runtime:IsGCUserPeer (Android.Runtime.IJavaObject)
     bool Java.Interop.Runtime:IsGCUserPeer (intptr)
Summary:
     Modules:          1  (of 16)
     Types:            1  (of 907)
     Methods:          2  (of 4230)

see how it narrowed it down?? --filter-type said "only Java.Interop.Runtime gets to be in this photo" and everyone else left the group chat. the summary even tells you it's 1 (of 16) and 1 (of 907) and 2 (of 4230) β€” the receipts are right there πŸ“Έβœ¨


πŸ’œ SEE ALSO πŸ’œ


lowkey reminder bestie: those VALUEs in the filter options are regex, so you can get as fancy as you want with the matching. no pressure, just possibilities. 🧚

and that's the whole page!! this gem comes from the General Commands Manual and it's signed off with the name aprofutil(1) at the bottom, like a lil autograph. so next time you're staring down an .aotprofile file wondering what's inside, you know exactly who to call. slay, filter, summarize, periodt. πŸ’–πŸŽ€πŸ¦‹β­