diff options
author | attilio <attilio@FreeBSD.org> | 2011-07-18 15:19:40 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-07-18 15:19:40 +0000 |
commit | 9a6ff5ad378cfaaa99c5162e2b0f6e4cb6a3c796 (patch) | |
tree | 3d2deee4220ced3fd75b40dbd48afd2ed84428f6 /usr.bin | |
parent | 838b39dd924348287b3ed188b8a6b642390c9429 (diff) | |
download | FreeBSD-src-9a6ff5ad378cfaaa99c5162e2b0f6e4cb6a3c796.zip FreeBSD-src-9a6ff5ad378cfaaa99c5162e2b0f6e4cb6a3c796.tar.gz |
- Remove the eintrcnt/eintrnames usage and introduce the concept of
sintrcnt/sintrnames which are symbols containing the size of the 2
tables.
- For amd64/i386 remove the storage of intr* stuff from assembly files.
This area can be widely improved by applying the same to other
architectures and likely finding an unified approach among them and
move the whole code to be MI. More work in this area is expected to
happen fairly soon.
No MFC is previewed for this patch.
Tested by: pluknet
Reviewed by: jhb
Approved by: re (kib)
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/vmstat/vmstat.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index d31fdb5..39e71fa 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -90,12 +90,12 @@ static struct nlist namelist[] = { { "_nchstats" }, #define X_INTRNAMES 5 { "_intrnames" }, -#define X_EINTRNAMES 6 - { "_eintrnames" }, +#define X_SINTRNAMES 6 + { "_sintrnames" }, #define X_INTRCNT 7 { "_intrcnt" }, -#define X_EINTRCNT 8 - { "_eintrcnt" }, +#define X_SINTRCNT 8 + { "_sintrcnt" }, #define X_KMEMSTATS 9 { "_kmemstatistics" }, #define X_KMEMZONES 10 @@ -1153,10 +1153,8 @@ dointr(void) uptime = getuptime(); if (kd != NULL) { - intrcntlen = namelist[X_EINTRCNT].n_value - - namelist[X_INTRCNT].n_value; - inamlen = namelist[X_EINTRNAMES].n_value - - namelist[X_INTRNAMES].n_value; + intrcntlen = namelist[X_SINTRCNT].n_value; + inamlen = namelist[X_SINTRNAMES].n_value; if ((intrcnt = malloc(intrcntlen)) == NULL || (intrname = malloc(inamlen)) == NULL) err(1, "malloc()"); |