Skip to content

Commit 145836c

Browse files
committed
try: comment out all USDTs
1 parent eb88d06 commit 145836c

File tree

9 files changed

+78
-78
lines changed

9 files changed

+78
-78
lines changed

nova_vm/src/ecmascript/builtins/builtin_constructor.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ impl<'a> FunctionInternalProperties<'a> for BuiltinConstructorFunction<'a> {
199199
new_target: Function,
200200
gc: GcScope<'gc, '_>,
201201
) -> JsResult<'gc, Object<'gc>> {
202-
let mut id = 0;
203-
ndt::builtin_constructor_start!(|| {
204-
id = create_id(agent, self);
205-
let name = self.get_name(agent).to_string_lossy(agent);
206-
(name, id)
207-
});
202+
// let mut id = 0;
203+
// ndt::builtin_constructor_start!(|| {
204+
// id = create_id(agent, self);
205+
// let name = self.get_name(agent).to_string_lossy(agent);
206+
// (name, id)
207+
// });
208208
// 1. Return ? BuiltinCallOrConstruct(F, uninitialized, argumentsList, newTarget).
209209
let result = builtin_call_or_construct(agent, self, arguments_list, new_target, gc);
210-
ndt::builtin_constructor_done!(|| id);
210+
// ndt::builtin_constructor_done!(|| id);
211211
result
212212
}
213213
}

nova_vm/src/ecmascript/builtins/builtin_function.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -604,16 +604,16 @@ impl<'a> FunctionInternalProperties<'a> for BuiltinFunction<'a> {
604604
arguments_list: ArgumentsList,
605605
gc: GcScope<'gc, '_>,
606606
) -> JsResult<'gc, Value<'gc>> {
607-
let mut id = 0;
608-
ndt::builtin_call_start!(|| {
609-
let args = create_name_and_id(agent, self);
610-
id = args.1;
611-
args
612-
});
607+
// let mut id = 0;
608+
// ndt::builtin_call_start!(|| {
609+
// let args = create_name_and_id(agent, self);
610+
// id = args.1;
611+
// args
612+
// });
613613
// 1. Return ? BuiltinCallOrConstruct(F, thisArgument, argumentsList, undefined).
614614
let result =
615615
builtin_call_or_construct(agent, self, Some(this_argument), arguments_list, None, gc);
616-
ndt::builtin_call_done!(|| id);
616+
// ndt::builtin_call_done!(|| id);
617617
result
618618
}
619619

@@ -630,17 +630,17 @@ impl<'a> FunctionInternalProperties<'a> for BuiltinFunction<'a> {
630630
new_target: Function,
631631
gc: GcScope<'gc, '_>,
632632
) -> JsResult<'gc, Object<'gc>> {
633-
let mut id = 0;
634-
ndt::builtin_constructor_start!(|| {
635-
let args = create_name_and_id(agent, self);
636-
id = args.1;
637-
args
638-
});
633+
// let mut id = 0;
634+
// ndt::builtin_constructor_start!(|| {
635+
// let args = create_name_and_id(agent, self);
636+
// id = args.1;
637+
// args
638+
// });
639639
// 1. Return ? BuiltinCallOrConstruct(F, uninitialized, argumentsList, newTarget).
640640
let result =
641641
builtin_call_or_construct(agent, self, None, arguments_list, Some(new_target), gc)
642642
.map(|result| result.try_into().unwrap());
643-
ndt::builtin_constructor_done!(|| id);
643+
// ndt::builtin_constructor_done!(|| id);
644644
result
645645
}
646646
}

nova_vm/src/ecmascript/builtins/ecmascript_function.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,12 @@ impl<'a> FunctionInternalProperties<'a> for ECMAScriptFunction<'a> {
335335
gc: GcScope<'gc, '_>,
336336
) -> JsResult<'gc, Value<'gc>> {
337337
let f = self.bind(gc.nogc());
338-
let mut id = 0;
339-
ndt::javascript_call_start!(|| {
340-
let args = create_name_and_id(agent, f);
341-
id = args.1;
342-
args
343-
});
338+
// let mut id = 0;
339+
// ndt::javascript_call_start!(|| {
340+
// let args = create_name_and_id(agent, f);
341+
// id = args.1;
342+
// args
343+
// });
344344

345345
let arguments_list = arguments_list.bind(gc.nogc());
346346

@@ -386,7 +386,7 @@ impl<'a> FunctionInternalProperties<'a> for ECMAScriptFunction<'a> {
386386
// 7. Remove calleeContext from the execution context stack and restore callerContext as the running execution context.
387387
// NOTE: calleeContext must not be destroyed if it is suspended and retained for later resumption by an accessible Generator.
388388
let _callee_context = agent.pop_execution_context();
389-
ndt::javascript_call_done!(|| id);
389+
// ndt::javascript_call_done!(|| id);
390390
// 8. If result is a return completion, return result.[[Value]].
391391
// 9. ReturnIfAbrupt(result).
392392
// 10. Return undefined.
@@ -401,12 +401,12 @@ impl<'a> FunctionInternalProperties<'a> for ECMAScriptFunction<'a> {
401401
mut gc: GcScope<'gc, '_>,
402402
) -> JsResult<'gc, Object<'gc>> {
403403
let mut f = self.bind(gc.nogc());
404-
let mut id = 0;
405-
ndt::javascript_constructor_start!(|| {
406-
let args = create_name_and_id(agent, f);
407-
id = args.1;
408-
args
409-
});
404+
// let mut id = 0;
405+
// ndt::javascript_constructor_start!(|| {
406+
// let args = create_name_and_id(agent, f);
407+
// id = args.1;
408+
// args
409+
// });
410410

411411
let mut new_target = new_target.bind(gc.nogc());
412412
let mut arguments_list = arguments.bind(gc.nogc());
@@ -530,7 +530,7 @@ impl<'a> FunctionInternalProperties<'a> for ECMAScriptFunction<'a> {
530530
// 14. Return thisBinding.
531531
Ok(this_binding)
532532
};
533-
ndt::javascript_constructor_done!(|| id);
533+
// ndt::javascript_constructor_done!(|| id);
534534
result
535535
}
536536
}

nova_vm/src/ecmascript/builtins/global_object.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ pub(crate) fn perform_eval<'gc>(
188188
.ensure_can_compile_strings(&mut agent[eval_realm], gc.nogc())
189189
.unbind()?;
190190

191-
let mut id = 0;
192-
ndt::eval_evaluation_start!(|| {
193-
id = create_id(x);
194-
id
195-
});
191+
// let mut id = 0;
192+
// ndt::eval_evaluation_start!(|| {
193+
// id = create_id(x);
194+
// id
195+
// });
196196

197197
// 6. Let inFunction be false.
198198
let mut _in_function = false;
@@ -269,7 +269,7 @@ pub(crate) fn perform_eval<'gc>(
269269
"Invalid eval source text: {}",
270270
errors.first().unwrap().message
271271
);
272-
ndt::eval_evaluation_done!(|| id);
272+
// ndt::eval_evaluation_done!(|| id);
273273
return Err(agent.throw_exception(ExceptionType::SyntaxError, message, gc.into_nogc()));
274274
}
275275
};
@@ -287,7 +287,7 @@ pub(crate) fn perform_eval<'gc>(
287287
// SAFETY: SourceCode was just parsed and found empty; even if it had
288288
// been executed, it would do nothing.
289289
unsafe { source_code.manually_drop(agent) };
290-
ndt::eval_evaluation_done!(|| id);
290+
// ndt::eval_evaluation_done!(|| id);
291291
return Ok(empty_result.unbind());
292292
}
293293

@@ -432,7 +432,7 @@ pub(crate) fn perform_eval<'gc>(
432432
// TODO:
433433
// 32. Resume the context that is now on the top of the execution context stack as the running execution context.
434434

435-
ndt::eval_evaluation_done!(|| id);
435+
// ndt::eval_evaluation_done!(|| id);
436436

437437
// 33. Return ? result.
438438
result

nova_vm/src/ecmascript/execution/agent.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,11 @@ impl Job {
251251
}
252252

253253
pub fn run<'a>(self, agent: &mut Agent, gc: GcScope<'a, '_>) -> JsResult<'a, ()> {
254-
let mut id = 0;
255-
ndt::job_evaluation_start!(|| {
256-
id = core::ptr::from_ref(&self).addr() as u64;
257-
id
258-
});
254+
// let mut id = 0;
255+
// ndt::job_evaluation_start!(|| {
256+
// id = core::ptr::from_ref(&self).addr() as u64;
257+
// id
258+
// });
259259
let mut pushed_context = false;
260260
if let Some(realm) = self.realm
261261
&& agent.current_realm(gc.nogc()) != realm
@@ -278,7 +278,7 @@ impl Job {
278278
agent.execution_context_stack.pop();
279279
}
280280

281-
ndt::job_evaluation_done!(|| id);
281+
// ndt::job_evaluation_done!(|| id);
282282

283283
result
284284
}

nova_vm/src/ecmascript/scripts_and_modules/module/module_semantics/source_text_module_records.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,11 +1475,11 @@ impl CyclicModuleMethods for SourceTextModule<'_> {
14751475
let module = self.bind(gc.nogc());
14761476
let capability = capability.bind(gc.nogc());
14771477

1478-
let mut id = 0;
1479-
ndt::module_evaluation_start!(|| {
1480-
id = create_id(agent, module);
1481-
id
1482-
});
1478+
// let mut id = 0;
1479+
// ndt::module_evaluation_start!(|| {
1480+
// id = create_id(agent, module);
1481+
// id
1482+
// });
14831483

14841484
// 0. Bind module environment.
14851485
// Note: this is a custom step that enables certain optimisations of
@@ -1554,7 +1554,7 @@ impl CyclicModuleMethods for SourceTextModule<'_> {
15541554
Ok(())
15551555
};
15561556

1557-
ndt::module_evaluation_done!(|| id);
1557+
// ndt::module_evaluation_done!(|| id);
15581558

15591559
// 11. Return unused.
15601560
result

nova_vm/src/ecmascript/scripts_and_modules/script.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ pub fn script_evaluation<'a>(
470470
// running execution context.
471471
// NOTE: This is done automatically.
472472

473-
ndt::script_evaluation_done!(|| id);
473+
// ndt::script_evaluation_done!(|| id);
474474

475475
// 17. Return ? result.
476476
result

nova_vm/src/heap/heap_gc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ use crate::{
8989
};
9090

9191
pub fn heap_gc(agent: &mut Agent, root_realms: &mut [Option<Realm<'static>>], gc: GcScope) {
92-
ndt::gc_start!(|| ());
92+
// ndt::gc_start!(|| ());
9393

9494
let mut bits = HeapBits::new(&agent.heap);
9595
let mut queues = WorkQueues::new(&agent.heap);
@@ -1376,7 +1376,7 @@ pub fn heap_gc(agent: &mut Agent, root_realms: &mut [Option<Realm<'static>>], gc
13761376
}
13771377

13781378
sweep(agent, &bits, root_realms, gc);
1379-
ndt::gc_done!(|| ());
1379+
// ndt::gc_done!(|| ());
13801380
}
13811381

13821382
fn sweep(

nova_vm/src/lib.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ pub use small_string::SmallString;
1515
/// DTrace / SystemTap USDT probes in Nova VM.
1616
#[usdt::provider(provider = "nova_vm")]
1717
mod ndt {
18-
// Start probes in alphabetical order.
19-
fn builtin_call_start(name: &str, id: u64) {}
20-
fn builtin_constructor_start(name: &str, id: u64) {}
21-
fn eval_evaluation_start(id: u64) {}
22-
fn gc_start() {}
23-
fn javascript_call_start(name: &str, id: u64) {}
24-
fn javascript_constructor_start(name: &str, id: u64) {}
25-
fn job_evaluation_start(id: u64) {}
26-
fn module_evaluation_start(id: u64) {}
27-
fn script_evaluation_start(id: u64) {}
18+
// // Start probes in alphabetical order.
19+
// fn builtin_call_start(name: &str, id: u64) {}
20+
// fn builtin_constructor_start(name: &str, id: u64) {}
21+
// fn eval_evaluation_start(id: u64) {}
22+
// fn gc_start() {}
23+
// fn javascript_call_start(name: &str, id: u64) {}
24+
// fn javascript_constructor_start(name: &str, id: u64) {}
25+
// fn job_evaluation_start(id: u64) {}
26+
// fn module_evaluation_start(id: u64) {}
27+
// fn script_evaluation_start(id: u64) {}
2828

29-
// Done probes in alphabetical order.
30-
fn builtin_call_done(id: u64) {}
31-
fn builtin_constructor_done(id: u64) {}
32-
fn eval_evaluation_done(id: u64) {}
33-
fn gc_done() {}
34-
fn javascript_constructor_done(id: u64) {}
35-
fn javascript_call_done(id: u64) {}
36-
fn job_evaluation_done(id: u64) {}
37-
fn module_evaluation_done(id: u64) {}
38-
fn script_evaluation_done(id: u64) {}
29+
// // Done probes in alphabetical order.
30+
// fn builtin_call_done(id: u64) {}
31+
// fn builtin_constructor_done(id: u64) {}
32+
// fn eval_evaluation_done(id: u64) {}
33+
// fn gc_done() {}
34+
// fn javascript_constructor_done(id: u64) {}
35+
// fn javascript_call_done(id: u64) {}
36+
// fn job_evaluation_done(id: u64) {}
37+
// fn module_evaluation_done(id: u64) {}
38+
// fn script_evaluation_done(id: u64) {}
3939
}
4040

4141
// Expose the USDT probe registering function. In Linux this is a no-op but it

0 commit comments

Comments
 (0)