Lines Matching defs:n

49 #define	LOCKSTAT_OPTSTR	"x:bths:n:d:i:l:f:e:ckwWgCHEATID:RpPo:V"
228 (void) fprintf(stderr, "\n");
241 (void) fprintf(stderr, ": %s\n",
263 "\n%s events (lockstat -%c or lockstat -e %d-%d):\n\n",
268 "%4d = %s\n", i, g_event_info[i].ev_desc);
275 "Usage: lockstat [options] command [args]\n"
276 "\nEvent selection options:\n\n"
277 " -C watch contention events [on by default]\n"
278 " -E watch error events [off by default]\n"
279 " -H watch hold events [off by default]\n"
280 " -I watch interrupt events [off by default]\n"
281 " -A watch all lock events [equivalent to -CH]\n"
282 " -e event_list only watch the specified events (shown below);\n"
283 " <event_list> is a comma-separated list of\n"
284 " events or ranges of events, e.g. 1,4-7,35\n"
285 " -i rate interrupt rate for -I [default: %d Hz]\n"
286 "\nData gathering options:\n\n"
287 " -b basic statistics (lock, caller, event count)\n"
288 " -t timing for all events [default]\n"
289 " -h histograms for event times\n"
290 " -s depth stack traces <depth> deep\n"
291 " -x opt[=val] enable or modify DTrace options\n"
292 "\nData filtering options:\n\n"
293 " -n nrecords maximum number of data records [default: %d]\n"
294 " -l lock[,size] only watch <lock>, which can be specified as a\n"
295 " symbolic name or hex address; <size> defaults\n"
296 " to the ELF symbol size if available, 1 if not\n"
297 " -f func[,size] only watch events generated by <func>\n"
298 " -d duration only watch events longer than <duration>\n"
299 " -T trace (rather than sample) events\n"
300 "\nData reporting options:\n\n"
301 " -c coalesce lock data for arrays like pse_mutex[]\n"
302 " -k coalesce PCs within functions\n"
303 " -g show total events generated by function\n"
304 " -w wherever: don't distinguish events by caller\n"
305 " -W whichever: don't distinguish events by lock\n"
306 " -R display rates rather than counts\n"
307 " -p parsable output format (awk(1)-friendly)\n"
308 " -P sort lock data by (count * avg_time) product\n"
309 " -D n only display top <n> events of each type\n"
310 " -o filename send output to <filename>\n",
317 (void) fprintf(stderr, "\n");
462 mergesort(int (*cmp)(lsrec_t *, lsrec_t *), lsrec_t **a, lsrec_t **b, int n)
464 int m = n / 2;
469 if (n - m > 1)
470 mergesort(cmp, a + m, b + m, n - m);
473 for (j = m - 1; j < n - 1; j++)
474 b[n + m - j - 2] = a[j + 1];
481 coalesce(int (*cmp)(lsrec_t *, lsrec_t *), lsrec_t **lock, int n)
488 for (i = 1; i < n; i++) {
643 arg0 = "(uintptr_t)curthread->t_cpu + \n"
657 (void) sprintf(stack, "\tstack(%d);\n", depth);
671 dprog_add("%s\n", info->ev_acquire);
675 dprog_add("/%s/\n", pred);
677 dprog_add("{\n");
681 dprog_add("\t%s = timestamp;\n", buf);
688 dprog_add("\t%s++;\n", buf);
691 dprog_add("}\n\n");
703 dprog_add("%s\n", info->ev_name);
704 dprog_add("/%s/\n{\n\t%s--;\n}\n\n", buf, buf);
710 (void) sprintf(buf, "timestamp -\n\t "
726 dprog_add("%s\n", info->ev_name);
729 dprog_add("/%s/\n", pred);
732 dprog_add("{\n");
735 dprog_add("\ttrace(%dULL);\n", event);
736 dprog_add("\ttrace(%s);\n", arg0);
737 dprog_add("\ttrace(%s);\n", caller);
747 dprog_add("\t@avg[%dULL, %s, %s%s] = avg(%s);\n",
752 "(%s);\n", event, arg0, caller, stack, arg1);
757 dprog_add("\tself->ev%d[arg0] = 0;\n", event);
759 dprog_add("}\n\n");
769 (void) fprintf(stderr, "lockstat: vvvv D program vvvv\n");
771 (void) fprintf(stderr, "lockstat: ^^^^ D program ^^^^\n");
1078 case 'n':
1393 "lockstat: warning: %s exited with code %d\n",
1398 "lockstat: warning: %s died on signal %d\n",
1433 "ran out of data records (use -n for more)\n");
1635 (void) fprintf(out, "%20llu %s\n",
1649 "\n%s: %.0f events in %.3f seconds (%.0f events/sec)\n\n",
1656 (void) fprintf(out, "%5s %4s %4s %4s %8s %-22s %-24s\n",
1661 "----------------------------------------------\n");
1697 (void) fprintf(out, "\n");
1703 "----------------------------------------------\n");
1706 (void) fprintf(out, "%5s %4s %4s %4s %8s %-22s %-24s\n",
1742 (void) fprintf(out, "%-24s\n",
1748 (void) fprintf(out, "\n");
1749 (void) fprintf(out, "%10s %31s %-9s %-24s\n",
1788 (void) fprintf(out, "\n");
1791 (void) fprintf(out, "%-24s\n",
1796 (void) fprintf(out, "%15s %-36s %-24s\n", "", "",
1804 "----------------------------------------------\n");
1820 (void) fprintf(out, "%5s %7s %11s %-24s %-24s\n",
1823 "----------------------------------------------\n");
1833 (void) fprintf(out, "%2d %10llu %11p %-24s %-24s\n",
1850 (void) fprintf(out, "%53s %-24s\n", "",
1854 (void) fprintf(out, "\n");