mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Have `gc-profile.scm' make sure it's on a Linux-based system.
* gc-benchmarks/gc-profile.scm (memory-mappings): Check %HOST-TYPE for "-linux-".
This commit is contained in:
parent
364b6eb7cf
commit
821eca02eb
1 changed files with 3 additions and 0 deletions
|
@ -47,6 +47,9 @@ memory mapping of process @var{pid}. This information is obtained by reading
|
||||||
(make-regexp
|
(make-regexp
|
||||||
"^Rss:[[:blank:]]+([[:digit:]]+) kB$"))
|
"^Rss:[[:blank:]]+([[:digit:]]+) kB$"))
|
||||||
|
|
||||||
|
(if (not (string-contains %host-type "-linux-"))
|
||||||
|
(error "this procedure only works on Linux-based systems" %host-type))
|
||||||
|
|
||||||
(with-input-from-port (open-input-file (format #f "/proc/~a/smaps" pid))
|
(with-input-from-port (open-input-file (format #f "/proc/~a/smaps" pid))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let loop ((line (read-line))
|
(let loop ((line (read-line))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue