MPROF(1)

πŸ“¦
version 22.01.8 Β· 3 versions
, in alpine 3.24

πŸ’… MPROF πŸ’…

okay so bestie, welcome to mprof β€” the Mercury profiler, version 22.01.8, running on x86_64-alpine-linux-musl. this is the whole manual page experience, group-chat style, but literally every fact stays. no cap. 🫢


✨ SYNOPSIS ✨

mercury_profile [<options>] [<files>]

that's it. that's the whole vibe. options first, files after, both optional. slay. πŸ’…


🌸 DESCRIPTION 🌸

mprof produces execution profiles for Mercury programs. it hands you a flat profile, and optionally it also gives you a hierarchical (call graph based) profile, all built from data collected while your program was actually running. it's giving observability. it's giving main character energy. πŸ”₯


πŸŽ€ NOTES πŸŽ€

  • mprof is one of the development tools that ship as part of the Mercury distribution. iykyk. ✨
  • this manual page is a brief summary and nothing more. for further information, go read the Mercury User's Guide. like, actually read it. it has lore. πŸ“–

πŸ¦‹ ARGUMENTS πŸ¦‹

so here's the tea about <files>:

  • if you pass no <files> at all, then the --use-dynamic option is implied β€” meaning the call graph gets built dynamically. surprise feature, but make it fashion. πŸ’«
  • if you do pass <files>, then the files you specify should be the .prof file for every module in the program. and yes, every single one, don't be shy.
  • those .prof files are generated automatically by the Mercury compiler, and they contain the program's static call graph. free real estate, generated for you. 🎁

πŸ’œ OPTIONS πŸ’œ

  • -h, --help β€” print this usage message. classic. short king behavior. πŸ‘‘

πŸ”₯ PROFILER OPTIONS πŸ”₯

  • -c, --call-graph β€” include the call graph profile. more data, more better. 🌈
  • -d, --use-dynamic β€” build the call graph dynamically. πŸ’«
  • -p, --profile {time, memory-words, memory-cells} β€” pick what you're profiling: time, the amount of memory allocated (memory-words), or the number of memory allocations (memory-cells) β€” and yes, that last one is regardless of size. tiny allocations count too, they're valid. πŸ’–
  • -m β€” same as --profile memory-words. πŸ’«
  • -M β€” same as --profile memory-cells. πŸ’«
  • -t β€” same as --profile time. ⏰
  • --no-demangle β€” outputs the mangled predicate and function names. so raw. so unprocessed. honestly kinda iconique in a feral way. πŸ’€

πŸ“ FILENAME OPTIONS πŸ“

  • -C <file>, --count-file <file> β€” name of the count file. usually Prof.Counts, Prof.MemoryWords, or Prof.MemoryCells. pick your fighter. πŸŽ€
  • -D <file>, --declaration-file <file> β€” name of the declaration file. usually Prof.Decl. ✨
  • -P <file>, --call-pair-file <file> β€” name of the call-pair file. usually Prof.CallPair. πŸ’…
  • -L <file>, --library-callgraph <file> β€” name of the file which contains the call graph for the library modules. the library's whole family tree, basically. 🌳

🧚 SNAPSHOT OPTIONS 🧚

  • -s, --snapshots β€” show a summary of heap objects at the times benchmarking.report_memory_attribution was called. heads up bestie: this overrides other profiler modes. it's not a team player, it's the main character. πŸ‘‘
  • --snapshots-file <file> β€” name of the snapshots file. usually Prof.Snapshots. πŸ’–
  • -T, --snapshots-by-type β€” group results by type. organize, categorize, thrive. πŸ¦‹
  • -b, --snapshots-brief β€” generate a brief profile. sometimes less is more, and that's iconic. ✨
  • -r, --snapshots-include-runtime β€” include internal Mercury runtime structures in the profile. these are excluded by default, so this is you saying "actually, i want the behind-the-scenes content too." πŸ™ˆ

⭐ VERBOSITY OPTIONS ⭐

  • -v, --verbose β€” output progress messages at each stage. updates! we love updates! πŸ“£
  • -V, --very-verbose β€” output very verbose progress messages. maximum yapping, and honestly? valid. 😭

πŸ‘‘ AUTHORS πŸ‘‘

The Mercury team. πŸ’–


this program and its documentation are copyright by the University of Melbourne and the Mercury team. they may be copied only under the terms of the GNU General Public License β€” see the file COPYING in the Mercury distribution. respecting licenses is the ultimate slay. 🫢


🌈 SEE ALSO 🌈


and that's the page, bestie πŸŽ€ β€” brought to you by the Mercury Programmer's Manual, dated 2026-04-24, and version 22.01.8 of mprof on x86_64-alpine-linux-musl. go profile something gorgeous. periodt. πŸ’œ

πŸ“¦ where this page comes from