diff --git a/Cargo.lock b/Cargo.lock
index 4278675..a19fada 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1420,6 +1420,7 @@
  "serde_json",
  "tempfile",
  "walkdir",
+ "zstd",
 ]
 
 [[package]]
diff --git a/portage/build_defs/hash_tracer.bzl b/portage/build_defs/hash_tracer.bzl
index 6a681af..cc1dc72 100644
--- a/portage/build_defs/hash_tracer.bzl
+++ b/portage/build_defs/hash_tracer.bzl
@@ -27,6 +27,7 @@
         outputs = [output],
         inputs = files,
         arguments = [args],
+        mnemonic = "HashTracer",
         execution_requirements = {
             # We don't cache this because we want to increase the chance of
             # the hash being printed.
diff --git a/portage/tools/process_artifacts/BUILD.bazel b/portage/tools/process_artifacts/BUILD.bazel
index 68b200e..cc42ac2 100644
--- a/portage/tools/process_artifacts/BUILD.bazel
+++ b/portage/tools/process_artifacts/BUILD.bazel
@@ -45,6 +45,7 @@
         "@alchemy_crates//:serde",
         "@alchemy_crates//:serde_json",
         "@alchemy_crates//:tempfile",
+        "@alchemy_crates//:zstd",
     ],
 )
 
diff --git a/portage/tools/process_artifacts/Cargo.toml b/portage/tools/process_artifacts/Cargo.toml
index 20fa518..7dd054f 100644
--- a/portage/tools/process_artifacts/Cargo.toml
+++ b/portage/tools/process_artifacts/Cargo.toml
@@ -14,6 +14,7 @@
 serde.workspace = true
 serde_json.workspace = true
 tempfile.workspace = true
+zstd.workspace = true
 
 [dev-dependencies]
 runfiles.workspace = true
diff --git a/portage/tools/process_artifacts/src/commands/diagnose_cache_hits.rs b/portage/tools/process_artifacts/src/commands/diagnose_cache_hits.rs
new file mode 100644
index 0000000..e22b6f6
--- /dev/null
+++ b/portage/tools/process_artifacts/src/commands/diagnose_cache_hits.rs
@@ -0,0 +1,215 @@
+// Copyright 2024 The ChromiumOS Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+use std::{collections::BTreeSet, io::Write, path::Path};
+
+use crate::{
+    processors::execlog::ExecLogProcessor,
+    proto::spawn::exec_log_entry::{self, Spawn},
+};
+use anyhow::{Context, Result};
+use itertools::Itertools;
+
+type EntryType = exec_log_entry::Type;
+type OutputType = exec_log_entry::output::Type;
+
+pub fn diagnose_cache_hits(output_path: &Path, processor: &ExecLogProcessor) -> Result<()> {
+    // Extract all spawn entries.
+    let all_spawns: Vec<&Spawn> = processor
+        .entries()
+        .filter_map(|entry| {
+            if let Some(EntryType::Spawn(spawn)) = &entry.r#type {
+                Some(spawn)
+            } else {
+                None
+            }
+        })
+        .collect();
+
+    // Filter irrelevant spawn entries.
+    let relevant_spawns: Vec<&Spawn> = all_spawns
+        .iter()
+        .copied()
+        .filter(|spawn| {
+            // Filter hash tracer spawns.
+            if spawn.mnemonic == "HashTracer" {
+                return false;
+            }
+            // Older execlogs have hash tracer spawns with right mnemonic, so filter them with
+            // a hack.
+            if let Some(last_arg) = spawn.args.last() {
+                if last_arg.ends_with(".hash") {
+                    return false;
+                }
+            }
+            // PackageTar spawn is set to no-remote.
+            if spawn.mnemonic == "PackageTar" {
+                return false;
+            }
+            true
+        })
+        .collect();
+
+    // Compute cache-miss spawns.
+    let cache_miss_spawns: Vec<&Spawn> = relevant_spawns
+        .iter()
+        .copied()
+        .filter(|spawn| !spawn.cache_hit)
+        .collect();
+
+    // Compute the union of all output files from cache-miss spawns.
+    let cache_miss_spawn_outputs: BTreeSet<i32> = cache_miss_spawns
+        .iter()
+        .flat_map(|spawn| {
+            spawn
+                .outputs
+                .iter()
+                .filter_map(|output| match output.r#type {
+                    Some(OutputType::FileId(id)) => Some(id),
+                    Some(OutputType::DirectoryId(id)) => Some(id),
+                    Some(OutputType::UnresolvedSymlinkId(id)) => Some(id),
+                    _ => None,
+                })
+        })
+        .collect();
+
+    // Find all input sets containing any of cache-miss spawn outputs.
+    let non_leaf_input_sets: BTreeSet<i32> = processor
+        .intersecting_input_sets(cache_miss_spawn_outputs)?
+        .into_iter()
+        .collect();
+
+    // Compute "leaf" cache-miss spawns whose input set doesn't contain outputs from other
+    // cache-miss spawns.
+    let (leaf_cache_miss_spawns, non_leaf_cache_miss_spawns): (Vec<&Spawn>, Vec<&Spawn>) =
+        cache_miss_spawns
+            .iter()
+            .copied()
+            .sorted_by_cached_key(|spawn| (spawn.target_label.clone(), spawn.mnemonic.clone()))
+            .partition(|spawn| {
+                !non_leaf_input_sets.contains(&spawn.input_set_id)
+                    && !non_leaf_input_sets.contains(&spawn.tool_set_id)
+            });
+
+    // Finally, print reports.
+    let mut out = std::fs::File::create(output_path)
+        .with_context(|| format!("Failed to create {}", output_path.display()))?;
+    writeln!(&mut out, "======= cache hit diagnosis =======")?;
+    writeln!(&mut out, "All actions: {}", all_spawns.len())?;
+    writeln!(&mut out, "Non-trivial actions: {}", relevant_spawns.len())?;
+    writeln!(&mut out, "Cache-miss actions: {}", cache_miss_spawns.len())?;
+    writeln!(
+        &mut out,
+        "Leaf cache-miss actions: {}",
+        leaf_cache_miss_spawns.len(),
+    )?;
+    for s in leaf_cache_miss_spawns {
+        writeln!(&mut out, "        {} [{}]", s.target_label, s.mnemonic)?;
+    }
+    writeln!(
+        &mut out,
+        "Non-leaf cache-miss actions: {}",
+        non_leaf_cache_miss_spawns.len(),
+    )?;
+    for s in non_leaf_cache_miss_spawns {
+        writeln!(&mut out, "        {} [{}]", s.target_label, s.mnemonic)?;
+    }
+    writeln!(&mut out, "======= end cache hit diagnosis =======")?;
+
+    Ok(())
+}
+
+#[cfg(test)]
+mod tests {
+    use crate::proto::spawn::{
+        exec_log_entry::{File, InputSet},
+        ExecLogEntry,
+    };
+
+    use super::*;
+
+    #[test]
+    fn smoke() -> Result<()> {
+        let entries = vec![
+            ExecLogEntry {
+                id: 0,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    file_ids: vec![],
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 1,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    file_ids: vec![10, 11],
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 10,
+                r#type: Some(EntryType::File(File {
+                    path: "x".to_string(),
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 11,
+                r#type: Some(EntryType::File(File {
+                    path: "y".to_string(),
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 100,
+                r#type: Some(EntryType::Spawn(Spawn {
+                    target_label: "//a".to_string(),
+                    mnemonic: "A".to_string(),
+                    cache_hit: true,
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 101,
+                r#type: Some(EntryType::Spawn(Spawn {
+                    target_label: "//b".to_string(),
+                    mnemonic: "B".to_string(),
+                    cache_hit: false,
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 102,
+                r#type: Some(EntryType::Spawn(Spawn {
+                    target_label: "//c".to_string(),
+                    mnemonic: "C".to_string(),
+                    cache_hit: false,
+                    input_set_id: 1,
+                    ..Default::default()
+                })),
+            },
+        ];
+        let processor = ExecLogProcessor::from(&entries);
+
+        let output_file = tempfile::NamedTempFile::new()?;
+        let output_path = output_file.path();
+
+        diagnose_cache_hits(output_path, &processor)?;
+
+        assert_eq!(
+            std::fs::read_to_string(output_path)?,
+            r#"======= cache hit diagnosis =======
+All actions: 3
+Non-trivial actions: 3
+Cache-miss actions: 2
+Leaf cache-miss actions: 2
+        //b [B]
+        //c [C]
+Non-leaf cache-miss actions: 0
+======= end cache hit diagnosis =======
+"#
+        );
+
+        Ok(())
+    }
+}
diff --git a/portage/tools/process_artifacts/src/commands/mod.rs b/portage/tools/process_artifacts/src/commands/mod.rs
index fb3082d..7244965 100644
--- a/portage/tools/process_artifacts/src/commands/mod.rs
+++ b/portage/tools/process_artifacts/src/commands/mod.rs
@@ -3,4 +3,5 @@
 // found in the LICENSE file.
 
 pub mod archive_logs;
+pub mod diagnose_cache_hits;
 pub mod prebuilts;
diff --git a/portage/tools/process_artifacts/src/main.rs b/portage/tools/process_artifacts/src/main.rs
index 095dc61..afd4259 100644
--- a/portage/tools/process_artifacts/src/main.rs
+++ b/portage/tools/process_artifacts/src/main.rs
@@ -12,9 +12,13 @@
 
 use anyhow::{Context, Result};
 use clap::Parser;
-use commands::{archive_logs::archive_logs, prebuilts::compute_prebuilts};
-use processors::build_event::BuildEventProcessor;
-use proto::build_event_stream::BuildEvent;
+use commands::{
+    archive_logs::archive_logs, diagnose_cache_hits::diagnose_cache_hits,
+    prebuilts::compute_prebuilts,
+};
+use processors::{build_event::BuildEventProcessor, execlog::ExecLogProcessor};
+use prost::Message;
+use proto::{build_event_stream::BuildEvent, spawn::ExecLogEntry};
 
 mod commands;
 mod processors;
@@ -36,6 +40,25 @@
     Ok(events)
 }
 
+fn load_compact_execlog(path: &Path) -> Result<Vec<ExecLogEntry>> {
+    let data = std::fs::read(path).with_context(|| format!("Failed to read {}", path.display()))?;
+    let data = zstd::decode_all(data.as_slice())
+        .with_context(|| format!("Failed to decode {}", path.display()))?;
+
+    let mut buf = data.as_slice();
+    let mut entries: Vec<ExecLogEntry> = Vec::new();
+    while !buf.is_empty() {
+        let size = prost::decode_length_delimiter(&mut buf)
+            .context("Corrupted execlog: failed to decode message length")?;
+        let entry = ExecLogEntry::decode(&buf[..size])
+            .context("Corrupted execlog: failed to deserialize ExecLogEntry")?;
+        entries.push(entry);
+        buf = &buf[size..];
+    }
+
+    Ok(entries)
+}
+
 fn get_default_workspace_dir() -> &'static OsStr {
     static CACHE: OnceLock<OsString> = OnceLock::new();
     CACHE.get_or_init(|| std::env::var_os("BUILD_WORKSPACE_DIRECTORY").unwrap_or(".".into()))
@@ -51,8 +74,12 @@
 #[derive(Parser, Debug)]
 struct Args {
     /// Path to the Build Event Protocol JSONL file.
-    #[arg(long, required = true)]
-    build_events_jsonl: PathBuf,
+    #[arg(long)]
+    build_events_jsonl: Option<PathBuf>,
+
+    /// Path to the compact execlog file.
+    #[arg(long)]
+    compact_execlog: Option<PathBuf>,
 
     /// Path to the Bazel workspace where bazel-* symlinks are located.
     /// [default: $BUILD_WORKSPACE_DIRECTORY]
@@ -62,27 +89,64 @@
     /// If set, creates a tarball containing all logs created in the build to this file path.
     /// Compression algorithm is selected by the file name extension (using GNU tar's
     /// --auto-compress option).
-    #[arg(long)]
+    #[arg(long, requires = "build_events_jsonl")]
     archive_logs: Option<PathBuf>,
 
     /// If set, a .bzl file will be generated that contains --@portage//<package>_prebuilt
     /// flags pointing to the CAS for the packages specified in the BEP file..
-    #[arg(long)]
+    #[arg(long, requires = "build_events_jsonl")]
     prebuilts: Option<PathBuf>,
+
+    /// If set, diagnoses cache hits from execlog and write human-readable results to the specified
+    /// file.
+    #[arg(long, requires = "compact_execlog")]
+    diagnose_cache_hits: Option<PathBuf>,
 }
 
 fn main() -> Result<()> {
     let args = Args::parse();
 
-    let events = load_build_events_jsonl(&args.build_events_jsonl)?;
-    let processor = BuildEventProcessor::from(&events);
+    let events = if let Some(path) = &args.build_events_jsonl {
+        Some(load_build_events_jsonl(path)?)
+    } else {
+        None
+    };
+    let events_processor = events.as_ref().map(BuildEventProcessor::from);
+
+    let execlog = if let Some(path) = &args.compact_execlog {
+        Some(load_compact_execlog(path)?)
+    } else {
+        None
+    };
+    let execlog_processor = execlog.as_ref().map(ExecLogProcessor::from);
 
     if let Some(output_path) = &args.archive_logs {
-        archive_logs(output_path, &args.workspace, &processor)?;
+        archive_logs(
+            output_path,
+            &args.workspace,
+            events_processor
+                .as_ref()
+                .context("--build-events-jsonl must be set")?,
+        )?;
     }
 
     if let Some(output_path) = &args.prebuilts {
-        compute_prebuilts(output_path, &args.workspace, &processor)?;
+        compute_prebuilts(
+            output_path,
+            &args.workspace,
+            events_processor
+                .as_ref()
+                .context("--build-events-jsonl must be set")?,
+        )?;
+    }
+
+    if let Some(output_path) = &args.diagnose_cache_hits {
+        diagnose_cache_hits(
+            output_path,
+            execlog_processor
+                .as_ref()
+                .context("--compact-execlog must be set")?,
+        )?;
     }
 
     Ok(())
diff --git a/portage/tools/process_artifacts/src/processors/execlog.rs b/portage/tools/process_artifacts/src/processors/execlog.rs
new file mode 100644
index 0000000..e59276c
--- /dev/null
+++ b/portage/tools/process_artifacts/src/processors/execlog.rs
@@ -0,0 +1,262 @@
+// Copyright 2024 The ChromiumOS Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+use std::collections::{BTreeMap, BTreeSet};
+
+use crate::proto::spawn::{exec_log_entry, ExecLogEntry};
+use anyhow::{bail, Result};
+
+type EntryType = exec_log_entry::Type;
+
+struct ExecLogIndex<'e> {
+    entries: Vec<&'e ExecLogEntry>,
+    index: BTreeMap<i32, &'e EntryType>,
+}
+
+impl<'e, T> From<T> for ExecLogIndex<'e>
+where
+    T: IntoIterator<Item = &'e ExecLogEntry>,
+{
+    /// Constructs [`ExecLogIndex`] from an iterator of [`ExecLogEntry`].
+    fn from(iter: T) -> Self {
+        let entries: Vec<_> = iter.into_iter().collect();
+        let index = entries
+            .iter()
+            .copied()
+            .filter_map(|entry| entry.r#type.as_ref().map(|t| (entry.id, t)))
+            .collect();
+        Self { entries, index }
+    }
+}
+
+impl<'e> ExecLogIndex<'e> {
+    /// Returns raw entries.
+    pub fn entries(&self) -> impl Iterator<Item = &ExecLogEntry> {
+        self.entries.iter().copied()
+    }
+
+    /// Looks up [`ExecLogEntry`] by ID.
+    pub fn get(&self, id: i32) -> Option<&EntryType> {
+        self.index.get(&id).copied()
+    }
+}
+
+pub struct ExecLogProcessor<'e> {
+    index: ExecLogIndex<'e>,
+}
+
+impl<'e, T> From<T> for ExecLogProcessor<'e>
+where
+    T: IntoIterator<Item = &'e ExecLogEntry>,
+{
+    /// Constructs [`ExecLogIndex`] from an iterator of [`ExecLogEntry`].
+    fn from(iter: T) -> Self {
+        Self { index: iter.into() }
+    }
+}
+
+impl ExecLogProcessor<'_> {
+    /// Returns raw entries.
+    pub fn entries(&self) -> impl Iterator<Item = &ExecLogEntry> {
+        self.index.entries()
+    }
+
+    /// Finds all input sets that contain any one of the specified files, and returns their IDs.
+    pub fn intersecting_input_sets(
+        &self,
+        files: impl IntoIterator<Item = i32>,
+    ) -> Result<Vec<i32>> {
+        let files: BTreeSet<i32> = files.into_iter().collect();
+        let mut cache: BTreeMap<i32, bool> = BTreeMap::new();
+        let mut intersecting_input_sets: Vec<i32> = Vec::new();
+        for entry in self.entries() {
+            if let Some(EntryType::InputSet(_)) = &entry.r#type {
+                if self.intersects_memoized(entry.id, &files, &mut cache)? {
+                    intersecting_input_sets.push(entry.id);
+                }
+            }
+        }
+        Ok(intersecting_input_sets)
+    }
+
+    fn intersects_memoized(
+        &self,
+        input_set: i32,
+        files: &BTreeSet<i32>,
+        cache: &mut BTreeMap<i32, bool>,
+    ) -> Result<bool> {
+        if let Some(intersects) = cache.get(&input_set) {
+            return Ok(*intersects);
+        }
+        let intersects = (|| -> Result<bool> {
+            let Some(EntryType::InputSet(input_set)) = self.index.get(input_set) else {
+                bail!("Input set {input_set} not found");
+            };
+            if input_set
+                .file_ids
+                .iter()
+                .chain(input_set.directory_ids.iter())
+                .chain(input_set.unresolved_symlink_ids.iter())
+                .any(|file_id| files.contains(file_id))
+            {
+                return Ok(true);
+            }
+            for transitive_set_id in &input_set.transitive_set_ids {
+                if self.intersects_memoized(*transitive_set_id, files, cache)? {
+                    return Ok(true);
+                }
+            }
+            Ok(false)
+        })()?;
+        cache.insert(input_set, intersects);
+        Ok(intersects)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use exec_log_entry::{File, InputSet};
+
+    use super::*;
+
+    #[test]
+    fn intersecting_input_sets() -> Result<()> {
+        let entries = vec![
+            ExecLogEntry {
+                id: 1,
+                r#type: Some(EntryType::File(File {
+                    path: "x".to_string(),
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 2,
+                r#type: Some(EntryType::File(File {
+                    path: "y".to_string(),
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 11,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    file_ids: vec![1],
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 12,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    file_ids: vec![2],
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 13,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    file_ids: vec![1, 2],
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 101,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    transitive_set_ids: vec![11],
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 102,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    transitive_set_ids: vec![12],
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 103,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    transitive_set_ids: vec![11, 12],
+                    ..Default::default()
+                })),
+            },
+        ];
+        let processor = ExecLogProcessor::from(&entries);
+
+        assert_eq!(processor.intersecting_input_sets([])?, Vec::<i32>::new());
+        assert_eq!(
+            processor.intersecting_input_sets([1])?,
+            vec![11, 13, 101, 103]
+        );
+        assert_eq!(
+            processor.intersecting_input_sets([2])?,
+            vec![12, 13, 102, 103]
+        );
+        assert_eq!(
+            processor.intersecting_input_sets([1, 2])?,
+            vec![11, 12, 13, 101, 102, 103]
+        );
+
+        Ok(())
+    }
+
+    #[test]
+    fn intersecting_input_sets_deeply_nested() -> Result<()> {
+        let mut entries = vec![
+            ExecLogEntry {
+                id: 1,
+                r#type: Some(EntryType::File(File {
+                    path: "x".to_string(),
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 2,
+                r#type: Some(EntryType::File(File {
+                    path: "y".to_string(),
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 3,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    file_ids: vec![1, 2],
+                    ..Default::default()
+                })),
+            },
+            ExecLogEntry {
+                id: 4,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    file_ids: vec![2],
+                    transitive_set_ids: vec![3],
+                    ..Default::default()
+                })),
+            },
+        ];
+        for id in 5..1000 {
+            entries.push(ExecLogEntry {
+                id,
+                r#type: Some(EntryType::InputSet(InputSet {
+                    transitive_set_ids: vec![id - 2, id - 1],
+                    ..Default::default()
+                })),
+            });
+        }
+        let processor = ExecLogProcessor::from(&entries);
+
+        assert_eq!(processor.intersecting_input_sets([])?, Vec::<i32>::new());
+        assert_eq!(
+            processor.intersecting_input_sets([1])?,
+            Vec::from_iter(3..1000)
+        );
+        assert_eq!(
+            processor.intersecting_input_sets([2])?,
+            Vec::from_iter(3..1000)
+        );
+        assert_eq!(
+            processor.intersecting_input_sets([1, 2])?,
+            Vec::from_iter(3..1000)
+        );
+
+        Ok(())
+    }
+}
diff --git a/portage/tools/process_artifacts/src/processors/mod.rs b/portage/tools/process_artifacts/src/processors/mod.rs
index b441cfc..1b4f549 100644
--- a/portage/tools/process_artifacts/src/processors/mod.rs
+++ b/portage/tools/process_artifacts/src/processors/mod.rs
@@ -3,3 +3,4 @@
 // found in the LICENSE file.
 
 pub mod build_event;
+pub mod execlog;
