diff --git a/ps/display.c b/ps/display.c index 8c604a3d..43e67ce2 100644 --- a/ps/display.c +++ b/ps/display.c @@ -315,9 +315,9 @@ static void simple_spew(void){ } break; case TF_show_proc|TF_show_task: // m and -m options - procps_pids_stacks_sort(Pids_info, pidreap->stacks + procps_pids_sort(Pids_info, pidreap->stacks , pidreap->counts.total, PROCPS_PIDS_TIME_START, PROCPS_SORT_ASCEND); - procps_pids_stacks_sort(Pids_info, pidreap->stacks + procps_pids_sort(Pids_info, pidreap->stacks , pidreap->counts.total, PROCPS_PIDS_ID_TGID, PROCPS_SORT_ASCEND); for (i = 0; i < pidreap->counts.total; i++) { buf = pidreap->stacks[i]; @@ -465,7 +465,7 @@ static void fancy_spew(void){ if (n) { if(forest_type) prep_forest_sort(); while(sort_list) { - procps_pids_stacks_sort(Pids_info, processes, n, sort_list->sr, sort_list->reverse); + procps_pids_sort(Pids_info, processes, n, sort_list->sr, sort_list->reverse); sort_list = sort_list->next; } if(forest_type) show_forest(n); diff --git a/top/top.c b/top/top.c index 99d39d6e..90e3297e 100644 --- a/top/top.c +++ b/top/top.c @@ -4570,7 +4570,7 @@ static void forest_create (WIN_t *q) { Tree_ppt = alloc_r(Tree_ppt, sizeof(void*) * hwmsav); } #ifndef TREE_SCANALL - if (!(procps_pids_stacks_sort(Pids_ctx, Seed_ppt, PIDSmaxt + if (!(procps_pids_sort(Pids_ctx, Seed_ppt, PIDSmaxt , PROCPS_PIDS_TIME_START, PROCPS_SORT_ASCEND))) error_exit(fmtmk(N_fmt(LIB_errorpid_fmt),__LINE__)); #endif @@ -5149,7 +5149,7 @@ static int window_show (WIN_t *q, int wmax) { item = PROCPS_PIDS_CMDLINE; else if (item == PROCPS_PIDS_TICS_ALL && CHKw(q, Show_CTIMES)) item = PROCPS_PIDS_TICS_ALL_C; - if (!(procps_pids_stacks_sort(Pids_ctx, q->ppt , PIDSmaxt, item, sORDER))) + if (!(procps_pids_sort(Pids_ctx, q->ppt , PIDSmaxt, item, sORDER))) error_exit(fmtmk(N_fmt(LIB_errorpid_fmt),__LINE__)); }