Hello!

I started playing with an mmap binding in Guile for Guix [0], and I'm
now trying to profile it. One use case would be to use it with (guix
system vm elf), which requires a full bytevector to parse an elf file.

So with my proposed API, I could extract precise from the ELF
without reading it all in memory, with something like:

--8<---------------cut here---------------start------------->8---
(call-with-mmap-bytevector
"/gnu/store/x00bkpkikw60m9mknl3y1shsj482pxzc-llvm-21.1.1/lib/libLLVM.so.21.1"
(compose elf-dynamic-info-soname elf-dynamic-info parse-elf))
=> "libLLVM.so.21.1"
--8<---------------cut here---------------end--------------->8---

I'd like to measure how much memory this consumes during execution, but
running this in ,profile at the REPL only prints: "No samples recorded."

Any tips? Do I need to run it in a loop or something?

[0]  https://codeberg.org/guix/guix/pulls/3737

-- 
Thanks,
Maxim

Reply via email to