mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
The pva files are having the SPDX license forma. Hence, it is not required to have the license paragraphs. Remove the non-required license paragraphs details. Bug 4038415 Change-Id: I4d039b7d8d9ef6eea5ba53ead8c5d1e3bda223b9 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903864 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
236 lines
4.9 KiB
C
236 lines
4.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2017-2023, NVIDIA Corporation. All rights reserved.
|
|
*
|
|
* Nvhost event logging to ftrace.
|
|
*/
|
|
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM nvhost_pva
|
|
|
|
#if !defined(_TRACE_NVHOST_PVA_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_NVHOST_PVA_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
|
TRACE_EVENT(nvhost_pva_write,
|
|
|
|
TP_PROTO(
|
|
u64 delta_time,
|
|
const char *name,
|
|
u8 major,
|
|
u8 minor,
|
|
u8 flags,
|
|
u8 sequence,
|
|
u32 arg1,
|
|
u32 arg2
|
|
),
|
|
|
|
TP_ARGS(
|
|
delta_time,
|
|
name,
|
|
major,
|
|
minor,
|
|
flags,
|
|
sequence,
|
|
arg1,
|
|
arg2
|
|
),
|
|
|
|
TP_STRUCT__entry(
|
|
__field(u64, delta_time)
|
|
__field(const char *, name)
|
|
__field(u8, major)
|
|
__field(u8, minor)
|
|
__field(u8, flags)
|
|
__field(u8, sequence)
|
|
__field(u32, arg1)
|
|
__field(u32, arg2)
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->delta_time = delta_time;
|
|
__entry->name = name;
|
|
__entry->major = major;
|
|
__entry->minor = minor;
|
|
__entry->flags = flags;
|
|
__entry->sequence = sequence;
|
|
__entry->arg1 = arg1;
|
|
__entry->arg2 = arg2;
|
|
),
|
|
|
|
TP_printk("time: %llu\t %s\t major: 0x%x\tminor: 0x%x\tflags: 0x%x\t"
|
|
"sequence: 0x%x\targ1: %u\targ2: %u",
|
|
__entry->delta_time, __entry->name, __entry->major,
|
|
__entry->minor, __entry->flags, __entry->sequence,
|
|
__entry->arg1, __entry->arg2)
|
|
);
|
|
|
|
TRACE_EVENT(nvhost_pva_task_stats,
|
|
|
|
TP_PROTO(
|
|
const char *name,
|
|
u64 queued_time,
|
|
u64 head_time,
|
|
u64 input_actions_complete,
|
|
u64 vpu_assigned_time,
|
|
u64 vpu_start_time,
|
|
u64 vpu_complete_time,
|
|
u64 complete_time,
|
|
u8 vpu_assigned,
|
|
u64 r5_overhead
|
|
),
|
|
|
|
TP_ARGS(
|
|
name,
|
|
queued_time,
|
|
head_time,
|
|
input_actions_complete,
|
|
vpu_assigned_time,
|
|
vpu_start_time,
|
|
vpu_complete_time,
|
|
complete_time,
|
|
vpu_assigned,
|
|
r5_overhead
|
|
),
|
|
|
|
TP_STRUCT__entry(
|
|
__field(const char *, name)
|
|
__field(u64, queued_time)
|
|
__field(u64, head_time)
|
|
__field(u64, input_actions_complete)
|
|
__field(u64, vpu_assigned_time)
|
|
__field(u64, vpu_start_time)
|
|
__field(u64, vpu_complete_time)
|
|
__field(u64, complete_time)
|
|
__field(u8, vpu_assigned)
|
|
__field(u64, r5_overhead)
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->name = name;
|
|
__entry->queued_time = queued_time;
|
|
__entry->head_time = head_time;
|
|
__entry->input_actions_complete = input_actions_complete;
|
|
__entry->vpu_assigned_time = vpu_assigned_time;
|
|
__entry->vpu_start_time = vpu_start_time;
|
|
__entry->vpu_complete_time = vpu_complete_time;
|
|
__entry->complete_time = complete_time;
|
|
__entry->vpu_assigned = vpu_assigned;
|
|
__entry->r5_overhead = r5_overhead;
|
|
),
|
|
|
|
TP_printk("%s\tqueued_time: %llu\thead_time: %llu\t"
|
|
"input_actions_complete: %llu\tvpu_assigned_time: %llu\t"
|
|
"vpu_start_time: %llu\tvpu_complete_time: %llu\t"
|
|
"complete_time: %llu\tvpu_assigned: %d\t"
|
|
"r5_overhead: %llu us",
|
|
__entry->name, __entry->queued_time, __entry->head_time,
|
|
__entry->input_actions_complete, __entry->vpu_assigned_time,
|
|
__entry->vpu_start_time, __entry->vpu_complete_time,
|
|
__entry->complete_time, __entry->vpu_assigned,
|
|
__entry->r5_overhead)
|
|
);
|
|
|
|
TRACE_EVENT(nvhost_pva_task_vpu_perf,
|
|
|
|
TP_PROTO(
|
|
const char *name,
|
|
u32 index,
|
|
u32 count,
|
|
u32 sum,
|
|
u64 sum_squared,
|
|
u32 min,
|
|
u32 max
|
|
),
|
|
|
|
TP_ARGS(
|
|
name,
|
|
index,
|
|
count,
|
|
sum,
|
|
sum_squared,
|
|
min,
|
|
max
|
|
),
|
|
|
|
TP_STRUCT__entry(
|
|
__field(const char *, name)
|
|
__field(u32, index)
|
|
__field(u32, count)
|
|
__field(u32, sum)
|
|
__field(u64, sum_squared)
|
|
__field(u32, min)
|
|
__field(u32, max)
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->name = name;
|
|
__entry->index = index;
|
|
__entry->count = count;
|
|
__entry->sum = sum;
|
|
__entry->sum_squared = sum_squared;
|
|
__entry->min = min;
|
|
__entry->max = max;
|
|
),
|
|
|
|
TP_printk("%s\tindex: %u\tcount: %u\taverage: %u\t"
|
|
"variance: %llu\tminimum: %u\t"
|
|
"maximum: %u",
|
|
__entry->name, __entry->index, __entry->count,
|
|
__entry->sum / __entry->count,
|
|
((u64)__entry->count * __entry->sum_squared -
|
|
(u64)__entry->sum * (u64)__entry->sum)
|
|
/ __entry->count / __entry->count,
|
|
__entry->min, __entry->max)
|
|
);
|
|
|
|
TRACE_EVENT(nvhost_pva_task_timestamp,
|
|
|
|
TP_PROTO(
|
|
const char *name,
|
|
u32 class,
|
|
u32 syncpoint_id,
|
|
u32 syncpoint_thresh,
|
|
u64 start_time,
|
|
u64 end_time
|
|
),
|
|
|
|
TP_ARGS(
|
|
name,
|
|
class,
|
|
syncpoint_id,
|
|
syncpoint_thresh,
|
|
start_time,
|
|
end_time
|
|
),
|
|
|
|
TP_STRUCT__entry(
|
|
__field(const char *, name)
|
|
__field(u32, class)
|
|
__field(u32, syncpoint_id)
|
|
__field(u32, syncpoint_thresh)
|
|
__field(u64, start_time)
|
|
__field(u64, end_time)
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->name = name;
|
|
__entry->class = class;
|
|
__entry->syncpoint_id = syncpoint_id;
|
|
__entry->syncpoint_thresh = syncpoint_thresh;
|
|
__entry->start_time = start_time;
|
|
__entry->end_time = end_time;
|
|
),
|
|
|
|
TP_printk("name=%s, class=0x%02x, syncpoint_id=%u, syncpoint_thresh=%u, start_time=%llu, end_time=%llu",
|
|
__entry->name, __entry->class, __entry->syncpoint_id, __entry->syncpoint_thresh,
|
|
__entry->start_time, __entry->end_time)
|
|
);
|
|
|
|
#endif /* _TRACE_NVHOST_PVA_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|