Closed Bug 791366 Opened 12 years ago Closed 12 years ago

Implement memory reporters missing on BSDs

Categories

(Core :: XPCOM, defect)

x86_64
FreeBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: jbeich, Assigned: jbeich)

References

Details

Attachments

(3 files)

      No description provided.
getrusage() comes from 4.2BSD and at least 4.4BSD has ru_majflt/ru_minflt. I'm not sure if there any incompatible implementations.
Attachment #661433 - Flags: review?(justin.lebar+bug)
NS_SUCCEEDED is probably superfluous
Attachment #661434 - Flags: review?(justin.lebar+bug)
Attached file test program
Attachment #661434 - Flags: review?(justin.lebar+bug) → review?(n.nethercote)
Attachment #661433 - Flags: review?(justin.lebar+bug) → review?(n.nethercote)
Looking at MapsReporter some bits can be ported to struct kinfo_vmentry (only FreeBSD)

- using kve_protection for rwx flags
- using kve_path for pathname when KVME_TYPE_VNODE
- Swap is when KVME_TYPE_SWAP
- using kve_resident * pagesize for Rss
- everything besides KVME_TYPE_{VNODE,DEVICE} for Anon mappings

but others need more poking or mimicking procstat(1). Any hope on other BSDs?
> Attachment #661434 [details] [diff] - Flags: review?(justin.lebar+bug@gmail.com) → review?
> (n.nethercote@gmail.com)

This is probably wise; njn's review queue is probably less crazy than mine atm.
Comment on attachment 661433 [details] [diff] [review]
Bug 791366 - Define HAVE_PAGE_FAULT_REPORTERS on every Unix.

Review of attachment 661433 [details] [diff] [review]:
-----------------------------------------------------------------

Seems ok;  we can back out and try something else if it causes problems.
Attachment #661433 - Flags: review?(n.nethercote) → review+
Comment on attachment 661434 [details] [diff] [review]
Bug 791366 - Implement Vsize and Resident memory reports on BSDs.

Review of attachment 661434 [details] [diff] [review]:
-----------------------------------------------------------------

I won't pretend to understand how GetKinfoProcSelf(), but that doesn't worry me because this is BSD-only code.  The rest of the patch looks fine, thanks.
Attachment #661434 - Flags: review?(n.nethercote) → review+
(In reply to Jan Beich from comment #4)
> Looking at MapsReporter some bits can be ported to struct kinfo_vmentry
> (only FreeBSD)

TBH I wouldn't bother.  MapsReporter on Linux has provided us with very little in the way of useful information.
Keywords: checkin-needed
Depends on: 778056
https://hg.mozilla.org/mozilla-central/rev/5cdc27b83300
https://hg.mozilla.org/mozilla-central/rev/8fce157732f3
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Depends on: 945046
Can this bug be closed?  All the blocking bugs are fixed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: