diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2023-04-04 12:58:56 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2023-04-04 12:59:14 -0700 |
commit | 8525603c72e22c90aa423431684042af66d1d100 (patch) | |
tree | 0271d7007e863e05af5812255fb993351117ca12 /process.c | |
parent | e5de0fe108f665c8df3d23494e2fff786f6d54a4 (diff) | |
download | ruby-8525603c72e22c90aa423431684042af66d1d100.tar.gz |
Revert "Fix transient heap mode"
This reverts commit 87253d047ce35e7836b6f97edbb4f819879a3b25.
Revert "Implement `Process.warmup`"
This reverts commit ba6ccd871442f55080bffd53e33678c0726787d2.
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 34 |
1 files changed, 0 insertions, 34 deletions
@@ -115,7 +115,6 @@ int initgroups(const char *, rb_gid_t); #include "ruby/thread.h" #include "ruby/util.h" #include "vm_core.h" -#include "vm_sync.h" #include "ruby/ractor.h" /* define system APIs */ @@ -8511,37 +8510,6 @@ static VALUE rb_mProcUID; static VALUE rb_mProcGID; static VALUE rb_mProcID_Syscall; -/* - * call-seq: - * Process.warmup -> true - * - * Notify the Ruby virtual machine that the boot sequence is finished, - * and that now is a good time to optimize the application. This is useful - * for long running applications. - * - * This method is expected to be called at the end of the application boot. - * If the application is deployed using a pre-forking model, +Process.warmup+ - * should be called in the original process before the first fork. - * - * The actual optimizations performed are entirely implementation specific - * and may change in the future without notice. - * - * On CRuby, +Process.warmup+: - * - * * Perform a major GC. - * * Compacts the heap. - * * Promotes all surviving objects to the old generation. - */ - -static VALUE -proc_warmup(VALUE _) -{ - RB_VM_LOCK_ENTER(); - rb_gc_prepare_heap(); - RB_VM_LOCK_LEAVE(); - return Qtrue; -} - /* * Document-module: Process @@ -8659,8 +8627,6 @@ InitVM_process(void) rb_define_module_function(rb_mProcess, "getpriority", proc_getpriority, 2); rb_define_module_function(rb_mProcess, "setpriority", proc_setpriority, 3); - rb_define_module_function(rb_mProcess, "warmup", proc_warmup, 0); - #ifdef HAVE_GETPRIORITY /* see Process.setpriority */ rb_define_const(rb_mProcess, "PRIO_PROCESS", INT2FIX(PRIO_PROCESS)); |