summaryrefslogtreecommitdiff
path: root/erts/emulator/test/hibernate_SUITE.erl
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'maint'Rickard Green2021-12-131-1/+1
|\ | | | | | | | | * maint: Update copyright year
| * Update copyright yearRickard Green2021-12-131-1/+1
| |
* | erts: Support frame pointersJohn Högberg2021-05-241-3/+3
|/ | | | | | This vastly improves `perf` accuracy and makes it usable on platforms that don't support `--call-graph=lbr`, such as most cloud environments.
* otp: Remove HiPE and HiPE-related accessoriesJohn Högberg2020-11-091-6/+0
|
* jit: Use the native stack as the Erlang stackJohn Högberg2020-09-221-13/+15
| | | | | | Co-authored-by: Lukas Larsson <lukas@erlang.org> Co-authored-by: Björn Gustavsson <bjorn@erlang.org> Co-authored-by: Dan Gudmundsson <dgud@erlang.org>
* Optimize continuation pointer managementBjörn Gustavsson2019-08-221-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The BEAM instructions for calling a function don't save the continuation pointer (return address) on the stack, but to a special BEAM register called CP. It is the responsibility of the called function to save CP to the stack frame before calling other functions. In the earlier implementations of BEAM on Sparc, CP was located in a CPU register. That meant that the continuation pointer was never written to memory when calling simple functions that didn't call other functions at all or ended in a tail-call to another function. The modern BEAM no longer keeps CP in CPU register. Instead, it is kept in the `process` struct (in `p->cp`). That means the continuation pointer must be written to the memory on every call, and if the called function will call other functions, it will must read the continuation pointer from `p->cp` and store it on the stack. This commit eliminates the concept of the CP register and modifies the call instructions to directly store the continuation pointer on the stack. That makes allocation and trimming of stack frames slightly faster. A more important benefit is simplification of code that handles continuation pointers. Because all continuation pointers are now stored on the stack, the special case of handling `p->cp` disappears. Co-authored-by: John Högberg <john@erlang.org>
* Update copyright yearRaimo Niskanen2017-05-041-1/+1
|
* Fixed typos in ertsAndrew Dryga2017-02-141-1/+1
|
* update copyright-yearHenrik Nord2016-03-151-1/+1
|
* Remove ?line macrosBjörn-Egil Dahlberg2016-03-111-106/+101
|
* Eliminate use of doc and suite clausesBjörn-Egil Dahlberg2016-03-111-4/+0
| | | | Those clause are obsolete and never used by common_test.
* Eliminate use of test_server:fail/0,1Björn-Egil Dahlberg2016-03-111-10/+9
|
* Modernize use of timetrapsBjörn-Egil Dahlberg2016-03-111-30/+8
|
* Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson2016-02-171-1/+1
| | | | | | | As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
* Change license text to APLv2Bruce Yinhe2015-06-181-10/+11
|
* Update copyright yearsBjörn-Egil Dahlberg2012-08-311-1/+1
|
* Remove workarounds for hybrid and shared heaps in test suitesBjörn Gustavsson2012-05-101-8/+2
|
* Fix bug related to hibernate and HiPE (clear F_HIBERNATE_SCHED flag)Paul Guyot2011-05-211-3/+28
| | | | | | | F_HIBERNATE_SCHED flag that was introduced in b7ecdcd1ae9e11b8f75e must be cleared in hipe_mode_switch as well. Otherwise, processes running HiPE code that hibernate, wake up and then trap into a BIF will not be rescheduled.
* Merge branch 'pg/fix-hibernate-with-hipe' into devSverker Eriksson2011-03-101-4/+41
|\ | | | | | | | | | | | | | | | | | | | | | | * pg/fix-hibernate-with-hipe: Update copyright years Fix NULL-free bug in hibernate on debug emulator Fix several bugs related to hibernate/3 and HiPE Conflicts: erts/emulator/test/hibernate_SUITE.erl OTP-9125
| * Fix several bugs related to hibernate/3 and HiPEPaul Guyot2011-01-291-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes four related bugs: - calling hibernate/3 using a dynamic call would fail with badarg as hibernate/3 as a BIF was not implemented. hibernate/3 is generally provided as a Beam instruction, and code is translated to use this instruction when loaded. - calling hibernate/3 from HiPE would fail with badarg because this would call the aforementioned BIF which was not implemented. - calling hibernate/3 with some HiPE-native garbage in the process heap would randomly crash at the next garbage collect. This bug only happened in a complex, yet reproduceable scenarios, where native code calls beam code that calls hibernate/3, and the process has some garbage when being hibernated and the process generates garbage when awaken. - when entering HiPE, the process current_function can be set and be inaccurate. The fix is three folded: - hibernate_3 BIF now actually works instead of throwing a badarg. While hibernate_3 BIF was (usually) not called from BEAM, it is called from HiPE. hibernate behaviour is very close to the scheduler and this is why it is implemented as an instruction in BEAM. The fix consists in doing the actual hibernation (through the now exported erts_hibernate function) and setting the process flag to TRAP as well as the process status to P_WAITING. On BIF epilogue in both BEAM and HiPE, this status is tested on TRAP and if set, the scheduler is invoked. The i_hibernate instruction and translation code is now redundant and could be deleted. - hibernation now also empties the HiPE native stack, with a new function hipe_empty_nstack provided by Mikael Pettersson. - when entering HiPE through hipe_mode_switch, p->current is cleared, as suggested by Mikael Pettersson. p->current normally hold a pointer to the {M,F,A} of the current function if it exists. When hibernating, it is set to {erlang,hibernate,3}, and all stdlib hibernate tests (gen_server_SUITE:hibernate/1, proc_lib_suite:hibernate/1, etc.) actually rely on this information. Clearing p->current fixes the tests and avoids the surprise one might have when querying the process info of a process that hibernated and woke up in a native function. Non-regression tests are provided, a test for the dynamic call as well as a Makefile-handled duplication of the hibernate_SUITE into hibernate_native_SUITE for the HiPE case.
* | Rename Suite Callback to Common Test HookLukas Larsson2011-02-171-1/+1
| |
* | Fix formatting for emulatorLukas Larsson2011-02-171-6/+8
| |
* | Add init_per_suite and end_per_suiteLukas Larsson2011-02-171-1/+7
| |
* | Add ts_install_scb to suite/0Lukas Larsson2011-02-171-1/+3
| |
* | Update emulator tests to conform with common_test standardLukas Larsson2011-02-171-5/+16
|/
* The R13B03 release.OTP_R13B03Erlang/OTP2009-11-201-0/+353