Lines Matching refs:os

363 	struct outstate *os = ctx;
365 os->newline = true;
369 struct outstate *os)
371 fputc('\n', os->fh);
372 if (os->prefix)
373 fputs(os->prefix, os->fh);
374 aggr_printout(config, os->evsel, os->id, os->aggr_nr);
377 static inline void __new_line_std(struct outstate *os)
379 fprintf(os->fh, " ");
383 struct outstate *os)
385 __new_line_std_csv(config, os);
387 fprintf(os->fh, " ");
388 __new_line_std(os);
395 struct outstate *os = ctx;
396 FILE *out = os->fh;
398 bool newline = os->newline;
400 os->newline = false;
408 do_new_line_std(config, os);
420 struct outstate *os = ctx;
423 __new_line_std_csv(config, os);
424 for (i = 0; i < os->nfields; i++)
425 fputs(config->csv_sep, os->fh);
433 struct outstate *os = ctx;
434 FILE *out = os->fh;
455 struct outstate *os = ctx;
456 FILE *out = os->fh;
466 struct outstate *os = ctx;
468 fputs("\n{", os->fh);
469 if (os->prefix)
470 fprintf(os->fh, "%s", os->prefix);
471 aggr_printout(config, os->evsel, os->id, os->aggr_nr);
489 struct outstate *os = ctx;
494 for (i = 0; i < os->nfields - 2; i++)
495 fputs(config->csv_sep, os->fh);
499 for (i = 0; i < os->nfields; i++)
500 fputs(config->csv_sep, os->fh);
509 struct outstate *os = ctx;
513 __new_line_std(os);
549 struct outstate *os = ctx;
550 FILE *out = os->fh;
556 unit = fixunit(buf, os->evsel, unit);
565 os->first = false;
573 struct outstate *os = ctx;
574 FILE *out = os->fh;
580 unit = fixunit(tbuf, os->evsel, unit);
587 os->first = false;
595 struct outstate *os = ctx;
596 FILE *out = os->fh;
602 unit = fixunit(tbuf, os->evsel, unit);
610 fprintf(out, "%s\"%s\" : \"%s\"", os->first ? "" : ", ", unit, vals);
611 os->first = false;
624 struct outstate *os = ctx;
629 os->evsel->priv != os->evsel->evlist->selected->priv)
632 if (os->evsel->cgrp != os->cgrp)
637 unit = fixunit(tbuf, os->evsel, unit);
642 fprintf(os->fh, "%s%s", unit, config->csv_sep);
644 fprintf(os->fh, "%*s ", config->metric_only_len, unit);
767 static void printout(struct perf_stat_config *config, struct outstate *os,
775 struct evsel *counter = os->evsel;
781 os->nfields = 4 + (counter->cgrp ? 1 : 0);
794 pm(config, os, NULL, "", "", 0);
812 out.ctx = os;
816 abs_printout(config, os->id, os->aggr_nr, counter, uval, ok);
826 aggr_printout(config, os->evsel, os->id, os->aggr_nr);
834 new_line_json(config, (void *)os);
836 __new_line_std_csv(config, os);
849 pm(config, os, /*color=*/NULL, /*format=*/NULL, /*unit=*/"", /*val=*/0);
957 struct outstate *os)
968 os->id = id;
969 os->aggr_nr = aggr->nr;
970 os->evsel = counter;
991 if (os->prefix)
992 fprintf(output, "%s", os->prefix);
1000 printout(config, os, uval, run, ena, avg, aggr_idx);
1008 struct outstate *os, int aggr_idx)
1014 os->first = true;
1020 if (os->prefix)
1021 fprintf(config->output, "%s", os->prefix);
1028 print_cgroup(config, os->cgrp ? : evsel->cgrp);
1031 static void print_metric_end(struct perf_stat_config *config, struct outstate *os)
1039 if (os->first)
1048 struct outstate *os)
1061 print_metric_begin(config, evlist, os, aggr_idx);
1064 print_counter_aggrdata(config, counter, aggr_idx, os);
1066 print_metric_end(config, os);
1072 struct outstate *os)
1081 if (os->cgrp == evsel->cgrp)
1084 os->cgrp = evsel->cgrp;
1087 print_metric_begin(config, evlist, os, aggr_idx);
1090 if (counter->cgrp != os->cgrp)
1093 print_counter_aggrdata(config, counter, aggr_idx, os);
1095 print_metric_end(config, os);
1101 struct evsel *counter, struct outstate *os)
1110 print_counter_aggrdata(config, counter, aggr_idx, os);
1116 struct outstate *os)
1134 os->evsel = counter;
1135 os->id = aggr_cpu_id__cpu(cpu, /*data=*/NULL);
1137 print_metric_begin(config, evlist, os, aggr_idx);
1145 printout(config, os, uval, run, ena, 1.0, aggr_idx);
1148 print_metric_end(config, os);
1185 struct outstate os = {
1189 .ctx = &os,
1206 os.cgrp = evlist__first(evlist)->cgrp;
1210 os.evsel = counter;
1460 struct evsel *counter, struct outstate *os)
1471 return print_counter(config, counter, os);
1497 print_counter_aggrdata(config, counter, aggr_idx, os);
1508 struct outstate *os)
1513 if (os->cgrp != counter->cgrp) {
1514 if (os->cgrp != NULL)
1515 print_metric_end(config, os);
1517 os->cgrp = counter->cgrp;
1518 print_metric_begin(config, evlist, os, /*aggr_idx=*/0);
1521 print_counter(config, counter, os);
1523 if (os->cgrp)
1524 print_metric_end(config, os);
1535 struct outstate os = {
1544 os.prefix = buf;
1557 print_aggr_cgroup(config, evlist, &os);
1559 print_aggr(config, evlist, &os);
1565 (iostat_print_counter_t)print_counter, &os);
1567 print_cgroup_counter(config, evlist, &os);
1569 print_metric_begin(config, evlist, &os, /*aggr_idx=*/0);
1571 print_counter(config, counter, &os);
1573 print_metric_end(config, &os);
1578 print_no_aggr_metric(config, evlist, &os);
1582 print_percore(config, counter, &os);
1584 print_counter(config, counter, &os);