mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_dump.c: check procstat_getvmmap
* configure.in: check also procstat_getvmmap, which is not available on FreeBSD 9. [ruby-core:68468] [Bug #10954] * vm_dump.c (procstat_vm): use kinfo_getvmmap instead if procstat_getvmmap is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
84b5bb9802
commit
5a62fdee4d
3 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
Wed Mar 11 13:28:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in: check also procstat_getvmmap, which is not
|
||||
available on FreeBSD 9. [ruby-core:68468] [Bug #10954]
|
||||
|
||||
* vm_dump.c (procstat_vm): use kinfo_getvmmap instead if
|
||||
procstat_getvmmap is not available.
|
||||
|
||||
Wed Mar 11 09:15:21 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* internal.h: define struct MEMO.
|
||||
|
|
|
@ -3143,6 +3143,9 @@ fi
|
|||
AS_CASE(["$target_os"],
|
||||
[freebsd*], [
|
||||
AC_CHECK_LIB([procstat], [procstat_open_sysctl])
|
||||
if test "x$ac_cv_lib_procstat_procstat_open_sysctl" = xyes; then
|
||||
AC_CHECK_FUNCS(procstat_getvmmap)
|
||||
fi
|
||||
])
|
||||
AS_CASE(["$target_cpu-$target_os"],
|
||||
[*-darwin*], [
|
||||
|
|
|
@ -735,7 +735,11 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp)
|
|||
ptrwidth, "START", ptrwidth, "END", "PRT", "RES",
|
||||
"PRES", "REF", "SHD", "FL", "TP", "PATH");
|
||||
|
||||
#ifdef HAVE_PROCSTAT_GETVMMAP
|
||||
freep = procstat_getvmmap(procstat, kipp, &cnt);
|
||||
#else
|
||||
freep = kinfo_getvmmap(kipp->ki_pid, &cnt);
|
||||
#endif
|
||||
if (freep == NULL)
|
||||
return;
|
||||
for (i = 0; i < cnt; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue