[client] Debug: add process tree and window inventory to GUI memory dumps

The webview runs in child processes whose memory the Go runtime profiles
cannot see, so each snapshot now also records the whole process tree with
RSS/VMS plus PSS and Private_Dirty from smaps_rollup on Linux, and the live
Wails window inventory. Snapshots now run at startup, 2 and 5 minutes.
This commit is contained in:
Zoltan Papp
2026-08-07 14:43:29 +02:00
parent 079aee8d63
commit 04ca92d42b
2 changed files with 166 additions and 21 deletions
+4 -5
View File
@@ -80,11 +80,6 @@ func init() {
func main() {
daemonAddr, userSetLogFile := parseFlagsAndInitLog()
// Debug patch, not for release: dumps heap/goroutine profiles to
// /tmp/nbgui for the memory consumption investigation.
startMemProfiler()
conn := NewConn(daemonAddr)
// Without --log-file, the GUI manages a gui-client.log that follows the
@@ -100,6 +95,10 @@ func main() {
}
})
// Debug patch, not for release: dumps heap/goroutine profiles and the
// process tree to /tmp/nbgui for the memory consumption investigation.
startMemProfiler(app)
profiles := services.NewProfiles(conn)
// updater.Holder owns the typed update State; DaemonFeed feeds it and the
// Update service is a thin Wails-bound facade over it plus the install RPCs.