Lines Matching refs:out

244 void bch2_prt_u64_base2_nbits(struct printbuf *out, u64 v, unsigned nr_bits)  in bch2_prt_u64_base2_nbits()  argument
247 prt_char(out, '0' + ((v >> --nr_bits) & 1)); in bch2_prt_u64_base2_nbits()
250 void bch2_prt_u64_base2(struct printbuf *out, u64 v) in bch2_prt_u64_base2() argument
252 bch2_prt_u64_base2_nbits(out, v, fls64(v) ?: 1); in bch2_prt_u64_base2()
319 void bch2_prt_backtrace(struct printbuf *out, bch_stacktrace *stack) in bch2_prt_backtrace() argument
322 prt_printf(out, "[<0>] %pB", (void *) *i); in bch2_prt_backtrace()
323 prt_newline(out); in bch2_prt_backtrace()
327 int bch2_prt_task_backtrace(struct printbuf *out, struct task_struct *task, unsigned skipnr, gfp_t … in bch2_prt_task_backtrace() argument
332 bch2_prt_backtrace(out, &stack); in bch2_prt_task_backtrace()
339 void bch2_prt_datetime(struct printbuf *out, time64_t sec) in bch2_prt_datetime() argument
345 prt_str(out, buf); in bch2_prt_datetime()
348 void bch2_prt_datetime(struct printbuf *out, time64_t sec) in bch2_prt_datetime() argument
352 prt_u64(out, sec); in bch2_prt_datetime()
356 void bch2_pr_time_units(struct printbuf *out, u64 ns) in bch2_pr_time_units() argument
360 prt_printf(out, "%llu %s", div64_u64(ns, u->nsecs), u->name); in bch2_pr_time_units()
363 static void bch2_pr_time_units_aligned(struct printbuf *out, u64 ns) in bch2_pr_time_units_aligned() argument
367 prt_printf(out, "%llu \r%s", div64_u64(ns, u->nsecs), u->name); in bch2_pr_time_units_aligned()
370 static inline void pr_name_and_units(struct printbuf *out, const char *name, u64 ns) in pr_name_and_units() argument
372 prt_printf(out, "%s\t", name); in pr_name_and_units()
373 bch2_pr_time_units_aligned(out, ns); in pr_name_and_units()
374 prt_newline(out); in pr_name_and_units()
379 void bch2_time_stats_to_text(struct printbuf *out, struct bch2_time_stats *stats) in bch2_time_stats_to_text() argument
404 printbuf_tabstop_push(out, out->indent + TABSTOP_SIZE); in bch2_time_stats_to_text()
405 prt_printf(out, "count:\t%llu\n", stats->duration_stats.n); in bch2_time_stats_to_text()
406 printbuf_tabstop_pop(out); in bch2_time_stats_to_text()
408 printbuf_tabstops_reset(out); in bch2_time_stats_to_text()
410 printbuf_tabstop_push(out, out->indent + 20); in bch2_time_stats_to_text()
411 printbuf_tabstop_push(out, TABSTOP_SIZE + 2); in bch2_time_stats_to_text()
412 printbuf_tabstop_push(out, 0); in bch2_time_stats_to_text()
413 printbuf_tabstop_push(out, TABSTOP_SIZE + 2); in bch2_time_stats_to_text()
415 prt_printf(out, "\tsince mount\r\trecent\r\n"); in bch2_time_stats_to_text()
417 printbuf_tabstops_reset(out); in bch2_time_stats_to_text()
418 printbuf_tabstop_push(out, out->indent + 20); in bch2_time_stats_to_text()
419 printbuf_tabstop_push(out, TABSTOP_SIZE); in bch2_time_stats_to_text()
420 printbuf_tabstop_push(out, 2); in bch2_time_stats_to_text()
421 printbuf_tabstop_push(out, TABSTOP_SIZE); in bch2_time_stats_to_text()
423 prt_printf(out, "duration of events\n"); in bch2_time_stats_to_text()
424 printbuf_indent_add(out, 2); in bch2_time_stats_to_text()
426 pr_name_and_units(out, "min:", stats->min_duration); in bch2_time_stats_to_text()
427 pr_name_and_units(out, "max:", stats->max_duration); in bch2_time_stats_to_text()
428 pr_name_and_units(out, "total:", stats->total_duration); in bch2_time_stats_to_text()
430 prt_printf(out, "mean:\t"); in bch2_time_stats_to_text()
431 bch2_pr_time_units_aligned(out, d_mean); in bch2_time_stats_to_text()
432 prt_tab(out); in bch2_time_stats_to_text()
433 …bch2_pr_time_units_aligned(out, mean_and_variance_weighted_get_mean(stats->duration_stats_weighted… in bch2_time_stats_to_text()
434 prt_newline(out); in bch2_time_stats_to_text()
436 prt_printf(out, "stddev:\t"); in bch2_time_stats_to_text()
437 bch2_pr_time_units_aligned(out, d_stddev); in bch2_time_stats_to_text()
438 prt_tab(out); in bch2_time_stats_to_text()
439 …bch2_pr_time_units_aligned(out, mean_and_variance_weighted_get_stddev(stats->duration_stats_weight… in bch2_time_stats_to_text()
441 printbuf_indent_sub(out, 2); in bch2_time_stats_to_text()
442 prt_newline(out); in bch2_time_stats_to_text()
444 prt_printf(out, "time between events\n"); in bch2_time_stats_to_text()
445 printbuf_indent_add(out, 2); in bch2_time_stats_to_text()
447 pr_name_and_units(out, "min:", stats->min_freq); in bch2_time_stats_to_text()
448 pr_name_and_units(out, "max:", stats->max_freq); in bch2_time_stats_to_text()
450 prt_printf(out, "mean:\t"); in bch2_time_stats_to_text()
451 bch2_pr_time_units_aligned(out, f_mean); in bch2_time_stats_to_text()
452 prt_tab(out); in bch2_time_stats_to_text()
453 …bch2_pr_time_units_aligned(out, mean_and_variance_weighted_get_mean(stats->freq_stats_weighted, TI… in bch2_time_stats_to_text()
454 prt_newline(out); in bch2_time_stats_to_text()
456 prt_printf(out, "stddev:\t"); in bch2_time_stats_to_text()
457 bch2_pr_time_units_aligned(out, f_stddev); in bch2_time_stats_to_text()
458 prt_tab(out); in bch2_time_stats_to_text()
459 …bch2_pr_time_units_aligned(out, mean_and_variance_weighted_get_stddev(stats->freq_stats_weighted, … in bch2_time_stats_to_text()
461 printbuf_indent_sub(out, 2); in bch2_time_stats_to_text()
462 prt_newline(out); in bch2_time_stats_to_text()
464 printbuf_tabstops_reset(out); in bch2_time_stats_to_text()
472 prt_printf(out, "quantiles (%s):\t", u->name); in bch2_time_stats_to_text()
477 prt_printf(out, "%llu ", div64_u64(q, u->nsecs)); in bch2_time_stats_to_text()
479 prt_newline(out); in bch2_time_stats_to_text()
584 void bch2_pd_controller_debug_to_text(struct printbuf *out, struct bch_pd_controller *pd) in bch2_pd_controller_debug_to_text() argument
586 if (!out->nr_tabstops) in bch2_pd_controller_debug_to_text()
587 printbuf_tabstop_push(out, 20); in bch2_pd_controller_debug_to_text()
589 prt_printf(out, "rate:\t"); in bch2_pd_controller_debug_to_text()
590 prt_human_readable_s64(out, pd->rate.rate); in bch2_pd_controller_debug_to_text()
591 prt_newline(out); in bch2_pd_controller_debug_to_text()
593 prt_printf(out, "target:\t"); in bch2_pd_controller_debug_to_text()
594 prt_human_readable_u64(out, pd->last_target); in bch2_pd_controller_debug_to_text()
595 prt_newline(out); in bch2_pd_controller_debug_to_text()
597 prt_printf(out, "actual:\t"); in bch2_pd_controller_debug_to_text()
598 prt_human_readable_u64(out, pd->last_actual); in bch2_pd_controller_debug_to_text()
599 prt_newline(out); in bch2_pd_controller_debug_to_text()
601 prt_printf(out, "proportional:\t"); in bch2_pd_controller_debug_to_text()
602 prt_human_readable_s64(out, pd->last_proportional); in bch2_pd_controller_debug_to_text()
603 prt_newline(out); in bch2_pd_controller_debug_to_text()
605 prt_printf(out, "derivative:\t"); in bch2_pd_controller_debug_to_text()
606 prt_human_readable_s64(out, pd->last_derivative); in bch2_pd_controller_debug_to_text()
607 prt_newline(out); in bch2_pd_controller_debug_to_text()
609 prt_printf(out, "change:\t"); in bch2_pd_controller_debug_to_text()
610 prt_human_readable_s64(out, pd->last_change); in bch2_pd_controller_debug_to_text()
611 prt_newline(out); in bch2_pd_controller_debug_to_text()
613 prt_printf(out, "next io:\t%llims\n", div64_s64(pd->rate.next - local_clock(), NSEC_PER_MSEC)); in bch2_pd_controller_debug_to_text()
725 void bch2_bio_to_text(struct printbuf *out, struct bio *bio) in bch2_bio_to_text() argument
727 prt_printf(out, "bi_remaining:\t%u\n", in bch2_bio_to_text()
729 prt_printf(out, "bi_end_io:\t%ps\n", in bch2_bio_to_text()
731 prt_printf(out, "bi_status:\t%u\n", in bch2_bio_to_text()