This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: precompiled probing scenarios


Frank Ch. Eigler wrote:
Hi -

dsmith wrote:
[...]
I don't hash the getuid(), since:
- by default your cache is stored in your home directory
- who you are doesn't change the pass 2-4 output

That's all true. One possible reason for including getuid() anyway is so that two different sudo-empowered people can run the same script at the same time without one having to disable his cache.

Ah - makes sense, I've added this.


Nope. I actually cache the module and the C file so I can skip pass 3 but still preserve semantics.

OK.


Hmm. How about something like:
Pass 3: Using cached /home/dsmith/.stap_cache/d/8/stap_d833fd040735ddde57a23bebb4456542_201.c
Pass 4: Using cached /home/dsmith/.stap_cache/d/8/stap_d833fd040735ddde57a23bebb4456542_201.ko

Works for me.

OK, I've implemented this.


(It may be a worthwhile minor simplification to use
one-byte /d8/ as a partitioning subdirectory rather than two-nibble
/d/8/ scheme.  256 files in a single directory are well handled in our
filesystems.)

I did it this way because ccache did it this way. My sense is that it was done this way to make sure the directories with cached files didn't end up too large (not the partition directories themselves). Of course ccache's problem is a bit worse than ours - they cache 3 files for every .o file (the .o file itself, gcc stdout, and gcc stderr) while we only cache 2 files per ,ko (the .ko itself and the associated .c file).


(Also note that the number of levels is configurable. The default is 2, but setting the SYSTEMTAP_NLEVELS environment variable lets you set it from 1 to 8.)

--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]