mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
camera: Switch VI/ISP events to ftrace
* Switch VI frame_begin and frame_end events to produce ftrace traces instead of eventlib events. * Switch ISP task_begin and task_end events to produce ftrace traces instead of eventlib events. * Add class IDs for VI/ISP * Switch VI/ISP task_submit events to ftrace Bug 4080214 Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com> Change-Id: I7776005bb89eaed168c65c62d8aa19c553559fdb Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911804 Reviewed-by: Semi Malinen <smalinen@nvidia.com> Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com> Reviewed-by: Oleg Sikorskiy <osikorskiy@nvidia.com> Reviewed-by: Ajith Kumar <ajithk@nvidia.com> Reviewed-by: Sudhir Vyas <svyas@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
1360c38cf4
commit
f19d5372b4
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2017-2022, NVIDIA CORPORATION, All rights reserved.
|
||||
* Copyright (c) 2017-2023, NVIDIA CORPORATION, All rights reserved.
|
||||
*/
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
@@ -127,6 +127,94 @@ DEFINE_EVENT(frame, tegra_channel_capture_done,
|
||||
TP_PROTO(const char *str, struct timespec64 *ts),
|
||||
TP_ARGS(str, ts)
|
||||
);
|
||||
|
||||
TRACE_EVENT(vi_task_submit,
|
||||
TP_PROTO(u32 class_id, u32 channel_id, u32 syncpt_id,
|
||||
u32 syncpt_thresh, u32 pid, u32 tid),
|
||||
TP_ARGS(class_id, channel_id, syncpt_id, syncpt_thresh, pid, tid),
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, class_id)
|
||||
__field(u32, channel_id)
|
||||
__field(u32, syncpt_id)
|
||||
__field(u32, syncpt_thresh)
|
||||
__field(u32, pid)
|
||||
__field(u32, tid)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->class_id = class_id;
|
||||
__entry->channel_id = channel_id;
|
||||
__entry->syncpt_id = syncpt_id;
|
||||
__entry->syncpt_thresh = syncpt_thresh;
|
||||
__entry->pid = pid;
|
||||
__entry->tid = tid;
|
||||
),
|
||||
TP_printk(
|
||||
"class_id:%u ch:%u syncpt_id:%u syncpt_thresh:%u pid:%u tid:%u",
|
||||
__entry->class_id,
|
||||
__entry->channel_id,
|
||||
__entry->syncpt_id,
|
||||
__entry->syncpt_thresh,
|
||||
__entry->pid,
|
||||
__entry->tid)
|
||||
);
|
||||
|
||||
TRACE_EVENT(isp_task_submit,
|
||||
TP_PROTO(u32 class_id, u32 channel_id, u32 syncpt_id,
|
||||
u32 syncpt_thresh, u32 pid, u32 tid),
|
||||
TP_ARGS(class_id, channel_id, syncpt_id, syncpt_thresh, pid, tid),
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, class_id)
|
||||
__field(u32, channel_id)
|
||||
__field(u32, syncpt_id)
|
||||
__field(u32, syncpt_thresh)
|
||||
__field(u32, pid)
|
||||
__field(u32, tid)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->class_id = class_id;
|
||||
__entry->channel_id = channel_id;
|
||||
__entry->syncpt_id = syncpt_id;
|
||||
__entry->syncpt_thresh = syncpt_thresh;
|
||||
__entry->pid = pid;
|
||||
__entry->tid = tid;
|
||||
),
|
||||
TP_printk(
|
||||
"class_id:%u ch:%u syncpt_id:%u syncpt_thresh:%u pid:%u tid:%u",
|
||||
__entry->class_id,
|
||||
__entry->channel_id,
|
||||
__entry->syncpt_id,
|
||||
__entry->syncpt_thresh,
|
||||
__entry->pid,
|
||||
__entry->tid)
|
||||
);
|
||||
|
||||
TRACE_EVENT(camera_task_log,
|
||||
TP_PROTO(u32 class_id, u32 type,
|
||||
u64 timestamp, u32 pid, u32 tid),
|
||||
TP_ARGS(class_id, type, timestamp, pid, tid),
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, class_id)
|
||||
__field(u32, type)
|
||||
__field(u64, timestamp)
|
||||
__field(u32, pid)
|
||||
__field(u32, tid)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->class_id = class_id;
|
||||
__entry->type = type;
|
||||
__entry->timestamp = timestamp;
|
||||
__entry->pid = pid;
|
||||
__entry->tid = tid;
|
||||
),
|
||||
TP_printk(
|
||||
"class_id:%u type:%u ts:%llu pid:%u tid:%u",
|
||||
__entry->class_id,
|
||||
__entry->type,
|
||||
__entry->timestamp,
|
||||
__entry->pid,
|
||||
__entry->tid)
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
@@ -326,6 +326,64 @@ TRACE_EVENT(rtcpu_vinotify_error,
|
||||
__entry->vi_ts, __entry->data)
|
||||
);
|
||||
|
||||
/*
|
||||
* VI events
|
||||
*/
|
||||
|
||||
TRACE_EVENT(vi_frame_begin,
|
||||
TP_PROTO(u64 tstamp, u32 channel_id, u32 syncpt_id,
|
||||
u32 syncpt_thresh, u32 class_id),
|
||||
TP_ARGS(tstamp, channel_id, syncpt_id, syncpt_thresh, class_id),
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, tstamp)
|
||||
__field(u32, channel_id)
|
||||
__field(u32, syncpt_id)
|
||||
__field(u32, syncpt_thresh)
|
||||
__field(u32, class_id)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->tstamp = tstamp;
|
||||
__entry->channel_id = channel_id;
|
||||
__entry->syncpt_id = syncpt_id;
|
||||
__entry->syncpt_thresh = syncpt_thresh;
|
||||
__entry->class_id = class_id;
|
||||
),
|
||||
TP_printk(
|
||||
"tstamp:%llu cch:%d syncpt_id:%u syncpt_thresh:%u class_id:%u",
|
||||
__entry->tstamp,
|
||||
__entry->channel_id,
|
||||
__entry->syncpt_id,
|
||||
__entry->syncpt_thresh,
|
||||
__entry->class_id)
|
||||
);
|
||||
|
||||
TRACE_EVENT(vi_frame_end,
|
||||
TP_PROTO(u64 tstamp, u32 channel_id, u32 syncpt_id,
|
||||
u32 syncpt_thresh, u32 class_id),
|
||||
TP_ARGS(tstamp, channel_id, syncpt_id, syncpt_thresh, class_id),
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, tstamp)
|
||||
__field(u32, channel_id)
|
||||
__field(u32, syncpt_id)
|
||||
__field(u32, syncpt_thresh)
|
||||
__field(u32, class_id)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->tstamp = tstamp;
|
||||
__entry->channel_id = channel_id;
|
||||
__entry->syncpt_id = syncpt_id;
|
||||
__entry->syncpt_thresh = syncpt_thresh;
|
||||
__entry->class_id = class_id;
|
||||
),
|
||||
TP_printk(
|
||||
"tstamp:%llu cch:%d syncpt_id:%u syncpt_thresh:%u class_id:%u",
|
||||
__entry->tstamp,
|
||||
__entry->channel_id,
|
||||
__entry->syncpt_id,
|
||||
__entry->syncpt_thresh,
|
||||
__entry->class_id)
|
||||
);
|
||||
|
||||
/*
|
||||
* NVCSI events
|
||||
*/
|
||||
@@ -504,6 +562,60 @@ TRACE_EVENT(rtcpu_isp_falcon_tile_end,
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(isp_task_begin,
|
||||
TP_PROTO(u64 tstamp, u32 channel_id, u32 syncpt_id,
|
||||
u32 syncpt_thresh, u32 class_id),
|
||||
TP_ARGS(tstamp, channel_id, syncpt_id, syncpt_thresh, class_id),
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, tstamp)
|
||||
__field(u32, channel_id)
|
||||
__field(u32, syncpt_id)
|
||||
__field(u32, syncpt_thresh)
|
||||
__field(u32, class_id)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->tstamp = tstamp;
|
||||
__entry->channel_id = channel_id;
|
||||
__entry->syncpt_id = syncpt_id;
|
||||
__entry->syncpt_thresh = syncpt_thresh;
|
||||
__entry->class_id = class_id;
|
||||
),
|
||||
TP_printk(
|
||||
"tstamp:%llu cch:%d syncpt_id:%u syncpt_thresh:%u class_id:%u",
|
||||
__entry->tstamp,
|
||||
__entry->channel_id,
|
||||
__entry->syncpt_id,
|
||||
__entry->syncpt_thresh,
|
||||
__entry->class_id)
|
||||
);
|
||||
|
||||
TRACE_EVENT(isp_task_end,
|
||||
TP_PROTO(u64 tstamp, u32 channel_id, u32 syncpt_id,
|
||||
u32 syncpt_thresh, u32 class_id),
|
||||
TP_ARGS(tstamp, channel_id, syncpt_id, syncpt_thresh, class_id),
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, tstamp)
|
||||
__field(u32, channel_id)
|
||||
__field(u32, syncpt_id)
|
||||
__field(u32, syncpt_thresh)
|
||||
__field(u32, class_id)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->tstamp = tstamp;
|
||||
__entry->channel_id = channel_id;
|
||||
__entry->syncpt_id = syncpt_id;
|
||||
__entry->syncpt_thresh = syncpt_thresh;
|
||||
__entry->class_id = class_id;
|
||||
),
|
||||
TP_printk(
|
||||
"tstamp:%llu cch:%d syncpt_id:%u syncpt_thresh:%u class_id:%u",
|
||||
__entry->tstamp,
|
||||
__entry->channel_id,
|
||||
__entry->syncpt_id,
|
||||
__entry->syncpt_thresh,
|
||||
__entry->class_id)
|
||||
);
|
||||
|
||||
|
||||
#endif /* _TRACE_TEGRA_RTCPU_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user