mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

The following trace events are not used and defining them just wastes memory: x86_fpu_before_restore x86_fpu_after_restore x86_fpu_init_state Simply remove them. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Linux Trace Kernel <linux-trace-kernel@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home # background Link: https://lore.kernel.org/r/20250529131024.7c2ef96f@gandalf.local.home # x86 submission
79 lines
1.7 KiB
C
79 lines
1.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM x86_fpu
|
|
|
|
#if !defined(_TRACE_FPU_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_FPU_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
DECLARE_EVENT_CLASS(x86_fpu,
|
|
TP_PROTO(struct fpu *fpu),
|
|
TP_ARGS(fpu),
|
|
|
|
TP_STRUCT__entry(
|
|
__field(struct fpu *, fpu)
|
|
__field(bool, load_fpu)
|
|
__field(u64, xfeatures)
|
|
__field(u64, xcomp_bv)
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->fpu = fpu;
|
|
__entry->load_fpu = test_thread_flag(TIF_NEED_FPU_LOAD);
|
|
if (boot_cpu_has(X86_FEATURE_OSXSAVE)) {
|
|
__entry->xfeatures = fpu->fpstate->regs.xsave.header.xfeatures;
|
|
__entry->xcomp_bv = fpu->fpstate->regs.xsave.header.xcomp_bv;
|
|
}
|
|
),
|
|
TP_printk("x86/fpu: %p load: %d xfeatures: %llx xcomp_bv: %llx",
|
|
__entry->fpu,
|
|
__entry->load_fpu,
|
|
__entry->xfeatures,
|
|
__entry->xcomp_bv
|
|
)
|
|
);
|
|
|
|
DEFINE_EVENT(x86_fpu, x86_fpu_before_save,
|
|
TP_PROTO(struct fpu *fpu),
|
|
TP_ARGS(fpu)
|
|
);
|
|
|
|
DEFINE_EVENT(x86_fpu, x86_fpu_after_save,
|
|
TP_PROTO(struct fpu *fpu),
|
|
TP_ARGS(fpu)
|
|
);
|
|
|
|
DEFINE_EVENT(x86_fpu, x86_fpu_regs_activated,
|
|
TP_PROTO(struct fpu *fpu),
|
|
TP_ARGS(fpu)
|
|
);
|
|
|
|
DEFINE_EVENT(x86_fpu, x86_fpu_regs_deactivated,
|
|
TP_PROTO(struct fpu *fpu),
|
|
TP_ARGS(fpu)
|
|
);
|
|
|
|
DEFINE_EVENT(x86_fpu, x86_fpu_dropped,
|
|
TP_PROTO(struct fpu *fpu),
|
|
TP_ARGS(fpu)
|
|
);
|
|
|
|
DEFINE_EVENT(x86_fpu, x86_fpu_copy_dst,
|
|
TP_PROTO(struct fpu *fpu),
|
|
TP_ARGS(fpu)
|
|
);
|
|
|
|
DEFINE_EVENT(x86_fpu, x86_fpu_xstate_check_failed,
|
|
TP_PROTO(struct fpu *fpu),
|
|
TP_ARGS(fpu)
|
|
);
|
|
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH asm/trace/
|
|
#undef TRACE_INCLUDE_FILE
|
|
#define TRACE_INCLUDE_FILE fpu
|
|
#endif /* _TRACE_FPU_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|