drm: Add puts callback for the coredump printer
Add a puts function for the coredump printer to bypass printf() for constant strings for a speed boost. Reorganize the coredump printf callback to share as much code as possible. v2: Try to reuse code between print and puts as suggested by Chris Wilson Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
@@ -75,6 +75,7 @@ struct drm_printer {
|
||||
};
|
||||
|
||||
void __drm_printfn_coredump(struct drm_printer *p, struct va_format *vaf);
|
||||
void __drm_puts_coredump(struct drm_printer *p, const char *str);
|
||||
void __drm_printfn_seq_file(struct drm_printer *p, struct va_format *vaf);
|
||||
void __drm_puts_seq_file(struct drm_printer *p, const char *str);
|
||||
void __drm_printfn_info(struct drm_printer *p, struct va_format *vaf);
|
||||
@@ -163,6 +164,7 @@ drm_coredump_printer(struct drm_print_iterator *iter)
|
||||
{
|
||||
struct drm_printer p = {
|
||||
.printfn = __drm_printfn_coredump,
|
||||
.puts = __drm_puts_coredump,
|
||||
.arg = iter,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user