Print this page
4823 don't open-code NSEC2MSEC and MSEC2NSEC


 264         (col->col_src_stat.field - col->col_old_stat.field)
 265 
 266         col = col_head;
 267         while (col != NULL) {
 268                 if (bcmp(&col->col_src_stat, &col->col_old_stat,
 269                     sizeof (col->col_src_stat)) == 0) {
 270                         col = col->col_next;
 271                         continue;
 272                 }
 273                 (void) printf("%s %s status: succeeded/attempted (k): "
 274                     "%llu/%llu, ineffective/scans/unenforced/samplings:  "
 275                     "%llu/%llu/%llu/%llu, RSS min/max (k): %llu/%llu, cap %llu "
 276                     "kB, processes/thpt: %llu/%llu, %llu scans over %lld ms\n",
 277                     mode, col->col_name, DELTA(lcols_pg_eff),
 278                     DELTA(lcols_pg_att), DELTA(lcols_scan_ineffective),
 279                     DELTA(lcols_scan), DELTA(lcols_unenforced_cap),
 280                     DELTA(lcols_rss_sample), col->col_src_stat.lcols_min_rss,
 281                     col->col_src_stat.lcols_max_rss, col->col_rsslimit,
 282                     (col->col_src_stat.lcols_proc_in -
 283                     col->col_old_stat.lcols_proc_out), DELTA(lcols_proc_out),
 284                     DELTA(lcols_scan_count), DELTA(lcols_scan_time_complete) /
 285                     (NANOSEC / MILLISEC));
 286                 col->col_old_stat = col->col_src_stat;
 287 
 288                 col = col->col_next;
 289         }
 290 
 291         if (global)
 292                 (void) printf(gettext("physical memory utilization: %3u%%   "
 293                     "cap enforcement threshold: %3u%%\n"), hdr.rs_pressure_cur,
 294                     hdr.rs_pressure_cap);
 295 #undef DELTA
 296 }
 297 
 298 static void
 299 print_stats(rcid_type_t stat_type)
 300 {
 301         col_t *col;
 302         char size[6];
 303         char limit[6];
 304         char rss[6];
 305         char nproc[6];




 264         (col->col_src_stat.field - col->col_old_stat.field)
 265 
 266         col = col_head;
 267         while (col != NULL) {
 268                 if (bcmp(&col->col_src_stat, &col->col_old_stat,
 269                     sizeof (col->col_src_stat)) == 0) {
 270                         col = col->col_next;
 271                         continue;
 272                 }
 273                 (void) printf("%s %s status: succeeded/attempted (k): "
 274                     "%llu/%llu, ineffective/scans/unenforced/samplings:  "
 275                     "%llu/%llu/%llu/%llu, RSS min/max (k): %llu/%llu, cap %llu "
 276                     "kB, processes/thpt: %llu/%llu, %llu scans over %lld ms\n",
 277                     mode, col->col_name, DELTA(lcols_pg_eff),
 278                     DELTA(lcols_pg_att), DELTA(lcols_scan_ineffective),
 279                     DELTA(lcols_scan), DELTA(lcols_unenforced_cap),
 280                     DELTA(lcols_rss_sample), col->col_src_stat.lcols_min_rss,
 281                     col->col_src_stat.lcols_max_rss, col->col_rsslimit,
 282                     (col->col_src_stat.lcols_proc_in -
 283                     col->col_old_stat.lcols_proc_out), DELTA(lcols_proc_out),
 284                     DELTA(lcols_scan_count),
 285                     NSEC2MSEC(DELTA(lcols_scan_time_complete)));
 286                 col->col_old_stat = col->col_src_stat;
 287 
 288                 col = col->col_next;
 289         }
 290 
 291         if (global)
 292                 (void) printf(gettext("physical memory utilization: %3u%%   "
 293                     "cap enforcement threshold: %3u%%\n"), hdr.rs_pressure_cur,
 294                     hdr.rs_pressure_cap);
 295 #undef DELTA
 296 }
 297 
 298 static void
 299 print_stats(rcid_type_t stat_type)
 300 {
 301         col_t *col;
 302         char size[6];
 303         char limit[6];
 304         char rss[6];
 305         char nproc[6];