Lines Matching refs:opts

84 static const struct options *opts = (const struct options *)&__options;  variable
101 (void) fprintf(stderr, "%s: ", opts->pgmname); in cpustat_errfn()
102 if (opts->debug) in cpustat_errfn()
119 struct options *opts = &__options; in main() local
130 if ((opts->pgmname = strrchr(argv[0], '/')) == NULL) in main()
131 opts->pgmname = argv[0]; in main()
133 opts->pgmname++; in main()
141 opts->pgmname, errstr); in main()
147 "counters - %s\n"), opts->pgmname, errstr); in main()
162 opts->mseconds = 5000; in main()
163 opts->nsamples = UINT_MAX; in main()
164 opts->dotitle = 1; in main()
165 if ((opts->master = cpc_setgrp_new(cpc, smt)) == NULL) { in main()
167 opts->pgmname); in main()
174 opts->debug++; in main()
177 if ((sgrp = cpc_setgrp_newset(opts->master, in main()
179 opts->master = sgrp; in main()
182 opts->dotitle = 0; in main()
185 opts->doperiod = 1; in main()
189 "parameter \"%s\"\n"), opts->pgmname, in main()
195 opts->dosoaker = 1; in main()
198 opts->dotick = 1; in main()
213 opts->dohelp = 1; in main()
225 opts->nsamples = strtol(argv[optind + 1], &endp, 10); in main()
229 opts->pgmname, argv[optind + 1]); in main()
235 opts->mseconds = (uint_t)(strtod(argv[optind], &endp) * 1000.0); in main()
239 opts->pgmname, argv[optind]); in main()
248 if (opts->nsamples == 0 || opts->mseconds == 0) in main()
251 if (errcnt != 0 || opts->dohelp || in main()
252 (opts->nsets = cpc_setgrp_numsets(opts->master)) == 0) { in main()
253 (void) fprintf(opts->dohelp ? stdout : stderr, gettext( in main()
266 opts->pgmname, CPC_TICKREG_NAME); in main()
267 if (opts->dohelp) { in main()
279 if (opts->doperiod) { in main()
280 opts->mseconds_rest = (uint_t)((period * 1000.0) - in main()
281 (opts->mseconds * opts->nsets)); in main()
282 if ((int)opts->mseconds_rest < 0) in main()
283 opts->mseconds_rest = 0; in main()
284 if (opts->nsamples != UINT_MAX) in main()
285 opts->nsamples *= opts->nsets; in main()
288 cpc_setgrp_reset(opts->master); in main()
295 if (opts->dosoaker == 1 && cpc_setgrp_has_sysonly(opts->master) == 0) in main()
296 opts->dosoaker = 0; in main()
309 if (opts->dotick) in print_title()
330 if (opts->dotick) in print_sample()
338 if (opts->nsets > 1) in print_sample()
393 if (opts->dotick) in print_total()
399 if (opts->nsets > 1) in print_total()
423 htdelta = NSECS_PER_MSEC * opts->mseconds; in gtick()
424 restdelta = NSECS_PER_MSEC * opts->mseconds_rest; in gtick()
439 if (opts->dosoaker) { in gtick()
467 for (nsamples = opts->nsamples; nsamples; nsamples--, sample_cnt++) { in gtick()
482 if (opts->nsets == 1) { in gtick()
522 opts->pgmname, state->cpuid, in gtick()
532 if (opts->doperiod && opts->mseconds_rest > 0 && in gtick()
533 (sample_cnt % opts->nsets) == 0) { in gtick()
537 if (opts->dosoaker) { in gtick()
557 if (opts->dosoaker) { in gtick()
584 " cpu %d - %s\n"), opts->pgmname, in gtick()
590 if (opts->dosoaker) { in gtick()
602 opts->pgmname, state->cpuid, errstr); in gtick()
622 "%s: out of heap\n"), opts->pgmname); in cpustat()
629 "%s: out of heap\n"), opts->pgmname); in cpustat()
638 "%s: kstat_open() failed: %s\n"), opts->pgmname, in cpustat()
644 if (opts->dosoaker) in cpustat()
648 opts->pgmname, strerror(errno)); in cpustat()
679 opts->pgmname, c); in cpustat()
693 opts->pgmname, errstr); in cpustat()
706 opts->pgmname, errstr); in cpustat()
715 if (opts->dotitle) in cpustat()
716 print_title(opts->master); in cpustat()
724 this->sgrp = cpc_setgrp_clone(opts->master); in cpustat()
735 opts->pgmname, this->cpuid); in cpustat()
744 if ((accum = cpc_setgrp_clone(opts->master)) == NULL) { in cpustat()
746 opts->pgmname); in cpustat()
789 opts->pgmname, cpuid, strerror(errno)); in get_chipid()
796 opts->pgmname, cpuid, strerror(errno)); in get_chipid()
812 "thread to cpu%d: %s\n"), opts->pgmname, state->cpuid, in soaker()
826 "thread in FX sched class: %s\n"), opts->pgmname, in soaker()