Thread (24 messages) 24 messages, 6 authors, 2016-08-10

Re: [RFC][PATCH 5/3] tracing: Add smi counting to HWLAT

From: Peter Zijlstra <peterz@infradead.org>
Date: 2016-08-09 21:26:11
Also in: lkml

On Tue, Aug 09, 2016 at 02:05:43PM -0400, Steven Rostedt wrote:
+int arch_smi_count(void)
+{
+	unsigned long long count;
+	int err;
+
+	err = rdmsrl_safe(MSR_SMI_COUNT, &count);
+	if (err)
+		return 0;
That's really yucky, relying on _safe() to detect availability.

Also, I just found AMD Fam15h has this counter through PMCs (event
0x2b).
+
+	return count;
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help