Lines Matching defs:os

374 	struct outstate *os = ctx;
376 os->newline = true;
380 struct outstate *os)
382 fputc('\n', os->fh);
383 if (os->prefix)
384 fputs(os->prefix, os->fh);
385 aggr_printout(config, os->evsel, os->id, os->aggr_nr);
388 static inline void __new_line_std(struct outstate *os)
390 fprintf(os->fh, " ");
394 struct outstate *os)
396 __new_line_std_csv(config, os);
398 fprintf(os->fh, " ");
399 __new_line_std(os);
406 struct outstate *os = ctx;
407 FILE *out = os->fh;
409 bool newline = os->newline;
411 os->newline = false;
419 do_new_line_std(config, os);
431 struct outstate *os = ctx;
434 __new_line_std_csv(config, os);
435 for (i = 0; i < os->nfields; i++)
436 fputs(config->csv_sep, os->fh);
444 struct outstate *os = ctx;
445 FILE *out = os->fh;
466 struct outstate *os = ctx;
467 FILE *out = os->fh;
477 struct outstate *os = ctx;
479 fputs("\n{", os->fh);
480 if (os->prefix)
481 fprintf(os->fh, "%s", os->prefix);
482 aggr_printout(config, os->evsel, os->id, os->aggr_nr);
500 struct outstate *os = ctx;
505 for (i = 0; i < os->nfields - 2; i++)
506 fputs(config->csv_sep, os->fh);
510 for (i = 0; i < os->nfields; i++)
511 fputs(config->csv_sep, os->fh);
520 struct outstate *os = ctx;
524 __new_line_std(os);
560 struct outstate *os = ctx;
561 FILE *out = os->fh;
567 unit = fixunit(buf, os->evsel, unit);
576 os->first = false;
584 struct outstate *os = ctx;
585 FILE *out = os->fh;
591 unit = fixunit(tbuf, os->evsel, unit);
598 os->first = false;
606 struct outstate *os = ctx;
607 FILE *out = os->fh;
613 unit = fixunit(tbuf, os->evsel, unit);
621 fprintf(out, "%s\"%s\" : \"%s\"", os->first ? "" : ", ", unit, vals);
622 os->first = false;
635 struct outstate *os = ctx;
640 os->evsel->priv != os->evsel->evlist->selected->priv)
643 if (os->evsel->cgrp != os->cgrp)
648 unit = fixunit(tbuf, os->evsel, unit);
653 fprintf(os->fh, "%s%s", unit, config->csv_sep);
655 fprintf(os->fh, "%*s ", config->metric_only_len, unit);
778 static void printout(struct perf_stat_config *config, struct outstate *os,
786 struct evsel *counter = os->evsel;
792 os->nfields = 4 + (counter->cgrp ? 1 : 0);
805 pm(config, os, NULL, "", "", 0);
823 out.ctx = os;
827 abs_printout(config, os->id, os->aggr_nr, counter, uval, ok);
837 aggr_printout(config, os->evsel, os->id, os->aggr_nr);
845 new_line_json(config, (void *)os);
847 __new_line_std_csv(config, os);
860 pm(config, os, /*color=*/NULL, /*format=*/NULL, /*unit=*/"", /*val=*/0);
968 struct outstate *os)
979 os->id = id;
980 os->aggr_nr = aggr->nr;
981 os->evsel = counter;
1002 if (os->prefix)
1003 fprintf(output, "%s", os->prefix);
1011 printout(config, os, uval, run, ena, avg, aggr_idx);
1019 struct outstate *os, int aggr_idx)
1025 os->first = true;
1031 if (os->prefix)
1032 fprintf(config->output, "%s", os->prefix);
1039 print_cgroup(config, os->cgrp ? : evsel->cgrp);
1042 static void print_metric_end(struct perf_stat_config *config, struct outstate *os)
1050 if (os->first)
1059 struct outstate *os)
1072 print_metric_begin(config, evlist, os, aggr_idx);
1075 print_counter_aggrdata(config, counter, aggr_idx, os);
1077 print_metric_end(config, os);
1083 struct outstate *os)
1092 if (os->cgrp == evsel->cgrp)
1095 os->cgrp = evsel->cgrp;
1098 print_metric_begin(config, evlist, os, aggr_idx);
1101 if (counter->cgrp != os->cgrp)
1104 print_counter_aggrdata(config, counter, aggr_idx, os);
1106 print_metric_end(config, os);
1112 struct evsel *counter, struct outstate *os)
1121 print_counter_aggrdata(config, counter, aggr_idx, os);
1127 struct outstate *os)
1150 os->evsel = counter;
1151 os->id = aggr_cpu_id__cpu(cpu, /*data=*/NULL);
1153 print_metric_begin(config, evlist, os, aggr_idx);
1161 printout(config, os, uval, run, ena, 1.0, aggr_idx);
1164 print_metric_end(config, os);
1201 struct outstate os = {
1205 .ctx = &os,
1222 os.cgrp = evlist__first(evlist)->cgrp;
1226 os.evsel = counter;
1477 struct evsel *counter, struct outstate *os)
1488 return print_counter(config, counter, os);
1514 print_counter_aggrdata(config, counter, aggr_idx, os);
1525 struct outstate *os)
1530 if (os->cgrp != counter->cgrp) {
1531 if (os->cgrp != NULL)
1532 print_metric_end(config, os);
1534 os->cgrp = counter->cgrp;
1535 print_metric_begin(config, evlist, os, /*aggr_idx=*/0);
1538 print_counter(config, counter, os);
1540 if (os->cgrp)
1541 print_metric_end(config, os);
1552 struct outstate os = {
1561 os.prefix = buf;
1575 print_aggr_cgroup(config, evlist, &os);
1577 print_aggr(config, evlist, &os);
1583 (iostat_print_counter_t)print_counter, &os);
1585 print_cgroup_counter(config, evlist, &os);
1587 print_metric_begin(config, evlist, &os, /*aggr_idx=*/0);
1589 print_counter(config, counter, &os);
1591 print_metric_end(config, &os);
1596 print_no_aggr_metric(config, evlist, &os);
1600 print_percore(config, counter, &os);
1602 print_counter(config, counter, &os);