• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/dtrace-118.1/libdtrace/

Lines Matching defs:sort*

1425 		 * If we're sorting on keys, we need to scan until we find the
1428 * default behavior of sorting by value.) If the keys are
1444 * All of the values are equal; if we're sorting on
1447 * equal. If we're not sorting on keys, we'll use the
1772 dt_ahashent_t *h, **sorted;
1779 sorted = dt_alloc(dtp, nentries * sizeof (dt_ahashent_t *));
1781 if (sorted == NULL)
1785 sorted[i++] = h;
1790 dt_aggregate_qsort(dtp, sorted, nentries,
1794 * If we've been explicitly passed a sorting function,
1798 qsort(sorted, nentries, sizeof (dt_ahashent_t *), sfunc);
1804 h = sorted[i];
1807 dt_free(dtp, sorted);
1812 dt_free(dtp, sorted);
1892 dt_ahashent_t *h, **sorted = NULL, ***bundle, **nbundle;
1900 dtrace_optval_t sortpos = dtp->dt_options[DTRACEOPT_AGGSORTPOS];
1903 * If the sorting position is greater than the number of aggregation
1906 if (sortpos == DTRACEOPT_UNSET || sortpos >= naggvars)
1907 sortpos = 0;
1931 int ndx = i + sortpos;
1960 * for the sort position yields the same aggregation
1963 assert(aggvars[(map[aggvar] - 1 + sortpos) %
2002 * Before we sort the data, we're going to look for any holes in our
2025 aggvar = aggvars[(i - sortpos + naggvars) % naggvars];
2108 aggvar = aggvars[(i - sortpos + naggvars) % naggvars];
2171 * allocate our sorted array, and take another pass over the data to
2174 sorted = dt_alloc(dtp, nentries * sizeof (dt_ahashent_t *));
2176 if (sorted == NULL)
2185 sorted[i++] = h;
2191 * We've loaded our array; now we need to sort by value to allow us
2194 * comparison and sorting.
2198 qsort(sorted, nentries, sizeof (dt_ahashent_t *),
2203 * of bundles is bounded by the size of the sorted array, we're going
2210 bundle = (dt_ahashent_t ***)sorted;
2214 dt_aggregate_keycmp(&sorted[i], &sorted[i - 1]) == 0)
2230 dtrace_aggvarid_t id = dt_aggregate_aggvarid(sorted[j]);
2236 nbundle[map[id] - 1] = sorted[j];
2239 nbundle[naggvars] = sorted[j];
2270 * Now we need to re-sort based on the first value.
2278 * We're done! Now we just need to go back over the sorted bundles,
2288 int ndx = j - sortpos;
2323 dt_free(dtp, sorted);