Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac6fe6e4 authored by David Dai's avatar David Dai Committed by Gerrit - the friendly Code Review server
Browse files

msm: msm_bus: Add msm bus trace header snapshot



This is a snapshot of the msm bus trace header as of msm-4.9
commit 27c11b91dba00c9 ('spcom: ignore CONNECTED notification
while closing the channel').

Change-Id: Idb036bbb7db6a7ecece83bc1789b96953e027d0e
Signed-off-by: default avatarDavid Dai <daidavid1@codeaurora.org>
parent 50b9a890
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only 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.
 */

#ifndef __MSM_BUS_RULE_OPS_H
#define __MSM_BUS_RULE_OPS_H

#define FLD_IB	0
#define FLD_AB	1
#define FLD_CLK	2

#define OP_LE	0
#define OP_LT	1
#define OP_GE	2
#define OP_GT	3
#define OP_NOOP	4

#define RULE_STATE_NOT_APPLIED	0
#define RULE_STATE_APPLIED	1

#define THROTTLE_ON	0
#define THROTTLE_OFF	1
#define THROTTLE_REG	2


#endif
+237 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only 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 msm_bus

#if !defined(_TRACE_MSM_BUS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_MSM_BUS_H

#include <linux/tracepoint.h>

TRACE_EVENT(bus_update_request,

	TP_PROTO(int sec, int nsec, const char *name, int src, int dest,
		unsigned long long ab, unsigned long long ib),

	TP_ARGS(sec, nsec, name, src, dest, ab, ib),

	TP_STRUCT__entry(
		__field(int, sec)
		__field(int, nsec)
		__string(name, name)
		__field(int, src)
		__field(int, dest)
		__field(u64, ab)
		__field(u64, ib)
	),

	TP_fast_assign(
		__entry->sec = sec;
		__entry->nsec = nsec;
		__assign_str(name, name);
		__entry->src = src;
		__entry->dest = dest;
		__entry->ab = ab;
		__entry->ib = ib;
	),

	TP_printk("time= %u.%09u name=%s src=%d dest=%d ab=%llu ib=%llu",
		__entry->sec,
		__entry->nsec,
		__get_str(name),
		__entry->src,
		__entry->dest,
		(unsigned long long)__entry->ab,
		(unsigned long long)__entry->ib)
);

TRACE_EVENT(bus_update_request_end,

	TP_PROTO(const char *name),

	TP_ARGS(name),

	TP_STRUCT__entry(
		__string(name, name)
	),

	TP_fast_assign(
		__assign_str(name, name);
	),

	TP_printk("client-name=%s", __get_str(name))
);

TRACE_EVENT(bus_bimc_config_limiter,

	TP_PROTO(int mas_id, unsigned long long cur_lim_bw),

	TP_ARGS(mas_id, cur_lim_bw),

	TP_STRUCT__entry(
		__field(int, mas_id)
		__field(u64, cur_lim_bw)
	),

	TP_fast_assign(
		__entry->mas_id = mas_id;
		__entry->cur_lim_bw = cur_lim_bw;
	),

	TP_printk("Master=%d cur_lim_bw=%llu",
		__entry->mas_id,
		(unsigned long long)__entry->cur_lim_bw)
);

TRACE_EVENT(bus_avail_bw,

	TP_PROTO(unsigned long long cur_bimc_bw, unsigned long long cur_mdp_bw),

	TP_ARGS(cur_bimc_bw, cur_mdp_bw),

	TP_STRUCT__entry(
		__field(u64, cur_bimc_bw)
		__field(u64, cur_mdp_bw)
	),

	TP_fast_assign(
		__entry->cur_bimc_bw = cur_bimc_bw;
		__entry->cur_mdp_bw = cur_mdp_bw;
	),

	TP_printk("cur_bimc_bw = %llu cur_mdp_bw = %llu",
		(unsigned long long)__entry->cur_bimc_bw,
		(unsigned long long)__entry->cur_mdp_bw)
);

TRACE_EVENT(bus_rules_matches,

	TP_PROTO(int node_id, int rule_id, unsigned long long node_ab,
		unsigned long long node_ib, unsigned long long node_clk),

	TP_ARGS(node_id, rule_id, node_ab, node_ib, node_clk),

	TP_STRUCT__entry(
		__field(int, node_id)
		__field(int, rule_id)
		__field(u64, node_ab)
		__field(u64, node_ib)
		__field(u64, node_clk)
	),

	TP_fast_assign(
		__entry->node_id = node_id;
		__entry->rule_id = rule_id;
		__entry->node_ab = node_ab;
		__entry->node_ib = node_ib;
		__entry->node_clk = node_clk;
	),

	TP_printk("Rule match node%d rule%d node-ab%llu:ib%llu:clk%llu",
		__entry->node_id, __entry->rule_id,
		(unsigned long long)__entry->node_ab,
		(unsigned long long)__entry->node_ib,
		(unsigned long long)__entry->node_clk)
);

TRACE_EVENT(bus_bke_params,

	TP_PROTO(u32 gc, u32 gp, u32 thl, u32 thm, u32 thh),

	TP_ARGS(gc, gp, thl, thm, thh),

	TP_STRUCT__entry(
		__field(u32, gc)
		__field(u32, gp)
		__field(u32, thl)
		__field(u32, thm)
		__field(u32, thh)
	),

	TP_fast_assign(
		__entry->gc = gc;
		__entry->gp = gp;
		__entry->thl = thl;
		__entry->thm = thm;
		__entry->thh = thh;
	),

	TP_printk("BKE Params GC=0x%x GP=0x%x THL=0x%x THM=0x%x THH=0x%x",
		__entry->gc, __entry->gp, __entry->thl, __entry->thm,
			__entry->thh)
);

TRACE_EVENT(bus_client_status,

	TP_PROTO(const char *name, int src, int dest,
		unsigned long long ab, unsigned long long ib, int active_only),

	TP_ARGS(name, src, dest, ab, ib, active_only),

	TP_STRUCT__entry(
		__string(name, name)
		__field(int, src)
		__field(int, dest)
		__field(u64, ab)
		__field(u64, ib)
		__field(int, active_only)
	),

	TP_fast_assign(
		__assign_str(name, name);
		__entry->src = src;
		__entry->dest = dest;
		__entry->ab = ab;
		__entry->ib = ib;
		__entry->active_only = active_only;
	),

	TP_printk("name=%s src=%d dest=%d ab=%llu ib=%llu active_only=%d",
		__get_str(name),
		__entry->src,
		__entry->dest,
		(unsigned long long)__entry->ab,
		(unsigned long long)__entry->ib,
		__entry->active_only)
);

TRACE_EVENT(bus_agg_bw,

	TP_PROTO(unsigned int node_id, int rpm_id, int ctx_set,
		unsigned long long agg_ab),

	TP_ARGS(node_id, rpm_id, ctx_set, agg_ab),

	TP_STRUCT__entry(
		__field(unsigned int, node_id)
		__field(int, rpm_id)
		__field(int, ctx_set)
		__field(u64, agg_ab)
	),

	TP_fast_assign(
		__entry->node_id = node_id;
		__entry->rpm_id = rpm_id;
		__entry->ctx_set = ctx_set;
		__entry->agg_ab = agg_ab;
	),

	TP_printk("node_id:%u rpm_id:%d rpm_ctx:%d agg_ab:%llu",
		__entry->node_id,
		__entry->rpm_id,
		__entry->ctx_set,
		(unsigned long long)__entry->agg_ab)
);
#endif
#define TRACE_INCLUDE_FILE trace_msm_bus
#include <trace/define_trace.h>
+103 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014,2016 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only 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 msm_core

#if !defined(_TRACE_MSM_CORE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_MSM_CORE_H

#include <linux/tracepoint.h>
#include <linux/thermal.h>

TRACE_EVENT(cpu_stats,

	TP_PROTO(unsigned int cpu, long temp,
	uint64_t min_power, uint64_t max_power),

	TP_ARGS(cpu, temp, min_power, max_power),

	TP_STRUCT__entry(
		__field(unsigned int, cpu)
		__field(long, temp)
		__field(uint64_t, min_power)
		__field(uint64_t, max_power)
	),

	TP_fast_assign(
		__entry->cpu = cpu;
		__entry->temp = temp;
		__entry->min_power = min_power;
		__entry->max_power = max_power;
	),

	TP_printk("Cpu%d: temp:%ld power@minfreq:%llu power@maxfreq:%llu",
		__entry->cpu, __entry->temp, __entry->min_power,
		__entry->max_power)
);

TRACE_EVENT(temp_threshold,

	TP_PROTO(unsigned int cpu, long temp,
		long hi_thresh, long low_thresh),

	TP_ARGS(cpu, temp, hi_thresh, low_thresh),

	TP_STRUCT__entry(
		__field(unsigned int, cpu)
		__field(long, temp)
		__field(long, hi_thresh)
		__field(long, low_thresh)
	),

	TP_fast_assign(
		__entry->cpu = cpu;
		__entry->temp = temp;
		__entry->hi_thresh = hi_thresh;
		__entry->low_thresh = low_thresh;
	),

	TP_printk("Cpu%d: temp:%ld hi_thresh:%ld low_thresh:%ld",
		__entry->cpu, __entry->temp, __entry->hi_thresh,
		__entry->low_thresh)
);

TRACE_EVENT(temp_notification,

	TP_PROTO(unsigned int sensor_id, enum thermal_trip_type type,
		int temp, int prev_temp),

	TP_ARGS(sensor_id, type, temp, prev_temp),

	TP_STRUCT__entry(
		__field(unsigned int, sensor_id)
		__field(enum thermal_trip_type, type)
		__field(int, temp)
		__field(int, prev_temp)
	),

	TP_fast_assign(
		__entry->sensor_id = sensor_id;
		__entry->type = type;
		__entry->temp = temp;
		__entry->prev_temp = prev_temp;
	),

	TP_printk("Sensor_id%d: %s threshold triggered temp:%d(previous:%d)",
		__entry->sensor_id,
		__entry->type == THERMAL_TRIP_CONFIGURABLE_HI ? "High" : "Low",
		__entry->temp, __entry->prev_temp)
);

#endif
#define TRACE_INCLUDE_FILE trace_msm_core
#include <trace/define_trace.h>