[ccache] Questions about two hot functions in ccache

2010-10-17 Thread Justin Lebar
Hi, all. I ran ccache through |perf| on my x64 Linux box today. In my testcase (|make clean perf record -g make| within a subdirectory of the Firefox tree), there are only four functions that see more than 2% of the samples: 25.39% c++ ccache [.]

Re: [ccache] [Patch] Faster direct-mode hash

2010-11-26 Thread Justin Lebar
) With ccache, preprocessor mode, cache hit:1.66 s ( 25.56 %) ( 3.91 x) With ccache, direct mode, cache miss: 7.94 s (121.95 %) ( 0.82 x) With ccache, direct mode, cache hit: 0.28 s ( 4.34 %) (23.04 x) On Mon, Nov 8, 2010 at 2:06 PM, Justin Lebar justin.le...@gmail.com wrote

Re: [ccache] Stumbling blocks with ccache and embedded/encapsulated environments

2010-12-02 Thread Justin Lebar
Even on a ccache *hit* both copies of the .o file wind up occupying buffer cache space, because the ccached .o is read from disk [paging it in] in order to write the .o file to the build output directory. On a ccache miss the copy runs the other direction but you still wind up with both sets

Re: [ccache] Support for -fprofile-generate, -fprofile-use, -fprofile-arcs

2011-07-21 Thread Justin Lebar
Do you need to hash in the cwd when compiling with -fprofile-generate? If I use direct mode and don't have any absolute paths in my build, it looks like I could have a cache hit between two compiles in different directories. That would be bad, since I think the absolute path the .gcda is output

Re: [ccache] Support for -fprofile-generate, -fprofile-use, -fprofile-arcs

2011-07-25 Thread Justin Lebar
+ if (output_to_real_object_first) { +if (copy_file(tmp_obj, cached_obj, enable_compression) != 0) { + cc_log(Failed to move %s to %s: %s, tmp_obj, cached_obj, strerror(errno)); + stats_update(STATS_ERROR); + failed(); +} Maybe you should hardlink, if CCACHE_HARDLINK is

Re: [ccache] Support for -fprofile-generate, -fprofile-use, -fprofile-arcs

2011-08-10 Thread Justin Lebar
: On Mon, Aug 8, 2011 at 4:24 PM, Justin Lebar justin.le...@gmail.com wrote: The .gcda files themselves aren't cached, their contents are used to calculate the hash for a -fprofile-use run. So if the .o file doesn't exist, and you have the same .gcda file, you get a cache hit. Ah, I see.  What

Re: [ccache] Support for -fprofile-generate, -fprofile-use, -fprofile-arcs

2011-08-21 Thread Justin Lebar
Assuming -fprofile-generate/-fprofile-use also work on windows, that code shouldn't be ifdef'ed out. Instead I need an equivalent to x_realpath for windows (or windows support for x_realpath). I'm confused; do you mean MSVC or GCC on Windows? MSVC PGO doesn't have a set of compilation flags

Re: [ccache] Duplicate object files in the ccache - possible optimization?

2011-11-07 Thread Justin Lebar
Looking at a ccache with about 40,000 .o files in it (created with direct mode turned on); of the 55 largest files, I found 11 pairs and one triplet of identical object files. That's almost 25% of redundant storage that could have been avoided by looking at the preprocessed hash when there is

Re: [ccache] PATCH: Look at include files' mtimes

2012-05-22 Thread Justin Lebar
Better to do 2 seconds, since FAT (and maybe some other Windows related setups) has only a 2-second resolution. The other thing you can do is, on Unix, use the latest of ctime and mtime, which should catch cases where the mtime gets reset. Thanks for the tips! I'm happy to update the patch,

Re: [ccache] [PATCH] Detect __DATE__ and __TIME__ correctly.

2012-10-08 Thread Justin Lebar
I've encountered a bug while playing with ccache: temporal macros are not detected correctly. Ouch! * the assumption that 'E' is less common in source than '_', we check * str[i-2] first. Update the comment? while (i len) { I think this fails on at

Re: [ccache] [PATCH] Detect __DATE__ and __TIME__ correctly.

2012-10-09 Thread Justin Lebar
Can you update the Python script in the comment right above the code and confirm that it matches your new table? It's hard for me to see what you did here based on just the patch... On Tue, Oct 9, 2012 at 10:43 AM, Andrew Stubbs a...@codesourcery.com wrote: On 08/10/12 19:25, Justin Lebar wrote

Re: [ccache] [PATCH] Detect __DATE__ and __TIME__ correctly.

2012-10-09 Thread Justin Lebar
of this, since it's obviously tricky to get right! On Tue, Oct 9, 2012 at 11:05 AM, Andrew Stubbs andrew_stu...@mentor.com wrote: On 09/10/12 15:46, Justin Lebar wrote: Can you update the Python script in the comment right above the code and confirm that it matches your new table? It's hard

[ccache] Fwd: [PATCH] Detect __DATE__ and __TIME__ correctly.

2012-11-04 Thread Justin Lebar
] Detect __DATE__ and __TIME__ correctly. To: Justin Lebar justin.le...@gmail.com Cc: Andrew Stubbs a...@codesourcery.com, ccache@lists.samba.org ccache@lists.samba.org On 09/10/12 15:46, Justin Lebar wrote: Can you update the Python script in the comment right above the code and confirm

Re: [ccache] PATCH: Look at include files' mtimes

2012-12-24 Thread Justin Lebar
. I'd also appreciate if some of you could test this patch by turning on CCACHE_SLOPPINESS=file_stat_matches and letting me know if you have any problems. Happy holidays. -Justin On Sun, May 20, 2012 at 4:49 PM, Justin Lebar justin.le...@gmail.com wrote: This patch lets ccache examine an include

Re: [ccache] PATCH: Look at include files' mtimes

2013-06-03 Thread Justin Lebar
2012 08:18, Justin Lebar justin.le...@gmail.com wrote: Hi, all. I've resurrected these patches to look at files' mtimes and ctimes. Hopefully the three patches here (with their commit messages) don't need further explanation. Note that the second patch here increases safety for everyone