powerpc/mm: Trace tlbia instruction
authorChristophe Leroy <christophe.leroy@c-s.fr>
Wed, 21 Mar 2018 14:17:00 +0000 (15:17 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 20 Oct 2018 02:26:47 +0000 (13:26 +1100)
Add a trace point for tlbia (Translation Lookaside Buffer Invalidate
All) instruction.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/trace.h
arch/powerpc/mm/mmu_decl.h

index d018e86026944bc2087c672f2a3b48bd1bb14b6f..58ef8c43a89d86dc46c4d7142925f73fa811e73d 100644 (file)
@@ -201,6 +201,21 @@ TRACE_EVENT(tlbie,
                __entry->r)
 );
 
+TRACE_EVENT(tlbia,
+
+       TP_PROTO(unsigned long id),
+       TP_ARGS(id),
+       TP_STRUCT__entry(
+               __field(unsigned long, id)
+               ),
+
+       TP_fast_assign(
+               __entry->id = id;
+               ),
+
+       TP_printk("ctx.id=0x%lx", __entry->id)
+);
+
 #endif /* _TRACE_POWERPC_H */
 
 #undef TRACE_INCLUDE_PATH
index 1db2027a01103e9827bd1c258cee8a9c3d261701..8574fbbc45e0b690e50fc3c0b04b0b83d5b4323b 100644 (file)
 static inline void _tlbil_all(void)
 {
        asm volatile ("sync; tlbia; isync" : : : "memory");
+       trace_tlbia(MMU_NO_CONTEXT);
 }
 static inline void _tlbil_pid(unsigned int pid)
 {
        asm volatile ("sync; tlbia; isync" : : : "memory");
+       trace_tlbia(pid);
 }
 #define _tlbil_pid_noind(pid)  _tlbil_pid(pid)