Skip to content

Instantly share code, notes, and snippets.

View mvidner's full-sized avatar

Martin Vidner mvidner

  • SUSE
  • Prague, CZ, EU
View GitHub Profile

Massif Basics

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://gist.github.com/mvidner/4e8ed01c7dabb648a50e0dd5f0fdcc62 )

The basic invocation of Massif is simple, valgrind --tool=massif my_program its_arguments, so for YaST

--------------------------------------------------------------------------------
Command: /usr/lib/YaST2/bin/y2start installation --arg initial qt
Massif arguments: --massif-out-file=/var/log/YaST2/massif-%p.out
ms_print arguments: massif-4596.out
--------------------------------------------------------------------------------
MB
373.0^ ###
| #
<span style="font-family:Wingdings">J</span>
@mvidner
mvidner / gist:eeb88c01a9a03f52974e009fa0ba4ce7
Created October 13, 2020 08:25
This is just blank vertical space
.
.
.
.
.
.
.
.
.
$ cd yast/yast-ycp-ui-bindings/examples/screenshots-tui
$ grep . *txt
Alignment1-1.txt: YaST2 - ./../../Alignment1.rb @ ohmu
Alignment1-1.txt: ┌─────────────────────────────────────────────────────────────────────┐
Alignment1-1.txt: │[This is a very long button - it reserves extra space for the label.]│
Alignment1-1.txt: │[ Stretchable button ]Label│
Alignment1-1.txt: └─────────────────────────────────────────────────────────────────────┘
AutoShortcut1-1.txt: YaST2 - ./../../AutoShortcut1.rb @ ohmu
AutoShortcut1-1.txt: ┌────────────────────────┐
AutoShortcut1-1.txt: │┌Software Selection────┐│
@mvidner
mvidner / yast-size.txt
Created September 18, 2020 13:59
YaST takes up 258 MiB on disk
YaST takes up 258 MiB on disk.
Starting with a 2020-09-01 openSUSE Tumbleweed that already has Cockpit installed,
these are the byte sizes of packages installed by "zypper install yast2"
218922718 glibc-locale
16627072 ruby2.7
9940016 ruby2.7-rubygem-nokogiri
3427518 hwinfo
3413184 libruby2_7-2_7
@mvidner
mvidner / installer-memory-consumption-ideas.md
Last active July 7, 2020 07:53
installer memory consumption: where to look next
@mvidner
mvidner / ps.console
Last active June 10, 2020 08:47
table_to_csv.sh: Convert a space-delimited table (where the last column may contain spaces) to CSV (comma separated value)
$ ps -f | tee /dev/stderr | ./table_to_csv > ps.csv
UID PID PPID C STIME TTY TIME CMD
martin 12310 3022 0 09:36 pts/13 00:00:00 /bin/bash
martin 13255 12310 0 10:18 pts/13 00:00:00 ps -f
martin 13256 12310 0 10:18 pts/13 00:00:00 tee /dev/stderr
martin 13257 12310 0 10:18 pts/13 00:00:00 /bin/bash ./table_to_csv

Thank you for the report!

  1. What steps did you take?
  2. What was the expected result?
  3. What was the actual result?
@mvidner
mvidner / unlocking-the-clubhouse.md
Last active January 13, 2020 08:30
Unlocking the Clubhouse: Women in Computing

Unlocking the Clubhouse: Women in Computing

Margolis, Jane and Fisher, Allan (2002). Unlocking the Clubhouse: Women in Computing. Cambridge, MA: MIT Press. https://mitpress.mit.edu/books/unlocking-clubhouse

This is an expanded table of contents.

Introduction: Women out of the loop