@@ -474,7 +474,7 @@ static void handle_exception_append_bt(std::string& errorMsg,
474
474
}
475
475
}
476
476
477
- void bump_counter_and_rethrow (bool isPsp) {
477
+ void bump_counter_and_rethrow (bool isPsp, ExecutionContext* context ) {
478
478
try {
479
479
throw ;
480
480
} catch (const RequestTimeoutException&) {
@@ -489,6 +489,7 @@ void bump_counter_and_rethrow(bool isPsp) {
489
489
requestTimeoutCounter->addValue (1 );
490
490
ServerStats::Log (" request.timed_out.non_psp" , 1 );
491
491
}
492
+ context->markTimedOut ();
492
493
throw ;
493
494
} catch (const RequestCPUTimeoutException&) {
494
495
if (isPsp) {
@@ -502,6 +503,7 @@ void bump_counter_and_rethrow(bool isPsp) {
502
503
requestCPUTimeoutCounter->addValue (1 );
503
504
ServerStats::Log (" request.cpu_timed_out.non_psp" , 1 );
504
505
}
506
+ context->markTimedOut ();
505
507
throw ;
506
508
} catch (const RequestMemoryExceededException&) {
507
509
if (isPsp) {
@@ -533,11 +535,10 @@ void bump_counter_and_rethrow(bool isPsp) {
533
535
StructuredLogEntry entry;
534
536
entry.setInt (" mem_used" , e.m_usedBytes );
535
537
entry.setInt (" is_psp" , static_cast <int >(isPsp));
536
- if (g_context) {
537
- entry.setStr (" url" , g_context->getRequestUrl ());
538
- }
538
+ entry.setStr (" url" , context->getRequestUrl ());
539
539
StructuredLog::log (" hhvm_oom_killed" , entry);
540
540
}
541
+ context->markOOMKilled ();
541
542
throw ;
542
543
}
543
544
}
@@ -557,7 +558,7 @@ static void handle_exception_helper(bool& ret,
557
558
};
558
559
559
560
try {
560
- bump_counter_and_rethrow (false /* isPsp */ );
561
+ bump_counter_and_rethrow (false /* isPsp */ , context );
561
562
} catch (const Eval::DebuggerException&) {
562
563
throw ;
563
564
} catch (const ExitException& e) {
0 commit comments