Lines Matching full: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()
322 void bch2_prt_backtrace(struct printbuf *out, bch_stacktrace *stack) in bch2_prt_backtrace() argument
325 prt_printf(out, "[<0>] %pB", (void *) *i); in bch2_prt_backtrace()
326 prt_newline(out); in bch2_prt_backtrace()
330 int bch2_prt_task_backtrace(struct printbuf *out, struct task_struct *task, unsigned skipnr, gfp_t … in bch2_prt_task_backtrace() argument
335 bch2_prt_backtrace(out, &stack); in bch2_prt_task_backtrace()
342 void bch2_prt_datetime(struct printbuf *out, time64_t sec) in bch2_prt_datetime() argument
348 prt_str(out, buf); in bch2_prt_datetime()
351 void bch2_prt_datetime(struct printbuf *out, time64_t sec) in bch2_prt_datetime() argument
355 prt_u64(out, sec); in bch2_prt_datetime()
359 void bch2_pr_time_units(struct printbuf *out, u64 ns) in bch2_pr_time_units() argument
363 prt_printf(out, "%llu %s", div64_u64(ns, u->nsecs), u->name); in bch2_pr_time_units()
366 static void bch2_pr_time_units_aligned(struct printbuf *out, u64 ns) in bch2_pr_time_units_aligned() argument
370 prt_printf(out, "%llu \r%s", div64_u64(ns, u->nsecs), u->name); in bch2_pr_time_units_aligned()
373 static inline void pr_name_and_units(struct printbuf *out, const char *name, u64 ns) in pr_name_and_units() argument
375 prt_printf(out, "%s\t", name); in pr_name_and_units()
376 bch2_pr_time_units_aligned(out, ns); in pr_name_and_units()
377 prt_newline(out); in pr_name_and_units()
382 void bch2_time_stats_to_text(struct printbuf *out, struct bch2_time_stats *stats) in bch2_time_stats_to_text() argument
407 printbuf_tabstop_push(out, out->indent + TABSTOP_SIZE); in bch2_time_stats_to_text()
408 prt_printf(out, "count:\t%llu\n", stats->duration_stats.n); in bch2_time_stats_to_text()
409 printbuf_tabstop_pop(out); in bch2_time_stats_to_text()
411 printbuf_tabstops_reset(out); in bch2_time_stats_to_text()
413 printbuf_tabstop_push(out, out->indent + 20); in bch2_time_stats_to_text()
414 printbuf_tabstop_push(out, TABSTOP_SIZE + 2); in bch2_time_stats_to_text()
415 printbuf_tabstop_push(out, 0); in bch2_time_stats_to_text()
416 printbuf_tabstop_push(out, TABSTOP_SIZE + 2); in bch2_time_stats_to_text()
418 prt_printf(out, "\tsince mount\r\trecent\r\n"); in bch2_time_stats_to_text()
420 printbuf_tabstops_reset(out); in bch2_time_stats_to_text()
421 printbuf_tabstop_push(out, out->indent + 20); in bch2_time_stats_to_text()
422 printbuf_tabstop_push(out, TABSTOP_SIZE); in bch2_time_stats_to_text()
423 printbuf_tabstop_push(out, 2); in bch2_time_stats_to_text()
424 printbuf_tabstop_push(out, TABSTOP_SIZE); in bch2_time_stats_to_text()
426 prt_printf(out, "duration of events\n"); in bch2_time_stats_to_text()
427 printbuf_indent_add(out, 2); in bch2_time_stats_to_text()
429 pr_name_and_units(out, "min:", stats->min_duration); in bch2_time_stats_to_text()
430 pr_name_and_units(out, "max:", stats->max_duration); in bch2_time_stats_to_text()
431 pr_name_and_units(out, "total:", stats->total_duration); in bch2_time_stats_to_text()
433 prt_printf(out, "mean:\t"); in bch2_time_stats_to_text()
434 bch2_pr_time_units_aligned(out, d_mean); in bch2_time_stats_to_text()
435 prt_tab(out); in bch2_time_stats_to_text()
436 …bch2_pr_time_units_aligned(out, mean_and_variance_weighted_get_mean(stats->duration_stats_weighted… in bch2_time_stats_to_text()
437 prt_newline(out); in bch2_time_stats_to_text()
439 prt_printf(out, "stddev:\t"); in bch2_time_stats_to_text()
440 bch2_pr_time_units_aligned(out, d_stddev); in bch2_time_stats_to_text()
441 prt_tab(out); in bch2_time_stats_to_text()
442 …bch2_pr_time_units_aligned(out, mean_and_variance_weighted_get_stddev(stats->duration_stats_weight… in bch2_time_stats_to_text()
444 printbuf_indent_sub(out, 2); in bch2_time_stats_to_text()
445 prt_newline(out); in bch2_time_stats_to_text()
447 prt_printf(out, "time between events\n"); in bch2_time_stats_to_text()
448 printbuf_indent_add(out, 2); in bch2_time_stats_to_text()
450 pr_name_and_units(out, "min:", stats->min_freq); in bch2_time_stats_to_text()
451 pr_name_and_units(out, "max:", stats->max_freq); in bch2_time_stats_to_text()
453 prt_printf(out, "mean:\t"); in bch2_time_stats_to_text()
454 bch2_pr_time_units_aligned(out, f_mean); in bch2_time_stats_to_text()
455 prt_tab(out); in bch2_time_stats_to_text()
456 …bch2_pr_time_units_aligned(out, mean_and_variance_weighted_get_mean(stats->freq_stats_weighted, TI… in bch2_time_stats_to_text()
457 prt_newline(out); in bch2_time_stats_to_text()
459 prt_printf(out, "stddev:\t"); in bch2_time_stats_to_text()
460 bch2_pr_time_units_aligned(out, f_stddev); in bch2_time_stats_to_text()
461 prt_tab(out); in bch2_time_stats_to_text()
462 …bch2_pr_time_units_aligned(out, mean_and_variance_weighted_get_stddev(stats->freq_stats_weighted, … in bch2_time_stats_to_text()
464 printbuf_indent_sub(out, 2); in bch2_time_stats_to_text()
465 prt_newline(out); in bch2_time_stats_to_text()
467 printbuf_tabstops_reset(out); in bch2_time_stats_to_text()
475 prt_printf(out, "quantiles (%s):\t", u->name); in bch2_time_stats_to_text()
480 prt_printf(out, "%llu ", div64_u64(q, u->nsecs)); in bch2_time_stats_to_text()
482 prt_newline(out); in bch2_time_stats_to_text()
587 void bch2_pd_controller_debug_to_text(struct printbuf *out, struct bch_pd_controller *pd) in bch2_pd_controller_debug_to_text() argument
589 if (!out->nr_tabstops) in bch2_pd_controller_debug_to_text()
590 printbuf_tabstop_push(out, 20); in bch2_pd_controller_debug_to_text()
592 prt_printf(out, "rate:\t"); in bch2_pd_controller_debug_to_text()
593 prt_human_readable_s64(out, pd->rate.rate); in bch2_pd_controller_debug_to_text()
594 prt_newline(out); in bch2_pd_controller_debug_to_text()
596 prt_printf(out, "target:\t"); in bch2_pd_controller_debug_to_text()
597 prt_human_readable_u64(out, pd->last_target); in bch2_pd_controller_debug_to_text()
598 prt_newline(out); in bch2_pd_controller_debug_to_text()
600 prt_printf(out, "actual:\t"); in bch2_pd_controller_debug_to_text()
601 prt_human_readable_u64(out, pd->last_actual); in bch2_pd_controller_debug_to_text()
602 prt_newline(out); in bch2_pd_controller_debug_to_text()
604 prt_printf(out, "proportional:\t"); in bch2_pd_controller_debug_to_text()
605 prt_human_readable_s64(out, pd->last_proportional); in bch2_pd_controller_debug_to_text()
606 prt_newline(out); in bch2_pd_controller_debug_to_text()
608 prt_printf(out, "derivative:\t"); in bch2_pd_controller_debug_to_text()
609 prt_human_readable_s64(out, pd->last_derivative); in bch2_pd_controller_debug_to_text()
610 prt_newline(out); in bch2_pd_controller_debug_to_text()
612 prt_printf(out, "change:\t"); in bch2_pd_controller_debug_to_text()
613 prt_human_readable_s64(out, pd->last_change); in bch2_pd_controller_debug_to_text()
614 prt_newline(out); in bch2_pd_controller_debug_to_text()
616 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()