The graph log is a data structure maintained by the Vesta cache server. It's used primarily during weeding, but can also be used by people investigating the contents of the cache for debugging purposes.

The name comes from the fact that it contains references from builds to function calls stored in the cache and references from function calls to derived files:

The weeder instructions tell it which builds to keep. The weeder uses the graph log to find the function calls (i.e. cache entries) to keep and the derived files to keep.

The PrintGraphLog utility prints a debug representation of the contents of the graph log. Here's how it would print the representation of a function call in the graph log when given the "-verbose" flag:

*** Entry 25 ***
  Node: 
    pk = 6432f002414fa8bd 4808c9d42b08267d
    ci = 26
    model = 2626079563
    kids = { 25 }
    refs = { 0x934dd306, 0x934dd308, 0x934dd30a }

This function call has PrimaryKey 6432f002414fa8bd 4808c9d42b08267d and CacheIndex 26. It called another function with CacheIndex 25. The result of this function included the files 0x934dd306, 0x934dd308, 0x934dd30a. If a cache entry is kept during weeding, then the any cache entries listed under "kids" will also be kept as well as the files listed under "refs".

Here's how "PrintGraphLog -vebose" would print the representation of a build in progress:

*** Entry 2814 ***
  Root: 
    pkgFP = 72ea3e4ea0883176 1e626b09a6cf5d38
    model = 2982316067
    time = Sat Apr  1 20:35:25 2006
    done = false
    cis = {
      433, 491, 500, 506, 512, 1759, 415, 520, 
      521, 418, 488, 496, 503, 509, 1831, 411, 
      516, 386, 35440, 392, 388, 393, 387, 47611, 
      396, 388, 393 }

The "pkgFP" is the fingerprint of the immutable directory of the build and the "model" is the shortid of the top-level SDL model. Together they uniquely identify the build. The "time" indicates when this build was being performed. The weeder can select builds to be kept by time with the -keep flag. Because this entry has "done = false" it represents a partial build. A final entry is added with "done = true" when a build completes. The "cis" is a list of every CacheIndex in use by the build. For an incomplete build these are cache entries either added by the build or which the build got from a cache hit. For a graph log root with "done = true", there will be a single CacheIndex in "cis" or the top-level model cache entry.

See also: