Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 2019 00:59:47 +0000 (UTC)
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348887 - head/usr.bin/procstat
Message-ID:  <201906110059.x5B0xlvA089441@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mhorne
Date: Tue Jun 11 00:59:46 2019
New Revision: 348887
URL: https://svnweb.freebsd.org/changeset/base/348887

Log:
  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

Modified:
  head/usr.bin/procstat/procstat_auxv.c

Modified: head/usr.bin/procstat/procstat_auxv.c
==============================================================================
--- head/usr.bin/procstat/procstat_auxv.c	Tue Jun 11 00:55:54 2019	(r348886)
+++ head/usr.bin/procstat/procstat_auxv.c	Tue Jun 11 00:59:46 2019	(r348887)
@@ -185,6 +185,18 @@ procstat_auxv(struct procstat *procstat, struct kinfo_
 			    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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906110059.x5B0xlvA089441>