In RTFR - Or make sure you do read all of the README, I saw some pretty bad times to make the cscope database. The times were 23 minutes to build the cscope cross-references and 5 minutes to build the ctags cross-references.
I tried again on an idle system:
cscope: index has 12818774 references to 629823 symbols xref: usr/src: built cscope cross-reference in 8m36s /zoo/ws/kanigix/usr/src/tools/proto/opt/onbld/bin/xref -f -x tags xref: usr/src: building ctags cross-reference xref: usr/src: built ctags cross-reference in 2m21s Time spent in user mode (CPU seconds) : 68.39s Time spent in kernel mode (CPU seconds) : 31.77s Total time : 10:59.52s CPU utilisation (percentage) : 15.1%
Much better. Either the build is more IO intensive or this process is more CPU intensive. The system was page swapping like crazy during the test last night.
I've been fixated on getting cscope to work - I started down the path of trying to figure out everything I need to set in the environment to just get it to run.
In Solaris development, you always do something like:
$ cd /zoo/ws $ ws kanigix
And the 'ws' script sets up all of your environment variables. Thus when you want to build the cscope database:
$ cd $SRC $ make cscope.out tags
And you are off. Well, I was trying to do that in OpenSolaris and failing. I knew $SRC need to be set and I was digging my way deeper into getting it all hacked up. Then I reread the README, which you are supposed to read first, really, the whole thing.
Well I had, several times in the distant past. I've even recently skimmed parts of it to find stuff I needed. I should have reread it all. Anyway, to do what I want is already simple, just use 'bldenv':
[tdh@kanigix onnv-gate.first]> pwd /zoo/ws/onnv-gate.first [tdh@kanigix onnv-gate.first]> bldenv -d ./opensolaris.sh Build type is DEBUG RELEASE is VERSION is kanigix RELEASE_DATE is January 2007 The top-level 'setup' target is available to build headers and tools. Using /bin/tcsh as shell. [tdh@kanigix onnv-gate.first]> cd $SRC [tdh@kanigix src]> make cscope.out tags /zoo/ws/onnv-gate.first/usr/src/tools/proto/opt/onbld/bin/xref -f -x cscope.out xref: usr/src: building cscope cross-reference ... cscope: building symbol index: temporary file size is 250223167 bytes cscope: index has 12814195 references to 629827 symbols xref: usr/src: built cscope cross-reference in 23m00s /zoo/ws/onnv-gate.first/usr/src/tools/proto/opt/onbld/bin/xref -f -x tags xref: usr/src: building ctags cross-reference xref: usr/src: built ctags cross-reference in 4m55s Time spent in user mode (CPU seconds) : 70.00s Time spent in kernel mode (CPU seconds) : 42.30s Total time : 28:02.98s CPU utilisation (percentage) : 6.6%
Pretty slow - I was in the middle of a build. But that should be CPU bound and this IO bound. I'll test an idle system later.
I then use a simple alias to remember the options to invoke it:
alias csf cscope-fast -e -p 3 -d -q
But again, the real morale of the entry is, "Read the README, Really!"