aboutsummaryrefslogtreecommitdiff
path: root/include/trace/events/trace_msm_core.h
blob: d99b72ca63fa16d241edf373ae0c4305cd3a051c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/* Copyright (c) 2014, 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>