summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-08-21 16:05:32 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-10-14 14:32:06 +0200
commitb5a6b71b1901b9ca495f669c9ad86f2181960aba (patch)
tree26279ca6f071672d96ac6713c7ce4997d84482de /arch/s390/include/asm
parent1ec2772e0c3ca3159035c03165355e355efc326b (diff)
downloadblackbird-op-linux-b5a6b71b1901b9ca495f669c9ad86f2181960aba.tar.gz
blackbird-op-linux-b5a6b71b1901b9ca495f669c9ad86f2181960aba.zip
s390/diag: add tracepoint for diagnose calls
To be able to analyse problems in regard to hypervisor overhead add a tracepoing for diagnose calls. It reports the number of the diagnose issued, e.g. sshd-1385 [002] .... 42.701431: diagnose: nr=0x9c <idle>-0 [001] ..s. 43.587528: diagnose: nr=0x9c Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r--arch/s390/include/asm/diag.h12
-rw-r--r--arch/s390/include/asm/trace/diag.h43
2 files changed, 45 insertions, 10 deletions
diff --git a/arch/s390/include/asm/diag.h b/arch/s390/include/asm/diag.h
index e423cfcaf77d..5fac921c1c42 100644
--- a/arch/s390/include/asm/diag.h
+++ b/arch/s390/include/asm/diag.h
@@ -33,16 +33,8 @@ enum diag_stat_enum {
NR_DIAG_STAT
};
-struct diag_stat {
- unsigned int counter[NR_DIAG_STAT];
-};
-
-DECLARE_PER_CPU(struct diag_stat, diag_stat);
-
-static inline void diag_stat_inc(enum diag_stat_enum nr)
-{
- this_cpu_inc(diag_stat.counter[nr]);
-}
+void diag_stat_inc(enum diag_stat_enum nr);
+void diag_stat_inc_norecursion(enum diag_stat_enum nr);
/*
* Diagnose 10: Release page range
diff --git a/arch/s390/include/asm/trace/diag.h b/arch/s390/include/asm/trace/diag.h
new file mode 100644
index 000000000000..776f307960cc
--- /dev/null
+++ b/arch/s390/include/asm/trace/diag.h
@@ -0,0 +1,43 @@
+/*
+ * Tracepoint header for s390 diagnose calls
+ *
+ * Copyright IBM Corp. 2015
+ * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM s390
+
+#if !defined(_TRACE_S390_DIAG_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_S390_DIAG_H
+
+#include <linux/tracepoint.h>
+
+#undef TRACE_INCLUDE_PATH
+#undef TRACE_INCLUDE_FILE
+
+#define TRACE_INCLUDE_PATH asm/trace
+#define TRACE_INCLUDE_FILE diag
+
+TRACE_EVENT(diagnose,
+ TP_PROTO(unsigned short nr),
+ TP_ARGS(nr),
+ TP_STRUCT__entry(
+ __field(unsigned short, nr)
+ ),
+ TP_fast_assign(
+ __entry->nr = nr;
+ ),
+ TP_printk("nr=0x%x", __entry->nr)
+);
+
+#ifdef CONFIG_TRACEPOINTS
+void trace_diagnose_norecursion(int diag_nr);
+#else
+static inline void trace_diagnose_norecursion(int diag_nr) { }
+#endif
+
+#endif /* _TRACE_S390_DIAG_H */
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>
OpenPOWER on IntegriCloud