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

Commit 08d9710d authored by Pushkar Joshi's avatar Pushkar Joshi Committed by Matt Wagantall
Browse files

clk: qcom: Add support to record clock state using ftrace



Add ftrace event so that the state of all the clocks can be recorded
using ftrace. Use that event to add support in debugfs to take a
snapshot of all the clocks present and their current state to ftrace.

CRs-Fixed: 766583
Change-Id: Ibe95b5eaa013e2da378b9dc5e8c43162895ef272
Signed-off-by: default avatarPushkar Joshi <pushkarj@codeaurora.org>
parent ae7cd896
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -359,6 +359,31 @@ TRACE_EVENT(clock_set_parent,
	TP_printk("%s parent=%s", __get_str(name), __get_str(parent_name))
);

TRACE_EVENT(clock_state,

	TP_PROTO(const char *name, unsigned long prepare_count,
		unsigned long count, unsigned long rate),

	TP_ARGS(name, prepare_count, count, rate),

	TP_STRUCT__entry(
		__string(name,			name)
		__field(unsigned long,		prepare_count)
		__field(unsigned long,		count)
		__field(unsigned long,		rate)
	),

	TP_fast_assign(
		__assign_str(name, name);
		__entry->prepare_count = prepare_count;
		__entry->count = count;
		__entry->rate = rate;
	),

	TP_printk("%s\t[%lu:%lu]\t%lu", __get_str(name), __entry->prepare_count,
					__entry->count, __entry->rate)
);

/*
 * The power domain events are used for power domains transitions
 */