| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Add missing shared library interdependencies.
Approved by: re (mux)
Notes:
svn path=/stable/6/; revision=155985
|
| |
|
|
|
|
|
|
|
| |
Update copyright for 2006.
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=155650
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The uma_zone data structure defines the size of its uz_cpu[] array as 1,
but then sizes the containing data structure at run-time to make room
for per-cpu cache data. Modify libmemstat to separately allocate a
buffer to hold per-cpu cache data, sized based on the run-time mp_maxid
variable when using libkvm to access UMA data. This avoids reading
invalid cache data from beyond the end of the uma_zone data structure
on the stack, which can result in invalid statistics and/or reads from
invalid kernel addresses.
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=155648
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When reporting an error reading from UMA per-cpu cache pointers using KVM,
return a KVM error rather than an out of memory error, so that the caller
reports the KVM error state. This replaces a misleading error message
with a more accurate although equally confusing one.
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=155647
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Read all_cpus variable out of kmem, and validate CPUs against the all_cpus
cpu mask before looking at the cache entries for the CPU. For systems
with sparse CPU id arrays, this skips otherwise uninitialized cache
structures.
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=155646
|
| |
|
|
|
|
|
|
|
|
| |
Correct a typo in the extraction of zone information from UMA using kmem:
bytes = allocated - freed, not bytes = allocated = freed.
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=155644
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Remove unnecessary and undesirable 'static' from function-local keg
list, which could cause problems for multi-threaded applications
using libmemstat to monitor UMA in more than one thread
simultaneously.
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=155632
|
| |
|
|
| |
Notes:
svn path=/stable/6/; revision=152659
|
| |
|
|
|
|
|
| |
Add symlinks for kvm access methods for memstat(3).
Notes:
svn path=/stable/6/; revision=152494
|
| |
|
|
|
|
|
|
| |
Document kvm(3)-related error constants, and correct minor formatting
nits.
Notes:
svn path=/stable/6/; revision=152232
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memstat_malloc:1.6 from HEAD to RELENG_6:
Teach libmemstat(3) how to extract malloc(9) statistics using kvm(3),
so that libmemstat can be used to view full memory statistics from
kernel core dumps and /dev/mem. This is provided via a new query
function, memstat_kvm_malloc(), which is also automatically invoked
by memstat_kvm_all(). A kvm handle must be passed in.
This will allow malloc(9)-specific code to be removed from vmstat(8).
Notes:
svn path=/stable/6/; revision=152231
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memstat_uma.c:1.10 from HEAD to RELENG_6:
Add memstat_kvm_uma(), an implementation of a libmemstat(3) query routine
that knows how to extract UMA(9) allocator statistics from a core dump or
live memory image using kvm(3). The caller is expected to provide the
necessary kvm_t handle, which is then used by libmemstat(3).
With these changes, it is trivially straight forward to re-introduce
vmstat -z support on core dumps, which was lost when UMA was introduced.
In the short term, this requires including vm/ include files that are not
intended for extra-kernel use, requiring in turn some ugliness.
Merge memstat_uma.c:1.11 from HEAD to RELENG_6:
Define LIBMEMSTAT so that vm_page.h won't perform a nested include of
opt_vmpage.h.
Remove definition of _KERNEL, it is no longer required in order to
include uma_int.h, as the sensitive parts of uma_int.h (a number of
inlines depending on kernel-only constants) are now protected by
_KERNEL.
The use of LIBMEMSTAT here will be cleaned up in the future.
Notes:
svn path=/stable/6/; revision=152230
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "Mbuf" zone was renamed "mbuf" to improve consistency, but the code
example in libmemstat.3 was not updated to take this rename into account.
Update the example.
PR: 84946
Submitted by: Wojciech A. Koszek <dunstan at freebsd dot czest dot pl>
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=149342
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memstat_uma.c:1.9 from HEAD to RELENG_6:
Correct two libmemstat(3) bugs:
- Move memory_type_list flushing logic from memstat_mtl_free() to
_memstat_mtl_empty(), a libmemstat-internal function that can
be called from other parts of the library. Invoke
_memstat_mtl_empty() from memstat_mtl_free(), which also frees
the containing list structure.
Invoke _memstat_mtl_empty() instead of memstat_mtl_free() in
various error cases in memstat_malloc.c and memstat_uma.c, which
previously resulted in the list being freed prematurely.
- Reverse the order of updating the mt_kegfree and mt_free fields
of the memory_type in memstat_uma.c, otherwise keg free items
won't be counted properly for non-secondary zones.
Merged to RELENG_6 earlier than the proposed MFC after date so that it
can make BETA2.
Approved by: re (kensmith)
Notes:
svn path=/stable/6/; revision=148622
|
| |
|
|
|
|
|
|
|
|
|
| |
If a retrieved UMA zone is a secondary zone, don't report keg free
items, as they actually belong to the primary zone, and maye otherwise
be reported more than once.
Approved by: re (kensmith)
Notes:
svn path=/stable/6/; revision=148477
|
| |
|
|
| |
Notes:
svn path=/stable/6/; revision=148360
|
|
|
Notes:
svn path=/stable/6/; revision=148212
|