diff --git a/README.md b/README.md
index a8ac0dc80..9abb848e2 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ magic-trace:
You use it like [`perf`](https://en.wikipedia.org/wiki/Perf_(Linux)): point it to a process and off it goes. The key difference from `perf` is that instead of sampling call stacks throughout time, magic-trace uses [Intel Processor Trace](https://man7.org/linux/man-pages/man1/perf-intel-pt.1.html) to snapshot a ring buffer of *all control flow* leading up to a chosen point in time[^1]. Then, you can explore an interactive timeline of what happened.
-You can point magic-trace at a function such that when your application calls it, magic-trace takes a snapshot. Alternatively, attach it to a running process and detatch it with Ctrl+C, to see a trace of an arbitrary point in your program.
+You can point magic-trace at a function such that when your application calls it, magic-trace takes a snapshot. Alternatively, attach it to a running process and detach it with Ctrl+C, to see a trace of an arbitrary point in your program.
[^1]: `perf` can do this too, but that's not how most people use it. In fact, if you peek under the hood you'll see that magic-trace uses `perf` to drive Intel PT.
diff --git a/core/perf_map.mli b/core/perf_map.mli
index 7f32967b0..298b8d5db 100644
--- a/core/perf_map.mli
+++ b/core/perf_map.mli
@@ -1,7 +1,7 @@
open! Core
open! Async
-(* JITed lanaguages like java and javascript can write perf map files which provide a mapping of
+(* JITed languages like java and javascript can write perf map files which provide a mapping of
address to symbol name.
They're documented here:
diff --git a/core/trace_filter.ml b/core/trace_filter.ml
index 140753172..f5d39e8c6 100644
--- a/core/trace_filter.ml
+++ b/core/trace_filter.ml
@@ -32,6 +32,6 @@ let param =
(optional Unevaluated.arg_type)
~doc:
"_ [-filter \"( )\"] restricts the output of magic-trace to events \
- ocurring between consecutive occurences of START and STOP. If either function is \
+ occurring between consecutive occurrences of START and STOP. If either function is \
not called in the trace, no output will be produced."
;;
diff --git a/src/perf_tool_backend.ml b/src/perf_tool_backend.ml
index 6b92c9d25..7262c4642 100644
--- a/src/perf_tool_backend.ml
+++ b/src/perf_tool_backend.ml
@@ -248,7 +248,7 @@ module Recording = struct
"Warning: magic-trace will only be able to snapshot when magic-trace is \
Ctrl+C'd, not when the application it's running ends. If that application \
ends before magic-trace can snapshot it, the resulting trace will be empty. \
- The ability to snapshot when an application teminates was added to perf's \
+ The ability to snapshot when an application terminates was added to perf's \
userspace tools in version 5.4. For more information, see:\n\
https://github.com/janestreet/magic-trace/wiki/Supported-platforms,-programming-languages,-and-runtimes#supported-perf-versions\n\
%!"
diff --git a/src/pow2_pages.mli b/src/pow2_pages.mli
index bb3796a74..599d67252 100644
--- a/src/pow2_pages.mli
+++ b/src/pow2_pages.mli
@@ -1,6 +1,6 @@
open! Core
-(* Like [Byte_units.t], but must represent a power of 2 number of pages. magic-trace usees these to
+(* Like [Byte_units.t], but must represent a power of 2 number of pages. magic-trace uses these to
represent perf's "auxtrace mmap size" (grep for that string in
https://man7.org/linux/man-pages/man1/perf-intel-pt.1.html). *)
type t [@@deriving sexp_of]
diff --git a/src/trace_writer.ml b/src/trace_writer.ml
index 251ed8b79..e46f9847f 100644
--- a/src/trace_writer.ml
+++ b/src/trace_writer.ml
@@ -812,7 +812,7 @@ end = struct
| Pushtrap ->
(* CR-someday tbrindus: maybe we should have [Callstack.t] know about the
concept of trap handlers, and have e.g. [Callstack.{pushtrap,poptrap}]
- insert markers into an auxilliary data structure.
+ insert markers into an auxiliary data structure.
Then we could have operations like "close all frames until the last
trap", and enforce invariants like "you can't [ret] past a trap without
@@ -961,7 +961,7 @@ let warn_decode_error ~instruction_pointer ~message =
[%string "'%{message}' @ IP %{instruction_pointer#Int64.Hex}."])
;;
-(* Write perf_events into a file as a Fuschia trace (stack events). Events should be
+(* Write perf_events into a file as a Fuchsia trace (stack events). Events should be
collected with --itrace=be or cre, and -F pid,tid,time,flags,addr,sym,symoff as per
the constants defined above. *)
let write_event (T t) ?events_writer event =
diff --git a/src/trace_writer.mli b/src/trace_writer.mli
index 0e00afa16..7859f2e69 100644
--- a/src/trace_writer.mli
+++ b/src/trace_writer.mli
@@ -66,7 +66,7 @@ val write_event
-> Event.With_write_info.t
-> unit
-(** Updates interal data structures when trace ends. If [to_time] is passed, will
+(** Updates internal data structures when trace ends. If [to_time] is passed, will
shift to new start time which is useful when writing out multiple snapshots
from perf. *)
val end_of_trace : ?to_time:Time_ns.Span.t -> t -> unit
diff --git a/test/test.ml b/test/test.ml
index 1ead3d827..9d6001d85 100644
--- a/test/test.ml
+++ b/test/test.ml
@@ -618,7 +618,7 @@ let%expect_test "time batch spreading" =
return ()
;;
-let%expect_test "enqueing events at start" =
+let%expect_test "enqueuing events at start" =
let%bind.With _dirname = Expect_test_helpers_async.within_temp_dir in
let events =
Trace_helpers.(
diff --git a/vendor/tracing/src/parser.ml b/vendor/tracing/src/parser.ml
index 47cc994d0..717bc8450 100644
--- a/vendor/tracing/src/parser.ml
+++ b/vendor/tracing/src/parser.ml
@@ -438,7 +438,7 @@ let parse_event_record t =
None
;;
-(* This function advances through the trace until it finds a Fuschia record matching one
+(* This function advances through the trace until it finds a Fuchsia record matching one
of the records types defined in [Record.t]. *)
let rec parse_until_next_external_record t =
if Iobuf.length t.iobuf < 8 then raise End_of_file;
diff --git a/vendor/tracing/src/queue_to_spans.mli b/vendor/tracing/src/queue_to_spans.mli
index 203ecafbd..82151054c 100644
--- a/vendor/tracing/src/queue_to_spans.mli
+++ b/vendor/tracing/src/queue_to_spans.mli
@@ -3,7 +3,7 @@
This module lets you guess a start time for events using the simple property that in a
single-threaded system an event can't start processing until the later of when it
- arrives and when you finished processing the preceeding event to be sent out. *)
+ arrives and when you finished processing the preceding event to be sent out. *)
open! Core
diff --git a/vendor/tracing/zero/writer.ml b/vendor/tracing/zero/writer.ml
index e088c167b..73e6e0f1d 100644
--- a/vendor/tracing/zero/writer.ml
+++ b/vendor/tracing/zero/writer.ml
@@ -27,7 +27,7 @@ module Header_template = struct
(* Because of the two bitfields for total size and argument count, we can effectively
treat the full [Header_template] as the sum of integers representing the arguments
- we've comitted to. We can subtract integers representing those individual arguments
+ we've committed to. We can subtract integers representing those individual arguments
to remove them from the template, and if we reach zero then we've subtracted
compatible arguments. Except for issues involving overflow between the two fields,
which are unlikely to happen accidentally in practice, and this is only used by
diff --git a/vendor/tracing/zero/writer.mli b/vendor/tracing/zero/writer.mli
index 36da5c9e2..923287cd7 100644
--- a/vendor/tracing/zero/writer.mli
+++ b/vendor/tracing/zero/writer.mli
@@ -44,7 +44,7 @@ val max_interned_string_length : int
val intern_string : t -> string -> String_id.t
(** This interns a string while re-using a set of 100 reserved string IDs (by default, the
- number can be overriden at writer creation). Setting the string in a slot overwrites
+ number can be overridden at writer creation). Setting the string in a slot overwrites
what was previously in that slot so any further events written in the trace see the new
value. This allows arbitrarily many unique strings to be used in a trace, unlike
[intern_string].*)
@@ -99,7 +99,7 @@ module Arg_types : sig
end
(** Most event writer functions take a common set of arguments including a commitment to
- what event arguments will be added ([arg_types]), a thread the event occured on, a
+ what event arguments will be added ([arg_types]), a thread the event occurred on, a
[category] which is an arbitrary string classifying the event visible in UIs and
potentially used for filtering, a [name] that's the main label for the event, and a
timestamp in "ticks" which defaults to nanoseconds since the start of the trace, but
@@ -220,7 +220,7 @@ module Expert : sig
using the usual [write_*] functions, saving about 6ns per event.
The only caller-visible check omission should be that it doesn't check the
- corectness of arguments, which can result in invalid trace files if the arguments
+ correctness of arguments, which can result in invalid trace files if the arguments
written don't match the header. Users of this function must use
[Write_arg_unchecked] because it doesn't set the necessary state for checking. *)
val write_from_header_with_tsc : t -> header:header -> unit