1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2020-2024 Intel Corporation
6 #if !defined(__IVPU_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
7 #define __IVPU_TRACE_H__
9 #include <linux/tracepoint.h>
12 #include "vpu_jsm_api.h"
13 #include "ivpu_jsm_msg.h"
17 #define TRACE_SYSTEM vpu
18 #define TRACE_INCLUDE_FILE ivpu_trace
21 TP_PROTO(const char *event
),
23 TP_STRUCT__entry(__field(const char *, event
)),
24 TP_fast_assign(__entry
->event
= event
;),
25 TP_printk("%s", __entry
->event
)
29 TP_PROTO(const char *event
, struct ivpu_job
*job
),
31 TP_STRUCT__entry(__field(const char *, event
)
33 __field(u32
, engine_id
)
36 TP_fast_assign(__entry
->event
= event
;
37 __entry
->ctx_id
= job
->file_priv
->ctx
.id
;
38 __entry
->engine_id
= job
->engine_idx
;
39 __entry
->job_id
= job
->job_id
;),
40 TP_printk("%s context:%d engine:%d job:%d",
48 TP_PROTO(const char *event
, struct vpu_jsm_msg
*msg
),
50 TP_STRUCT__entry(__field(const char *, event
)
51 __field(const char *, type
)
52 __field(enum vpu_ipc_msg_status
, status
)
53 __field(u32
, request_id
)
56 TP_fast_assign(__entry
->event
= event
;
57 __entry
->type
= ivpu_jsm_msg_type_to_str(msg
->type
);
58 __entry
->status
= msg
->status
;
59 __entry
->request_id
= msg
->request_id
;
60 __entry
->result
= msg
->result
;),
61 TP_printk("%s type:%s, status:%#x, id:%#x, result:%#x",
69 #endif /* __IVPU_TRACE_H__ */
71 #undef TRACE_INCLUDE_PATH
72 #define TRACE_INCLUDE_PATH .
73 #include <trace/define_trace.h>