blob: 0d3f499502cd36908508dff70ab55ae03db6bf1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 10_top_irix.dpatch by <csmall@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Change formal of IRix mode when showing threads #459890
@DPATCH@
diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
--- procps-3.2.7~/top.c 2008-04-07 08:43:08.000000000 +1000
+++ procps-3.2.7/top.c 2008-04-07 08:45:23.000000000 +1000
@@ -1774,7 +1774,8 @@
confighlp(Winstk[i].rc.fieldscur);
}
- if(Rc.mode_irixps && smp_num_cpus>1){
+ if(Rc.mode_irixps && smp_num_cpus>1 &&
+ !(CHKw(Curwin, Show_THREADS))) {
// good for 100 CPUs per process
pcpu_max_value = 9999.0;
Fieldstab[P_CPU].fmts = " %4.0f";
@@ -2561,6 +2562,15 @@
case 'H':
if (VIZCHKc) {
TOGw(Curwin, Show_THREADS);
+ if(Rc.mode_irixps && smp_num_cpus>1 &&
+ !(CHKw(Curwin, Show_THREADS))){
+ // good for 100 CPUs per process
+ pcpu_max_value = 9999.0;
+ Fieldstab[P_CPU].fmts = " %4.0f";
+ } else {
+ pcpu_max_value = 99.9;
+ Fieldstab[P_CPU].fmts = " %#4.1f";
+ }
show_msg(fmtmk("Show threads %s"
, CHKw(Curwin, Show_THREADS) ? "On" : "Off"));
}
@@ -2617,7 +2627,8 @@
Rc.mode_irixps = !Rc.mode_irixps;
show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));
#endif
- if(Rc.mode_irixps && smp_num_cpus>1){
+ if(Rc.mode_irixps && smp_num_cpus>1 &&
+ !(CHKw(Curwin, Show_THREADS))){
// good for 100 CPUs per process
pcpu_max_value = 9999.0;
Fieldstab[P_CPU].fmts = " %4.0f";
|