Skip to content

Commit

Permalink
Fix recording of events after killing time based heuristic (#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
rihafilip authored Jun 11, 2024
1 parent 2d36a73 commit f5c47de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
5 changes: 0 additions & 5 deletions rir/src/recording_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,6 @@ void recordMarkOptReasonHeuristic() {
compileReasons_.set_heuristic<MarkOptReason>();
}

void recordTypeFeedbackVersionUpdateReason(size_t version) {
RECORDER_FILTER_GUARD(compile)
compileReasons_.set_heuristic<TypeFeedbackUpdate>(version);
}

void recordPirWarmupReason(size_t invocation_count) {
RECORDER_FILTER_GUARD(compile)
compileReasons_.set_heuristic<PirWarmupReason>(invocation_count);
Expand Down
2 changes: 0 additions & 2 deletions rir/src/recording_serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ compile_reason_from_sexp(SEXP sexp) {
std::unique_ptr<rir::recording::CompileReason> reason;
if (Rf_inherits(sexp, MarkOptReason::NAME)) {
reason = std::make_unique<MarkOptReason>();
} else if (Rf_inherits(sexp, InvocationCountTimeReason::NAME)) {
reason = std::make_unique<InvocationCountTimeReason>();
} else if (Rf_inherits(sexp, PirWarmupReason::NAME)) {
reason = std::make_unique<PirWarmupReason>();
} else if (Rf_inherits(sexp, NotOptimizedReason::NAME)) {
Expand Down
11 changes: 9 additions & 2 deletions rir/src/runtime/TypeFeedback.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,18 @@ class TypeFeedback : public RirRuntimeObject<TypeFeedback, TYPEFEEDBACK_MAGIC> {
void record_callee(uint32_t idx, Function* function, SEXP callee,
bool invalidateWhenFull = false) {
callees(idx).record(function, callee, invalidateWhenFull);
REC_HOOK(recording::recordSC(callees(idx), owner_));
}

void record_test(uint32_t idx, const SEXP e) { test(idx).record(e); }
void record_test(uint32_t idx, const SEXP e) {
test(idx).record(e);
REC_HOOK(recording::recordSC(test(idx), owner_));
}

void record_type(uint32_t idx, const SEXP e) { types(idx).record(e); }
void record_type(uint32_t idx, const SEXP e) {
types(idx).record(e);
REC_HOOK(recording::recordSC(types(idx), owner_));
}

void record_type(uint32_t idx, std::function<void(ObservedValues&)> f) {
ObservedValues& slot = types(idx);
Expand Down

0 comments on commit f5c47de

Please sign in to comment.