Skip to content

Commit c98530f

Browse files
authored
flambda-backend: Semaphore without probes: dummy notes (#142)
* Allow [%probe_is_enabled name] without a [%probe name ..] in the same compilation unit * Refactor probes type in emit.mlp (amd64) * Emit dummy probes * Update version of probe notes * Address review comments * Make probe handler optional to handle dummy probes nicely.
1 parent c9b6a04 commit c98530f

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

typing/typecore.ml

-10
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ type error =
124124
| Probe_format
125125
| Probe_name_too_long of string
126126
| Probe_name_format of string
127-
| Probe_name_undefined of string
128127
| Probe_is_enabled_format
129128
| Literal_overflow of string
130129
| Unknown_literal of string * char
@@ -3753,10 +3752,6 @@ and type_expect_
37533752
_ } ,
37543753
_)}]) ->
37553754
check_probe_name name name_loc env;
3756-
add_delayed_check
3757-
(fun () ->
3758-
if not (Env.has_probe name) then
3759-
raise(Error(name_loc, env, (Probe_name_undefined name))));
37603755
rue {
37613756
exp_desc = Texp_probe_is_enabled {name};
37623757
exp_loc = loc; exp_extra = [];
@@ -5606,11 +5601,6 @@ let report_error ~loc env = function
56065601
Probe names may only contain alphanumeric characters or \
56075602
underscores."
56085603
name
5609-
| Probe_name_undefined name ->
5610-
Location.errorf ~loc
5611-
"Undefined probe name `%s' used in %%probe_is_enabled. \
5612-
Not found [%%probe \"%s\" ...] in the same compilation unit."
5613-
name name
56145604
| Probe_format ->
56155605
Location.errorf ~loc
56165606
"Probe points must consist of a name, as a string \

typing/typecore.mli

-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ type error =
181181
| Probe_format
182182
| Probe_name_too_long of string
183183
| Probe_name_format of string
184-
| Probe_name_undefined of string
185184
(* CR-soon mshinwell: Use an inlined record *)
186185
| Probe_is_enabled_format
187186
| Literal_overflow of string

0 commit comments

Comments
 (0)