Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dead code from cputime tracking #12

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions ext/mini_racer_extension/mini_racer_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ typedef struct {
Persistent<Context>* context;
Global<Object> ruby_error_prototype;
Global<Function> capture_stack_trace;
std::atomic<unsigned long> cpu_nanos;
struct timespec cpu_time_reference;
} ContextInfo;

typedef struct {
Expand Down Expand Up @@ -508,10 +506,6 @@ nogvl_context_eval(void* arg) {
StackCounter::SetMax(isolate, eval_params->marshal_stackdepth);
}

int time_status = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &eval_params->context_info->cpu_time_reference);
assert(time_status == 0); // can only hit on EOVERFLOW (which shouldn't happen) and EINVAL (kernel too old; don't care right now)
eval_params->context_info->cpu_nanos.store(0L, std::memory_order_relaxed);

maybe_value = parsed_script.ToLocalChecked()->Run(context);
}

Expand Down
Loading