]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Merge remote-tracking branch 'afbjorklund/zero_timestamp'
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Nov 2016 21:20:26 +0000 (22:20 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Nov 2016 21:20:26 +0000 (22:20 +0100)
* afbjorklund/zero_timestamp:
  Show the time when stats were last zeroed out

1  2 
ccache.h
stats.c

diff --cc ccache.h
index 8b738aba0c10e8bc52aa6d93a472c43e45dcf1f0,ee1f1f445f0dd3ca0888b81d7d4ad11ec4e70e28..cf7d0ff7af0a3fe8ab47e0fe766358f545a5ca8b
+++ b/ccache.h
@@@ -52,7 -52,7 +52,8 @@@ enum stats 
        STATS_CANTUSEPCH = 27,
        STATS_PREPROCESSING = 28,
        STATS_NUMCLEANUPS = 29,
 -      STATS_ZEROTIMESTAMP = 30,
 +      STATS_UNSUPPORTED_DIRECTIVE = 30,
++      STATS_ZEROTIMESTAMP = 31,
  
        STATS_END
  };
diff --cc stats.c
index 5d9fc737885001b5ff822be01eccd481c3105226,110020029da5fe13b30414d221f722eafc329f29..61db8f9b6a97a78381d5f2cfcaa692bfed485490
+++ b/stats.c
@@@ -50,192 -50,41 +50,198 @@@ static struct 
        void (*fn)(uint64_t);
        unsigned flags;
  } stats_info[] = {
 -      { STATS_CACHEHIT_DIR, "cache hit (direct)             ", NULL, FLAG_ALWAYS },
 -      { STATS_CACHEHIT_CPP, "cache hit (preprocessed)       ", NULL, FLAG_ALWAYS },
 -      { STATS_TOCACHE,      "cache miss                     ", NULL, FLAG_ALWAYS },
 -      { STATS_LINK,         "called for link                ", NULL, 0 },
 -      { STATS_PREPROCESSING, "called for preprocessing       ", NULL, 0 },
 -      { STATS_MULTIPLE,     "multiple source files          ", NULL, 0 },
 -      { STATS_STDOUT,       "compiler produced stdout       ", NULL, 0 },
 -      { STATS_NOOUTPUT,     "compiler produced no output    ", NULL, 0 },
 -      { STATS_EMPTYOUTPUT,  "compiler produced empty output ", NULL, 0 },
 -      { STATS_STATUS,       "compile failed                 ", NULL, 0 },
 -      { STATS_ERROR,        "ccache internal error          ", NULL, 0 },
 -      { STATS_PREPROCESSOR, "preprocessor error             ", NULL, 0 },
 -      { STATS_CANTUSEPCH,   "can't use precompiled header   ", NULL, 0 },
 -      { STATS_COMPILER,     "couldn't find the compiler     ", NULL, 0 },
 -      { STATS_MISSING,      "cache file missing             ", NULL, 0 },
 -      { STATS_ARGS,         "bad compiler arguments         ", NULL, 0 },
 -      { STATS_SOURCELANG,   "unsupported source language    ", NULL, 0 },
 -      { STATS_COMPCHECK,    "compiler check failed          ", NULL, 0 },
 -      { STATS_CONFTEST,     "autoconf compile/link          ", NULL, 0 },
 -      { STATS_UNSUPPORTED,  "unsupported compiler option    ", NULL, 0 },
 -      { STATS_OUTSTDOUT,    "output to stdout               ", NULL, 0 },
 -      { STATS_DEVICE,       "output to a non-regular file   ", NULL, 0 },
 -      { STATS_NOINPUT,      "no input file                  ", NULL, 0 },
 -      { STATS_BADEXTRAFILE, "error hashing extra file       ", NULL, 0 },
 -      { STATS_NUMCLEANUPS,  "cleanups performed             ", NULL, FLAG_ALWAYS },
 -      { STATS_ZEROTIMESTAMP,"stats zero timestamp           ", NULL, FLAG_NEVER },
 -      { STATS_NUMFILES,     "files in cache                 ", NULL,
 -              FLAG_NOZERO|FLAG_ALWAYS },
 -      { STATS_TOTALSIZE,    "cache size                     ",
 -              display_size_times_1024, FLAG_NOZERO|FLAG_ALWAYS },
 -      { STATS_OBSOLETE_MAXFILES, "OBSOLETE",                   NULL,
 -              FLAG_NOZERO|FLAG_NEVER},
 -      { STATS_OBSOLETE_MAXSIZE, "OBSOLETE",                    NULL,
 -              FLAG_NOZERO|FLAG_NEVER},
 -      { STATS_NONE, NULL, NULL, 0 }
 +      {
 +              STATS_CACHEHIT_DIR,
 +              "cache hit (direct)",
 +              NULL,
 +              FLAG_ALWAYS
 +      },
 +      {
 +              STATS_CACHEHIT_CPP,
 +              "cache hit (preprocessed)",
 +              NULL,
 +              FLAG_ALWAYS
 +      },
 +      {
 +              STATS_TOCACHE,
 +              "cache miss",
 +              NULL,
 +              FLAG_ALWAYS
 +      },
 +      {
 +              STATS_LINK,
 +              "called for link",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_PREPROCESSING,
 +              "called for preprocessing",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_MULTIPLE,
 +              "multiple source files",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_STDOUT,
 +              "compiler produced stdout",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_NOOUTPUT,
 +              "compiler produced no output",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_EMPTYOUTPUT,
 +              "compiler produced empty output",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_STATUS,
 +              "compile failed",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_ERROR,
 +              "ccache internal error",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_PREPROCESSOR,
 +              "preprocessor error",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_CANTUSEPCH,
 +              "can't use precompiled header",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_COMPILER,
 +              "couldn't find the compiler",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_MISSING,
 +              "cache file missing",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_ARGS,
 +              "bad compiler arguments",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_SOURCELANG,
 +              "unsupported source language",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_COMPCHECK,
 +              "compiler check failed",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_CONFTEST,
 +              "autoconf compile/link",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_UNSUPPORTED_OPTION,
 +              "unsupported compiler option",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_UNSUPPORTED_DIRECTIVE,
 +              "unsupported code directive",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_OUTSTDOUT,
 +              "output to stdout",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_DEVICE,
 +              "output to a non-regular file",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_NOINPUT,
 +              "no input file",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_BADEXTRAFILE,
 +              "error hashing extra file",
 +              NULL,
 +              0
 +      },
 +      {
 +              STATS_NUMCLEANUPS,
 +              "cleanups performed",
 +              NULL,
 +              FLAG_ALWAYS
 +      },
 +      {
 +              STATS_NUMFILES,
 +              "files in cache",
 +              NULL,
 +              FLAG_NOZERO|FLAG_ALWAYS
 +      },
 +      {
 +              STATS_TOTALSIZE,
 +              "cache size",
 +              display_size_times_1024,
 +              FLAG_NOZERO|FLAG_ALWAYS
 +      },
 +      {
 +              STATS_OBSOLETE_MAXFILES,
 +              "OBSOLETE",
 +              NULL,
 +              FLAG_NOZERO|FLAG_NEVER
 +      },
 +      {
 +              STATS_OBSOLETE_MAXSIZE,
 +              "OBSOLETE",
 +              NULL,
 +              FLAG_NOZERO|FLAG_NEVER
 +      },
++      {
++              STATS_ZEROTIMESTAMP,
++              "stats zero timestamp",
++              NULL,
++              FLAG_NEVER
++      },
 +      {
 +              STATS_NONE,
 +              NULL,
 +              NULL,
 +              0
 +      }
  };
  
  static void