[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add new command --file-list (-F) to global, and use it in htags
From: |
Hideki IWAMOTO |
Subject: |
[PATCH] Add new command --file-list (-F) to global, and use it in htags |
Date: |
Mon, 16 Nov 2009 21:23:47 +0900 |
Hi.
This patch decreases the frequency that htags executes global command
by changing the method of passing a list of path name from command line argument
to temporary file.
Diffstat:
global/global.c | 262 +++++++++++++++++++++++++++++++++++++++----------------
global/manual.in | 7 +
gtags.conf.in | 2
htags/anchor.c | 67 ++++++++++----
htags/anchor.h | 3
htags/htags.c | 16 ---
6 files changed, 253 insertions(+), 104 deletions(-)
The frequency of system call under condition of
GTAGSCACHE=134217728
htags_options=-aDfFInosx
is as follows.
======== current CVS version ========
$ foreach label ( default 2pass )
foreach? echo ==== label:$label ====
foreach? rm -fr linux-2.6.31; tar xfj ~/download/linux/linux-2.6.31.tar.bz2;
sync
foreach? (cd linux-2.6.31; setenv GTAGSLABEL $label; gtags; strace -c -f -F -q
-S calls htags)
foreach? end
==== label:default ====
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
34.40 122.207052 81 1505061 88 write
43.17 153.368494 106 1451899 14 read
8.69 30.868833 82 378630 pread
2.55 9.048733 50 180246 lseek
1.78 6.329060 36 175892 mmap
1.64 5.833524 34 171900 close
1.74 6.179133 36 170852 fstat
2.67 9.479246 56 170136 open
1.82 6.456042 39 167528 munmap
0.65 2.311625 20 113942 3485 stat
0.32 1.144488 43 26797 brk
0.03 0.123552 9 13329 mremap
0.02 0.079724 17 4602 rt_sigaction
0.02 0.067396 18 3765 mprotect
0.01 0.041663 17 2508 rt_sigprocmask
0.01 0.053235 21 2506 837 access
0.01 0.020611 16 1255 uname
0.27 0.958788 1146 837 execve
0.00 0.011786 14 837 arch_prctl
0.00 0.005685 13 435 lstat
0.00 0.007078 17 419 getpid
0.00 0.012843 31 418 pipe
0.00 0.009780 23 418 dup2
0.17 0.611744 1464 418 clone
0.01 0.019450 47 418 wait4
0.00 0.006608 16 418 getuid
0.00 0.006113 15 418 getgid
0.00 0.005857 14 418 geteuid
0.00 0.006093 15 418 getegid
0.00 0.006815 16 418 getppid
0.00 0.006409 15 418 getpgrp
0.00 0.003875 11 342 fcntl
0.00 0.008018 29 277 chdir
0.00 0.002327 16 146 getcwd
0.00 0.000107 4 24 getrusage
0.00 0.000259 32 8 mkdir
0.00 0.000126 25 5 unlink
0.00 0.000044 15 3 chmod
------ ----------- ----------- --------- --------- ----------------
100.00 355.302216 4548361 4424 total
==== label:2pass ====
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
45.03 206.807069 114 1806818 80 write
36.08 165.726434 95 1753566 7 read
6.75 30.985808 84 369432 pread
2.29 10.540039 58 180246 lseek
1.65 7.599827 43 175800 mmap
1.45 6.662274 39 171900 close
1.62 7.447363 44 170677 fstat
2.30 10.583143 62 170048 open
1.58 7.252197 43 167435 munmap
0.48 2.212786 19 113942 3485 stat
0.27 1.220022 47 26072 brk
0.02 0.111370 8 13300 mremap
0.01 0.063578 14 4602 rt_sigaction
0.02 0.070244 19 3765 mprotect
0.01 0.035519 14 2508 rt_sigprocmask
0.01 0.042286 17 2506 837 access
0.00 0.019244 15 1255 uname
0.23 1.071832 1281 837 execve
0.00 0.012099 14 837 arch_prctl
0.00 0.005013 12 435 lstat
0.00 0.005213 12 419 getpid
0.00 0.018551 44 418 pipe
0.00 0.009257 22 418 dup2
0.16 0.724096 1732 418 clone
0.00 0.018863 45 418 wait4
0.00 0.007321 18 418 getuid
0.00 0.005882 14 418 getgid
0.00 0.005414 13 418 geteuid
0.00 0.005453 13 418 getegid
0.00 0.006940 17 418 getppid
0.00 0.004826 12 418 getpgrp
0.00 0.008938 32 277 chdir
0.00 0.004600 18 254 fcntl
0.00 0.002458 17 146 getcwd
0.00 0.000108 5 24 getrusage
0.00 0.000219 27 8 mkdir
0.00 0.000114 23 5 unlink
0.00 0.000050 17 3 chmod
------ ----------- ----------- --------- --------- ----------------
100.00 459.296450 5141297 4409 total
======== patched version ========
$ foreach label ( default 2pass )
foreach? echo ==== label:$label ====
foreach? rm -fr linux-2.6.31; tar xfj ~/download/linux/linux-2.6.31.tar.bz2;
sync
foreach? (cd linux-2.6.31; setenv GTAGSLABEL $label; gtags; strace -c -f -F -q
-S calls htags)
foreach? end
==== label:default ====
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
33.82 120.521756 80 1505462 73 write
44.81 159.678560 110 1449895 read
8.26 29.443912 80 367080 pread
2.55 9.092706 51 179709 lseek
1.78 6.348294 38 169017 mmap
1.62 5.769033 34 167320 close
1.75 6.237081 37 167047 fstat
2.76 9.833835 59 166817 open
1.83 6.534108 39 166050 munmap
0.34 1.227782 11 109228 1325 stat
0.31 1.110834 46 24012 brk
0.04 0.126589 9 13329 mremap
0.01 0.042422 26 1632 rt_sigaction
0.01 0.037357 28 1335 mprotect
0.01 0.029811 34 889 297 access
0.01 0.029736 33 888 rt_sigprocmask
0.00 0.012792 29 445 uname
0.05 0.165096 556 297 execve
0.00 0.006907 23 297 arch_prctl
0.00 0.002422 16 152 getpid
0.00 0.007608 51 148 pipe
0.00 0.003994 27 148 dup2
0.01 0.051462 348 148 clone
0.00 0.010850 73 148 wait4
0.00 0.002834 19 148 getuid
0.00 0.002538 17 148 getgid
0.00 0.002972 20 148 geteuid
0.00 0.003358 23 148 getegid
0.00 0.003027 20 148 getppid
0.00 0.004144 28 148 getpgrp
0.00 0.001556 12 125 fcntl
0.00 0.000268 9 30 lstat
0.00 0.000082 3 24 getrusage
0.00 0.000126 11 11 getcwd
0.00 0.000259 32 8 mkdir
0.00 0.000172 22 8 unlink
0.00 0.000232 33 7 chdir
0.00 0.000042 14 3 chmod
------ ----------- ----------- --------- --------- ----------------
100.00 356.346557 4492597 1695 total
==== label:2pass ====
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
44.56 186.155840 103 1807202 57 write
40.49 169.143151 97 1751560 read
2.68 11.178268 62 179709 lseek
1.90 7.925562 47 168924 mmap
1.62 6.780514 41 167320 close
1.89 7.876922 47 166867 fstat
2.78 11.602942 70 166727 open
1.79 7.471974 45 165957 munmap
0.36 1.483747 14 109228 1325 stat
1.54 6.417259 86 74518 pread
0.09 0.381301 29 13300 mremap
0.07 0.285137 44 6483 brk
0.01 0.045652 28 1632 rt_sigaction
0.01 0.037993 28 1335 mprotect
0.01 0.033648 38 889 297 access
0.01 0.020896 24 888 rt_sigprocmask
0.00 0.014595 33 445 uname
0.12 0.498429 1678 297 execve
0.00 0.007364 25 297 arch_prctl
0.00 0.003032 20 152 getpid
0.00 0.009460 64 148 pipe
0.00 0.006375 43 148 dup2
0.08 0.329480 2226 148 clone
0.00 0.008658 59 148 wait4
0.00 0.003803 26 148 getuid
0.00 0.003516 24 148 getgid
0.00 0.002855 19 148 geteuid
0.00 0.002961 20 148 getegid
0.00 0.002904 20 148 getppid
0.00 0.003153 21 148 getpgrp
0.00 0.000141 4 35 fcntl
0.00 0.000222 7 30 lstat
0.00 0.000080 3 24 getrusage
0.00 0.000122 11 11 getcwd
0.00 0.004229 529 8 mkdir
0.00 0.000311 39 8 unlink
0.00 0.000387 55 7 chdir
0.00 0.000051 17 3 chmod
------ ----------- ----------- --------- --------- ----------------
100.00 417.742934 4785336 1679 total
----
Hideki IWAMOTO address@hidden
20091113-global-F.patch
Description: Binary data
- [PATCH] Add new command --file-list (-F) to global, and use it in htags,
Hideki IWAMOTO <=