ANDROID: logbuf: Add new logbuf vendor hook to support pr_cont()

Add new logbuf vendor hook android_vh_logbuf_pr_cont()
to capture pr_cont logs.

Bug: 199236943
Change-Id: I76b310fc9caac71b344b6cc25ea36f7f81cb7148
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
(cherry picked from commit 01f2392e13)
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
This commit is contained in:
Mukesh Ojha
2021-06-27 15:26:40 +05:30
committed by Suren Baghdasaryan
parent 976f1840da
commit 0820d8e399
3 changed files with 6 additions and 0 deletions

View File

@@ -201,3 +201,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_cpus_allowed_ptr_locked);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rto_next_cpu); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rto_next_cpu);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_em_dev_register_pd); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_em_dev_register_pd);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_logbuf); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_logbuf);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_logbuf_pr_cont);

View File

@@ -17,6 +17,10 @@ struct printk_record;
DECLARE_HOOK(android_vh_logbuf, DECLARE_HOOK(android_vh_logbuf,
TP_PROTO(struct printk_ringbuffer *rb, struct printk_record *r), TP_PROTO(struct printk_ringbuffer *rb, struct printk_record *r),
TP_ARGS(rb, r)) TP_ARGS(rb, r))
DECLARE_HOOK(android_vh_logbuf_pr_cont,
TP_PROTO(struct printk_record *r, size_t text_len),
TP_ARGS(r, text_len))
#else #else
#define trace_android_vh_logbuf(rb, r) #define trace_android_vh_logbuf(rb, r)
#endif #endif

View File

@@ -2164,6 +2164,7 @@ int vprintk_store(int facility, int level,
prb_commit(&e); prb_commit(&e);
} }
trace_android_vh_logbuf_pr_cont(&r, text_len);
ret = text_len; ret = text_len;
goto out; goto out;
} }