[Tools] (P14): the sampler and profiler find spawn and tcp server processes by their install path, plus a per-component profile split.

This commit is contained in:
2026-10-07 10:27:01 -04:00
parent 8346d80999
commit 0b0089e599
3 changed files with 69 additions and 3 deletions
+2 -2
View File
@@ -95,9 +95,9 @@ static int ScanPids(const char* pkg, int* pids) {
snprintf(path, sizeof path, "/proc/%s/cmdline", e->d_name);
if (ReadSmall(path, buf, sizeof buf) <= 0) continue;
// The replay process (and its :services), plus the render-server processes the spawn and
// tcp arms exec (their cmdline is the server library's name, not the package's).
// tcp arms exec (their cmdline is the server library's path in the package's install dir).
if ((strncmp(buf, pkg, len) == 0 && (buf[len] == 0 || buf[len] == ':')) ||
strncmp(buf, "libMobileGLServer.so", 20) == 0)
(strstr(buf, "libMobileGLServer.so") != NULL && strstr(buf, pkg) != NULL))
pids[n++] = atoi(e->d_name);
}
closedir(d);