diff options
author | Mitchell Horne <mhorne@FreeBSD.org> | 2019-06-11 00:59:46 +0000 |
---|---|---|
committer | Mitchell Horne <mhorne@FreeBSD.org> | 2019-06-11 00:59:46 +0000 |
commit | 8a250c7568b924a6404a6c5f0b6e56690521e69d (patch) | |
tree | 8b8c3d90d255b20a0f8c56615a3ac1020bcf7295 /usr.bin/procstat | |
parent | ffedb98b3e06af48ee6d87051ce28ab995ac7cc1 (diff) | |
download | src-8a250c7568b924a6404a6c5f0b6e56690521e69d.tar.gz src-8a250c7568b924a6404a6c5f0b6e56690521e69d.zip |
procstat: Recognize HWCAP and HWCAP2 with auxv command
The two most recent additions to the elf auxiliary vector are
HWCAP and HWCAP2 which describe platform specific cpu capabilities.
Make procstat recognize these fields so that they aren't displayed
as UNKNOWN.
Reviewed by: trociny, markj
Approved by: markj (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D20582
Notes
Notes:
svn path=/head/; revision=348887
Diffstat (limited to 'usr.bin/procstat')
-rw-r--r-- | usr.bin/procstat/procstat_auxv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.bin/procstat/procstat_auxv.c b/usr.bin/procstat/procstat_auxv.c index ceee8220760c..785896d0c6ad 100644 --- a/usr.bin/procstat/procstat_auxv.c +++ b/usr.bin/procstat/procstat_auxv.c @@ -185,6 +185,18 @@ procstat_auxv(struct procstat *procstat, struct kinfo_proc *kipp) prefix, "AT_EHDRFLAGS", (u_long)auxv[i].a_un.a_val); break; #endif +#ifdef AT_HWCAP + case AT_HWCAP: + xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_HWCAP/%#lx}\n", + prefix, "AT_HWCAP", (u_long)auxv[i].a_un.a_val); + break; +#endif +#ifdef AT_HWCAP2 + case AT_HWCAP2: + xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_HWCAP2/%#lx}\n", + prefix, "AT_HWCAP2", (u_long)auxv[i].a_un.a_val); + break; +#endif default: xo_emit("{dw:/%s}{Lw:/%16ld/%ld}{:UNKNOWN/%#lx}\n", prefix, auxv[i].a_type, auxv[i].a_un.a_val); |