Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
116 lines
2.9 KiB
C
116 lines
2.9 KiB
C
/*
|
|
* Copyright (C) 2019 MediaTek Inc.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM met_vpusys_events
|
|
#if !defined(_TRACE_MET_VPUSYS_EVENTS_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_MET_VPUSYS_EVENTS_H
|
|
#include <linux/tracepoint.h>
|
|
|
|
#ifndef VPU_MET_PM_MAX
|
|
#define VPU_MET_PM_MAX 8
|
|
#endif
|
|
|
|
#define MX_LEN_STR_DESC (128)
|
|
TRACE_EVENT(__MET_PACKET__,
|
|
TP_PROTO(unsigned long long wclk, char action, int core,
|
|
int sessid, char *str_desc, int val),
|
|
TP_ARGS(wclk, action, core, sessid, str_desc, val),
|
|
TP_STRUCT__entry(
|
|
__field(unsigned long long, wclk)
|
|
__field(int, action)
|
|
__field(int, core)
|
|
__field(int, sessid)
|
|
__array(char, str_desc, MX_LEN_STR_DESC)
|
|
__field(int, val)
|
|
),
|
|
TP_fast_assign(
|
|
__entry->wclk = wclk;
|
|
__entry->action = action;
|
|
__entry->core = core;
|
|
__entry->sessid = sessid;
|
|
if (snprintf(__entry->str_desc,
|
|
MX_LEN_STR_DESC, "%s", str_desc) < 0)
|
|
__entry->str_desc[0] = '\0';
|
|
__entry->val = val;
|
|
),
|
|
TP_printk(
|
|
"WCLK=%llu,ACTION=%c,TASK=VPU.internal.core%d,PID=0,SESS=%d,DESC=%s,VAL=%d,",
|
|
__entry->wclk,
|
|
__entry->action,
|
|
__entry->core,
|
|
__entry->sessid,
|
|
__entry->str_desc,
|
|
__entry->val)
|
|
);
|
|
|
|
TRACE_EVENT(VPU__polling,
|
|
TP_PROTO(int core, int value1, int value2, int value3, int value4),
|
|
TP_ARGS(core, value1, value2, value3, value4),
|
|
TP_STRUCT__entry(
|
|
__field(int, core)
|
|
__field(int, value1)
|
|
__field(int, value2)
|
|
__field(int, value3)
|
|
__field(int, value4)
|
|
),
|
|
TP_fast_assign(
|
|
__entry->core = core;
|
|
__entry->value1 = value1;
|
|
__entry->value2 = value2;
|
|
__entry->value3 = value3;
|
|
__entry->value4 = value4;
|
|
),
|
|
TP_printk(
|
|
"_id=c%d, instruction_cnt=%d, idma_active=%d,uncached_data_stall=%d, icache_miss_stall=%d",
|
|
__entry->core,
|
|
__entry->value1,
|
|
__entry->value2,
|
|
__entry->value3,
|
|
__entry->value4)
|
|
);
|
|
|
|
TRACE_EVENT(VPU__pm,
|
|
TP_PROTO(int core, const u32 *pm),
|
|
TP_ARGS(core, pm),
|
|
TP_STRUCT__entry(
|
|
__field(int, core)
|
|
__array(u32, pm, VPU_MET_PM_MAX)
|
|
),
|
|
TP_fast_assign(
|
|
__entry->core = core;
|
|
memcpy(__entry->pm, pm, sizeof(__entry->pm));
|
|
),
|
|
TP_printk(
|
|
"_id=c%d, 0:%u, 1:%u, 2:%u, 3:%u, 4:%u, 5:%u, 6:%u, 7:%u",
|
|
__entry->core,
|
|
__entry->pm[0],
|
|
__entry->pm[1],
|
|
__entry->pm[2],
|
|
__entry->pm[3],
|
|
__entry->pm[4],
|
|
__entry->pm[5],
|
|
__entry->pm[6],
|
|
__entry->pm[7])
|
|
);
|
|
|
|
#endif /* _TRACE_MET_VPUSYS_EVENTS_H */
|
|
|
|
/* This part must be outside protection */
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH .
|
|
#undef TRACE_INCLUDE_FILE
|
|
#define TRACE_INCLUDE_FILE met_vpusys_events
|
|
#include <trace/define_trace.h>
|
|
|