)]}'
{
  "commit": "899ca66f8bd513f614bb20bda4d548c2f04677d6",
  "tree": "01ce3a984a16f34cd171a0014b74b5b524f656bf",
  "parents": [
    "81c1f45c99b5cd2ce562737cd4d06f02a641b75d"
  ],
  "author": {
    "name": "Safayat Ullah",
    "email": "safayat@google.com",
    "time": "Mon Nov 23 13:06:12 2026 +0000"
  },
  "committer": {
    "name": "Safayat Ullah",
    "email": "safayat@google.com",
    "time": "Tue Dec 01 20:52:33 2026 +0000"
  },
  "message": "profiling: unwind: add proc/pid/maps parser\n\nAdd /proc/\u003cpid\u003e/maps parser mirroring Android\u0027s `libprocinfo`\n(`include/procinfo/process_map.h`).\n\nWhy:\n- Single header without Android-specific library dependencies once\n  adapted to Perfetto base helpers.\n- `libunwindstack` already uses this exact parser, so there is no\n  behavioral change.\n- Writing/maintaining a new parser or pulling in another library was\n  considered, but scoped out in favor of this stable code that has\n  seen minimal change over the years.\n\nChanges from the original file:\n- Replaced `#pragma once` with an `#ifndef` include guard and moved\n  into `namespace perfetto::profiling`.\n- Replaced `\u003candroid-base/file.h\u003e` / `android::base::ReadFileToString`\n  with `perfetto/ext/base/file_utils.h` / `base::ReadFile`.\n- Replaced glibc/bionic-only `TEMP_FAILURE_RETRY` with `PERFETTO_EINTR`\n  from `perfetto/ext/base/utils.h`.\n- Added explicit standard headers (`\u003cctype.h\u003e`, `\u003cfcntl.h\u003e`,\n  `\u003cstdint.h\u003e`, `\u003cunistd.h\u003e`).\n- Fixed `-Weverything -Werror` / clang-tidy warnings (`MapInfo` ctor\n  parameter shadowing, redundant copy ctor, `typedef` -\u003e `using`,\n  `unsigned char` cast for `isxdigit`, explicit `uint16_t` / `ino_t` /\n  `size_t` casts, `content.data()`).\n- Formatted with `clang-format` to match Perfetto style.\n- Added unit tests in `src/profiling/unwind/proc_pid_maps_unittest.cc`.\n\nAlternatives considered:\n- `PROCMAP_QUERY` ioctl: Works on Linux \u003e\u003d 6.11, so it does not cover\n  older kernels.\n- `elfutils` (`libdwfl`): GPL/LGPL licensed.\n- `nongnu libunwind`: Has internal `/proc/\u003cpid\u003e/maps` parsing, not\n  exposed as a public API.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0579aee42313119bcf3cab0998375f2fa468a794",
      "old_mode": 33188,
      "old_path": "Android.bp",
      "new_id": "824e447984af44b18132e2a86e507d5712c8f77a",
      "new_mode": 33188,
      "new_path": "Android.bp"
    },
    {
      "type": "modify",
      "old_id": "0b0c3fbe227dbc39633f796768975073db563ce9",
      "old_mode": 33188,
      "old_path": "gn/perfetto_unittests.gni",
      "new_id": "8abcf13de685678944ba2012f63b83dd7a4c3a45",
      "new_mode": 33188,
      "new_path": "gn/perfetto_unittests.gni"
    },
    {
      "type": "modify",
      "old_id": "c9ac2617db77024eeb48905d44eb4bb1732b8680",
      "old_mode": 33188,
      "old_path": "src/profiling/unwind/BUILD.gn",
      "new_id": "35e0de2ab7387c96cad539cdd5bc2f51f6a763a6",
      "new_mode": 33188,
      "new_path": "src/profiling/unwind/BUILD.gn"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "00251bef16fb92e5eedc2970c246b054524d5f4d",
      "new_mode": 33188,
      "new_path": "src/profiling/unwind/proc_pid_maps.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3a386a588cff24a4f1a70a805c476d787dd6892e",
      "new_mode": 33188,
      "new_path": "src/profiling/unwind/proc_pid_maps_unittest.cc"
    }
  ]
}
