Merge "typo: the the -> the"
diff --git a/docs/contributing/embedding.md b/docs/contributing/embedding.md
index ad3ac88..dbf6c56 100644
--- a/docs/contributing/embedding.md
+++ b/docs/contributing/embedding.md
@@ -42,7 +42,7 @@
 
 Metrics can also be registered at run time using the `RegisterMetric` and `ExtendMetricsProto` functions. These can subsequently be executed with `ComputeMetric`.
 
-WARNING: embedders should ensure that the path of any registered metric is consistent with the the name used to execute the metric and output view in the SQL.
+WARNING: embedders should ensure that the path of any registered metric is consistent with the name used to execute the metric and output view in the SQL.
 
 ### Annotations
 
diff --git a/docs/design-docs/api-and-abi.md b/docs/design-docs/api-and-abi.md
index 2c8a6b6..29f47a5 100644
--- a/docs/design-docs/api-and-abi.md
+++ b/docs/design-docs/api-and-abi.md
@@ -272,7 +272,7 @@
 [`InitializeConnectionRequest`][producer_port.proto] request to the
 service, which is the very first IPC sent after connection.
 By default, the service creates the SMB and passes back its file descriptor to
-the producer with the the [`InitializeConnectionResponse`][producer_port.proto]
+the producer with the [`InitializeConnectionResponse`][producer_port.proto]
 IPC reply. Recent versions of the service (Android R / 11) allow the FD to be
 created by the producer and passed down to the service in the request. When the
 service supports this, it acks the request setting
diff --git a/docs/quickstart/traceconv.md b/docs/quickstart/traceconv.md
index 226e5b2..83cf975 100644
--- a/docs/quickstart/traceconv.md
+++ b/docs/quickstart/traceconv.md
@@ -38,6 +38,6 @@
 
 If you just want to open a Perfetto trace with the legacy (Catapult) trace
 viewer, you can just navigate to [ui.perfetto.dev](https://ui.perfetto.dev),
-and use the the _"Open with legacy UI"_ link. This runs `traceconv` within
+and use the _"Open with legacy UI"_ link. This runs `traceconv` within
 the browser using WebAssembly and passes the converted trace seamlessly to
 chrome://tracing.
diff --git a/src/profiling/perf/event_config.cc b/src/profiling/perf/event_config.cc
index a7b6533..7b5170e 100644
--- a/src/profiling/perf/event_config.cc
+++ b/src/profiling/perf/event_config.cc
@@ -298,7 +298,7 @@
     // expected = rate * period, with a conversion of period from ms to s:
     uint64_t expected_samples_per_tick =
         1 + (sampling_frequency * read_tick_period_ms) / 1000;
-    // Double the the limit to account of actual sample rate uncertainties, as
+    // Double the limit to account of actual sample rate uncertainties, as
     // well as any other factors:
     samples_per_tick_limit = 2 * expected_samples_per_tick;
   } else {  // sampling_period
diff --git a/src/protozero/filtering/filter_bytecode_parser.h b/src/protozero/filtering/filter_bytecode_parser.h
index b2378ca..6ecbdfb 100644
--- a/src/protozero/filtering/filter_bytecode_parser.h
+++ b/src/protozero/filtering/filter_bytecode_parser.h
@@ -111,7 +111,7 @@
   std::vector<uint32_t> words_;
 
   // One entry for each message index stored in the filter plus a sentinel at
-  // the end. Maps each message index to the offset in |words_| where the the
+  // the end. Maps each message index to the offset in |words_| where the
   // Nth message start.
   // message_offset_.size() - 2 == the max message id that can be parsed.
   std::vector<uint32_t> message_offset_;
diff --git a/src/protozero/filtering/message_filter.h b/src/protozero/filtering/message_filter.h
index 37dc9b5..80ddd0e 100644
--- a/src/protozero/filtering/message_filter.h
+++ b/src/protozero/filtering/message_filter.h
@@ -130,7 +130,7 @@
   // Gets into an error state which swallows all the input and emits no output.
   void SetUnrecoverableErrorState();
 
-  // We keep track of the the nest of messages in a stack. Each StackState
+  // We keep track of the nest of messages in a stack. Each StackState
   // object corresponds to a level of nesting in the proto message structure.
   // Every time a new field of type len-delimited that has a corresponding
   // sub-message in the bytecode is encountered, a new StackState is pushed in
diff --git a/src/trace_processor/containers/bit_vector.h b/src/trace_processor/containers/bit_vector.h
index 20773dd..5f9c27a 100644
--- a/src/trace_processor/containers/bit_vector.h
+++ b/src/trace_processor/containers/bit_vector.h
@@ -491,7 +491,7 @@
       // mask: 00000000001111111
       uint64_t mask = MaskAllBitsSetUntil(idx);
 
-      // Finish up by anding the the atom with the computed msk.
+      // Finish up by and'ing the atom with the computed mask.
       return word_ & mask;
     }
 
diff --git a/src/traced/probes/filesystem/inode_file_data_source_unittest.cc b/src/traced/probes/filesystem/inode_file_data_source_unittest.cc
index edd208b..ea62a29 100644
--- a/src/traced/probes/filesystem/inode_file_data_source_unittest.cc
+++ b/src/traced/probes/filesystem/inode_file_data_source_unittest.cc
@@ -133,7 +133,7 @@
   EXPECT_CALL(*data_source, FillInodeEntry(_, buf.st_ino, Eq(value)));
 
   data_source->OnInodes({{buf.st_ino, buf.st_dev}});
-  // Expect that the found inode is not added the the LRU cache.
+  // Expect that the found inode is not added the LRU cache.
   EXPECT_THAT(cache_.Get(std::make_pair(buf.st_dev, buf.st_ino)), IsNull());
 }
 
diff --git a/src/traced/probes/ftrace/ftrace_config_muxer.h b/src/traced/probes/ftrace/ftrace_config_muxer.h
index 3965371..5aee63a 100644
--- a/src/traced/probes/ftrace/ftrace_config_muxer.h
+++ b/src/traced/probes/ftrace/ftrace_config_muxer.h
@@ -53,7 +53,7 @@
   std::vector<std::string> atrace_apps;
   std::vector<std::string> atrace_categories;
 
-  // When enabled will turn on the the kallsyms symbolizer in CpuReader.
+  // When enabled will turn on the kallsyms symbolizer in CpuReader.
   const bool symbolize_ksyms;
 };
 
diff --git a/test/trace_processor/parsing/rss_stat_mm_id_clone.py b/test/trace_processor/parsing/rss_stat_mm_id_clone.py
index 3b36d88..a12f516 100644
--- a/test/trace_processor/parsing/rss_stat_mm_id_clone.py
+++ b/test/trace_processor/parsing/rss_stat_mm_id_clone.py
@@ -81,7 +81,7 @@
 # In this packet, we check what happens to kernel threads in RSS stat.
 trace.add_ftrace_packet(1)
 
-# Emit an rss stat event for the the existing kernel thread.
+# Emit an rss stat event for the existing kernel thread.
 trace.add_rss_stat(100, tid=3, member=0, size=10, mm_id=0x2345, curr=1)
 
 # Start a new kernel thread.
diff --git a/test/trace_processor/python/api_unittest.py b/test/trace_processor/python/api_unittest.py
index 52e2c41..9feada4 100755
--- a/test/trace_processor/python/api_unittest.py
+++ b/test/trace_processor/python/api_unittest.py
@@ -20,7 +20,7 @@
 
 
 class TestQueryResultIterator(unittest.TestCase):
-  # The numbers input into cells correspond the the CellType enum values
+  # The numbers input into cells correspond the CellType enum values
   # defined under trace_processor.proto
   CELL_VARINT = ProtoFactory().CellsBatch().CELL_VARINT
   CELL_STRING = ProtoFactory().CellsBatch().CELL_STRING
diff --git a/tools/gen_amalgamated b/tools/gen_amalgamated
index bff4641..e2faa61 100755
--- a/tools/gen_amalgamated
+++ b/tools/gen_amalgamated
@@ -580,7 +580,7 @@
   args = parser.parse_args()
   targets = args.targets or default_targets
 
-  # The CHANGELOG mtime triggers the the perfetto_version.gen.h genrule. This is
+  # The CHANGELOG mtime triggers the perfetto_version.gen.h genrule. This is
   # to avoid emitting a stale version information in the remote case of somebody
   # running gen_amalgamated incrementally after having moved to another commit.
   changelog_path = os.path.join(project_root, 'CHANGELOG')
diff --git a/tools/record_android_trace b/tools/record_android_trace
index 5de8a4e..7fcffc6 100755
--- a/tools/record_android_trace
+++ b/tools/record_android_trace
@@ -107,7 +107,7 @@
   help = 'Force the use of the sideloaded binaries rather than system daemons'
   parser.add_argument('--sideload', action='store_true', help=help)
 
-  help = ('Sideload the the given binary rather than downloading it. ' +
+  help = ('Sideload the given binary rather than downloading it. ' +
           'Implies --sideload')
   parser.add_argument('--sideload-path', default=None, help=help)
 
diff --git a/ui/src/controller/track_controller.ts b/ui/src/controller/track_controller.ts
index 75ee194..b3742b3 100644
--- a/ui/src/controller/track_controller.ts
+++ b/ui/src/controller/track_controller.ts
@@ -151,7 +151,7 @@
         globals.state.frontendLocalState.visibleState.resolution;
   }
 
-  // Decides, based on the the length of the trace and the number of rows
+  // Decides, based on the length of the trace and the number of rows
   // provided whether a TrackController subclass should cache its quantized
   // data. Returns the bucket size (in ns) if caching should happen and
   // undefined otherwise.