+#if ENABLE_FEATURE_TOP_SMP_PROCESS
+ if (n < 11+15)
+ sp->last_seen_on_cpu = 0;
+#endif
+
+ /* vsz is in bytes and we want kb */
+ sp->vsz = vsz >> 10;
+ /* vsz is in bytes but rss is in *PAGES*! Can you believe that? */
+ sp->rss = rss << sp->shift_pages_to_kb;
+ sp->tty_major = (tty >> 8) & 0xfff;
+ sp->tty_minor = (tty & 0xff) | ((tty >> 12) & 0xfff00);
+#else
+/* This costs ~100 bytes more but makes top faster by 20%
+ * If you run 10000 processes, this may be important for you */
+ sp->state[0] = cp[2];
+ cp += 4;
+ sp->ppid = fast_strtoul_10(&cp);
+ sp->pgid = fast_strtoul_10(&cp);
+ sp->sid = fast_strtoul_10(&cp);
+ tty = fast_strtoul_10(&cp);
+ sp->tty_major = (tty >> 8) & 0xfff;
+ sp->tty_minor = (tty & 0xff) | ((tty >> 12) & 0xfff00);
+ cp = skip_fields(cp, 6); /* tpgid, flags, min_flt, cmin_flt, maj_flt, cmaj_flt */
+ sp->utime = fast_strtoul_10(&cp);
+ sp->stime = fast_strtoul_10(&cp);
+ cp = skip_fields(cp, 3); /* cutime, cstime, priority */
+ tasknice = fast_strtoul_10(&cp);
+ cp = skip_fields(cp, 2); /* timeout, it_real_value */
+ sp->start_time = fast_strtoul_10(&cp);
+ /* vsz is in bytes and we want kb */
+ sp->vsz = fast_strtoul_10(&cp) >> 10;
+ /* vsz is in bytes but rss is in *PAGES*! Can you believe that? */
+ sp->rss = fast_strtoul_10(&cp) << sp->shift_pages_to_kb;
+#if ENABLE_FEATURE_TOP_SMP_PROCESS
+ /* (6): rss_rlim, start_code, end_code, start_stack, kstk_esp, kstk_eip */
+ /* (4): signal, blocked, sigignore, sigcatch */
+ /* (4): wchan, nswap, cnswap, exit_signal */
+ cp = skip_fields(cp, 14);
+//FIXME: is it safe to assume this field exists?
+ sp->last_seen_on_cpu = fast_strtoul_10(&cp);
+#endif
+#endif /* end of !ENABLE_FEATURE_TOP_SMP_PROCESS */