Valgrind is an instrumentation framework that runs a program by simulating every instruction. It has several tools. Memcheck is the original one, used for detecting memory errors. Massif is a memory profiler.
(The output it produces, example: https://github.com/yast/yast-installation/wiki/Massif-Sample-Output )
The basic invocation of Massif is simple,
valgrind --tool=massif my_program its_arguments, so for YaST it is
# valgrind --tool=massif /usr/lib/YaST2/bin/y2start sw_single qt
Or, if we don't want to dig in the startup scripts, we use a bigger gun:
# valgrind --tool=massif --trace-children=yes yast2 sw_single
That writes out massif.out.99999 where 99999 is process ID.
To make them somewhat more readable, use the included tool
which adds an ASCII graph and computes percentages:
ms_print massif.out.19015 > massif.out.19015.txt
The backtraces will contain some names, at the boundaries of shared libraries But to see names inside libraries Massif needs debuginfo files.
Massif at Installation Time
tl;dr: Boot with
Install Massif. It is part of the gdb extension, so use
extend=gdbat the boot prompt, or run
extend gdbin an inst-sys shell.
Install Debuginfo. For Tumbleweed an automatic downloader is in place from https://debuginfod.opensuse.org/.
Wrap Massif around the main installer process. The startup/YaST2.call script will do it if the environment variable
MASSIF=1, putting the logs where save_y2logs expects them.