ANDROID: bug: add vendor hook for bug trap

Add hook to gather data of bug trap and summarize it with other
information.

Bug: 177483057

Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: Ic44fd1c3c4e43f04510a871a8dbeb25aafc45e95
diff --git a/lib/bug.c b/lib/bug.c
index 7103440..44245a3 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -49,6 +49,8 @@
 #include <linux/rculist.h>
 #include <linux/ftrace.h>
 
+#include <trace/hooks/bug.h>
+
 extern struct bug_entry __start___bug_table[], __stop___bug_table[];
 
 static inline unsigned long bug_addr(const struct bug_entry *bug)
@@ -206,6 +208,8 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
 		pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n",
 			(void *)bugaddr);
 
+	trace_android_rvh_report_bug(file, line, bugaddr);
+
 	return BUG_TRAP_TYPE_BUG;
 }