The NetBSD Project

CVS log for src/external/bsd/top/dist/machine/m_netbsd.c

[BACK] Up to [cvs.NetBSD.org] / src / external / bsd / top / dist / machine

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Feb 4 05:43:05 2024 UTC (11 months, 3 weeks ago) by mrg
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -4 lines
update my email address.

Revision 1.26.2.2: download - view: text, markup, annotated - select for diffs
Mon Dec 18 14:08:37 2023 UTC (13 months, 1 week ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2
Diff to: previous 1.26.2.1: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.2.1: +70 -7 lines
Pull up following revision(s) (requested by mrg in ticket #503):

	external/bsd/top/dist/machine/m_netbsd.c: revision 1.27
	external/bsd/top/dist/machine/m_netbsd.c: revision 1.28

top: add network in & out bytes to the top display.

inspired by the macos top(1).

the first value displayed is the total in/out bytes since boot,
but each update is the amount since the prior update.  the new
fetching code heavily based upon netstat/if.c.

old version:
Swap: 128G Total, 128G Free / Pools: 13G Used

new version:
Swap: 128G Total, 128G Free / Pools: 13G Used, / Network: 26M In, 804K Out

update the list of people who have contributed to m_netbsd.c.
Remove extraneous comma after pool info

Revision 1.26.2.1: download - view: text, markup, annotated - select for diffs
Mon Dec 18 14:06:44 2023 UTC (13 months, 1 week ago) by martin
Branches: netbsd-10
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +17 -9 lines
Pull up following revision(s) (requested by mrg in ticket #502):

	external/bsd/top/dist/machine/m_netbsd.c: revision 1.29

avoid crashes when proc_from_thread() returns NULL.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Dec 14 07:18:44 2023 UTC (13 months, 1 week ago) by mrg
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +17 -9 lines
avoid crashes when proc_from_thread() returns NULL.

XXX: pullup-10, ...

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Oct 22 14:44:09 2023 UTC (15 months ago) by simonb
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4 lines
Remove extraneous comma after pool info

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Oct 21 06:30:23 2023 UTC (15 months ago) by mrg
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +69 -6 lines
top: add network in & out bytes to the top display.

inspired by the macos top(1).

the first value displayed is the total in/out bytes since boot,
but each update is the amount since the prior update.  the new
fetching code heavily based upon netstat/if.c.

old version:

Swap: 128G Total, 128G Free / Pools: 13G Used

new version:

Swap: 128G Total, 128G Free / Pools: 13G Used, / Network: 26M In, 804K Out

update the list of people who have contributed to m_netbsd.c.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Fri Jul 15 06:39:06 2022 UTC (2 years, 6 months ago) by mrg
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RC1
Branch point for: netbsd-10
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +8 -6 lines
add pool usage to the output, sharing the line with swap data.

looks like, eg:

Swap: 64G Total, 135M Used, 64G Free / Pools: 16G Used


future work:  figure out the utilisation percentage like vmstat -m

Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Apr 16 13:02:47 2021 UTC (3 years, 9 months ago) by christos
Branches: MAIN
CVS tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +5 -5 lines
go back to right-aligning the titles for CPU and WCPU.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Apr 3 19:25:38 2021 UTC (3 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +23 -16 lines
- Bump field width for state to accommodate > 9 CPUs
- When star formatting to adjust the width, count the trailing number of
  digits starting backwards instead of using strcspn because the lwp name
  might contain other digits like wm0TxRx/10.

Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 21:51:39 2019 UTC (5 years, 7 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20: +24 -5 lines
Sync with HEAD

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Apr 27 14:10:01 2019 UTC (5 years, 9 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +12 -13 lines
simplify and explain

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Apr 26 19:39:19 2019 UTC (5 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +24 -4 lines
for "countable" lwp names, try to display name*<count> instead of truncating.

Revision 1.19.12.2: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:50:00 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.19.12.1: preferred, colored; branchpoint 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19.12.1: +4 -4 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Oct 30 21:15:09 2018 UTC (6 years, 2 months ago) by kre
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +4 -4 lines

sysctl(KERN_BOPOTIME) started returning a struct timespec in 2009.
Update to match....    We're slow but we get there eventually!

NFC for any of these programs, struct timeval and struct timespec
are the same size, and only the tv_sec field of boottime is used,
and that's unchanged.

Revision 1.19.12.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:13 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -4 lines
Sync with HEAD

Revision 1.19.6.1: download - view: text, markup, annotated - select for diffs
Sat Jun 9 15:40:05 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2
Diff to: previous 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19: +4 -4 lines
Pull up following revision(s) (requested by kamil in ticket #872):

	external/bsd/top/dist/machine/m_netbsd.c: revision 1.20

Fix read of unitialized array elements in top(1)

The cp_old array is allocated with malloc(3) and its pointer is passed to=
percentages64().

In this function there happens a calculation of total_change, which value=
depends on the value inside the unitialized cp_old[] array.

WARNING: MemorySanitizer: use-of-uninitialized-value
/usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6
/usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:478:65
SUMMARY: MemorySanitizer: use-of-uninitialized-value
/usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 in percentages64
Exiting

Fix this issue by changling malloc(3) with calloc(3).

Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by <Yang Zheng>

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu May 31 10:14:21 2018 UTC (6 years, 7 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -4 lines
Fix read of unitialized array elements in top(1)

The cp_old array is allocated with malloc(3) and its pointer is passed to
percentages64().

In this function there happens a calculation of total_change, which value
depends on the value inside the unitialized cp_old[] array.

==26662==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x268a2c in percentages64 /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6
#1 0x26748b in get_system_info /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:478:6
#2 0x25518e in do_display /usr/src/external/bsd/top/bin/../dist/top.c:507:5
#3 0x253038 in main /usr/src/external/bsd/top/bin/../dist/top.c:975:2
#4 0x21cad1 in ___start (/usr/bin/top+0x1cad1)
SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 in percentages64
Exiting

Fix this issue by changling malloc(3) with calloc(3).

Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by <Yang Zheng>

Revision 1.18.8.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:54:10 2017 UTC (8 years ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18: +19 -9 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Dec 26 12:46:31 2016 UTC (8 years, 1 month ago) by leot
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: pgoyette-compat, netbsd-8
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +19 -9 lines
Implement the `c' command in "interactive mode" that displays only commands
that match a specified string.

Reviewed by and thanks to <Riastradh>

Revision 1.16.8.2: download - view: text, markup, annotated - select for diffs
Tue Aug 19 23:52:16 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.16.8.1: preferred, colored; branchpoint 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16.8.1: +3 -7 lines
Rebase to HEAD as of a few days ago.

Revision 1.16.2.2: download - view: text, markup, annotated - select for diffs
Thu May 22 15:51:29 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.16.2.1: preferred, colored; branchpoint 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16.2.1: +3 -7 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Oct 20 03:02:27 2013 UTC (11 years, 3 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -7 lines
remove unused variables

Revision 1.16.8.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:26:45 2013 UTC (11 years, 11 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -3 lines
resync with head

Revision 1.16.2.1: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:04:38 2013 UTC (12 years ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -3 lines
sync with head

Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Jan 3 10:12:36 2013 UTC (12 years ago) by para
Branches: MAIN
CVS tags: yamt-pagecache-base8, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, agc-symver-base, agc-symver
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -3 lines
explicitly include sys/resource.h

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Oct 8 08:45:37 2011 UTC (13 years, 3 months ago) by njoly
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache, tls-maxphys
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -4 lines
Adjust UID header position, to be aligned with the datas.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Apr 15 02:05:53 2011 UTC (13 years, 9 months ago) by christos
Branches: MAIN
CVS tags: cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +8 -8 lines
Swap the command and the thread name in the thread view and let the command
be as long as it wants. (Vladimir Kirillov)

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon May 31 18:14:59 2010 UTC (14 years, 8 months ago) by rmind
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +7 -7 lines
Fix previous, so it builds on some ports.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon May 31 03:18:33 2010 UTC (14 years, 8 months ago) by rmind
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +7 -30 lines
Fix ps(1) and top(1) to show reasonable CPU numbers i.e. cpu_index() provided
by the kernel, instead of CPU order number, which is generally random.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed May 12 22:09:36 2010 UTC (14 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +74 -64 lines
implement fullcmd mode. Now we need to modernize the machine specific code
to handle displays > 80 columns to make this work effectively.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Oct 21 21:11:57 2009 UTC (15 years, 3 months ago) by rmind
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -12 lines
Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Jul 27 16:26:48 2009 UTC (15 years, 6 months ago) by njoly
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +7 -6 lines
Make process CPU value drop the decimal part when reaching 100%, like
WCPU.

Revision 1.5.10.1: download - view: text, markup, annotated - select for diffs
Wed May 13 18:52:39 2009 UTC (15 years, 8 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +47 -39 lines
Sync with HEAD.

Second commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue May 5 18:51:22 2009 UTC (15 years, 8 months ago) by christos
Branches: MAIN
CVS tags: jym-xensuspend-nbase, jym-xensuspend-base
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +34 -34 lines
WARNS=4

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Apr 24 19:07:45 2009 UTC (15 years, 9 months ago) by njoly
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +8 -6 lines
Drop the process WCPU decimal part when it reaches 100.0% (threaded
application on SMP system), to make it stay in the 5 expected columns.

ok by christos.

Revision 1.5.8.1: download - view: text, markup, annotated - select for diffs
Wed Apr 1 00:25:21 2009 UTC (15 years, 10 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +10 -4 lines
Pull up following revision(s) (requested by mrg in ticket #622):
	bin/csh/csh.1: revision 1.46
	bin/csh/func.c: revision 1.37
	bin/ps/print.c: revision 1.111
	bin/ps/ps.c: revision 1.74
	bin/sh/miscbltin.c: revision 1.38
	bin/sh/sh.1: revision 1.92 via patch
	external/bsd/top/dist/machine/m_netbsd.c: revision 1.7
	lib/libkvm/kvm_proc.c: revision 1.82
	sys/arch/mips/mips/cpu_exec.c: revision 1.55
	sys/compat/darwin/darwin_exec.c: revision 1.57
	sys/compat/ibcs2/ibcs2_exec.c: revision 1.73
	sys/compat/irix/irix_resource.c: revision 1.15
	sys/compat/linux/arch/amd64/linux_exec_machdep.c: revision 1.16
	sys/compat/linux/arch/i386/linux_exec_machdep.c: revision 1.12
	sys/compat/linux/common/linux_limit.h: revision 1.5
	sys/compat/osf1/osf1_resource.c: revision 1.14
	sys/compat/svr4/svr4_resource.c: revision 1.18
	sys/compat/svr4_32/svr4_32_resource.c: revision 1.17
	sys/kern/exec_subr.c: revision 1.62
	sys/kern/init_sysctl.c: revision 1.160
	sys/kern/kern_exec.c: revision 1.288
	sys/kern/kern_resource.c: revision 1.151
	sys/sys/param.h: patch
	sys/sys/resource.h: revision 1.31
	sys/sys/sysctl.h: revision 1.184
	sys/uvm/uvm_extern.h: revision 1.153
	sys/uvm/uvm_glue.c: revision 1.136
	sys/uvm/uvm_mmap.c: revision 1.128
	usr.bin/systat/ps.c: revision 1.32
- - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.
- - adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.
- - add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)
- - patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)
- - patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.
- - update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)
this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.
tested on i386 and sparc64, build tested on several other platforms.
thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Mar 29 01:02:49 2009 UTC (15 years, 10 months ago) by mrg
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +10 -4 lines
- add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Mar 8 16:26:03 2009 UTC (15 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -4 lines
Adjust weight of SIDL down so idle kthreads don't eat up all of the
thread display

Revision 1.5.6.2: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:40:55 2008 UTC (16 years, 3 months ago) by haad
Branches: haad-dm
Diff to: previous 1.5.6.1: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.6.1: +1353 -0 lines
Sync with HEAD.

Revision 1.5.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 05:15:53 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.5.2.1: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.2.1: +1353 -0 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.5.6.1
Sat Aug 2 23:20:16 2008 UTC (16 years, 5 months ago) by haad
Branches: haad-dm
FILE REMOVED
Changes since revision 1.5: +0 -1353 lines
file m_netbsd.c was added on branch haad-dm on 2008-10-19 22:40:55 +0000

Revision 1.5.2.1
Sat Aug 2 23:20:16 2008 UTC (16 years, 5 months ago) by wrstuden
Branches: wrstuden-revivesa
FILE REMOVED
Changes since revision 1.5: +0 -1353 lines
file m_netbsd.c was added on branch wrstuden-revivesa on 2008-09-18 05:15:53 +0000

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Aug 2 23:20:16 2008 UTC (16 years, 5 months ago) by cube
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base
Branch point for: wrstuden-revivesa, netbsd-5, jym-xensuspend, haad-dm
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +5 -5 lines
Make sure format_next_{proc,lwp} return a pointer to a buffer at least
MAX_COLS long otherwise a '\0' might be printed in a random place of
memory.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Jul 21 19:29:36 2008 UTC (16 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +20 -16 lines
- fix p for threads
- more sane ordering for thread command, username, and pid

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Jul 20 18:52:07 2008 UTC (16 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +61 -12 lines
put back -p, add sort order for pid, username, command. XXX: should add reverse
sorting order too.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Jul 16 00:36:15 2008 UTC (16 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +639 -223 lines
add build glue and local fixes

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Wed Jul 16 00:20:34 2008 UTC (16 years, 6 months ago) by christos
Branches: LEFEBVRE
CVS tags: TOP3_8BETA1
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
import latest top

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Jul 16 00:20:34 2008 UTC (16 years, 6 months ago) by christos
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>