diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-03-06 22:27:53 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-03-06 23:05:01 +0100 |
commit | 821eca02eb50cb65d41f72fe99acbebd5bc5cc7d (patch) | |
tree | 1e66c80fee4b576f56d7db7e0fec845dccf78508 /gc-benchmarks | |
parent | 364b6eb7cfc39f18477b8f62c1e5d58a1efae69b (diff) |
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-".
Diffstat (limited to 'gc-benchmarks')
-rwxr-xr-x | gc-benchmarks/gc-profile.scm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gc-benchmarks/gc-profile.scm b/gc-benchmarks/gc-profile.scm index 667886ea5..d95e29572 100755 --- a/gc-benchmarks/gc-profile.scm +++ b/gc-benchmarks/gc-profile.scm @@ -47,6 +47,9 @@ memory mapping of process @var{pid}. This information is obtained by reading (make-regexp "^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)) (lambda () (let loop ((line (read-line)) |