aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_info.c
AgeCommit message (Collapse)Author
2013-01-16UTF-8 support for distributionRickard Green
2012-12-07Merge branch 'rickard/port-optimizations/OTP-10336' into ↵Rickard Green
rickard/r16/port-optimizations/OTP-10336 * rickard/port-optimizations/OTP-10336: Change annotate level for emacs-22 in cerl Update etp-commands Add documentation on communication in Erlang Add support for busy port message queue Add driver callback epilogue Implement true asynchronous signaling between processes and ports Add erl_drv_[send|output]_term Move busy port flag Use rwlock for driver list Optimize management of port tasks Improve configuration of process and port tables Remove R9 compatibility features Use ptab functionality also for ports Prepare for use of ptab functionality also for ports Atomic port state Generalize process table implementation Implement functionality for delaying thread progress from unmanaged threads Conflicts: erts/doc/src/erl_driver.xml erts/doc/src/erlang.xml erts/emulator/beam/beam_bif_load.c erts/emulator/beam/beam_bp.c erts/emulator/beam/beam_emu.c erts/emulator/beam/bif.c erts/emulator/beam/copy.c erts/emulator/beam/erl_alloc.c erts/emulator/beam/erl_alloc.types erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_bif_port.c erts/emulator/beam/erl_bif_trace.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_message.c erts/emulator/beam/erl_port_task.c erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_process_lock.c erts/emulator/beam/erl_trace.c erts/emulator/beam/export.h erts/emulator/beam/global.h erts/emulator/beam/io.c erts/emulator/sys/unix/sys.c erts/emulator/sys/vxworks/sys.c erts/emulator/test/port_SUITE.erl erts/etc/unix/cerl.src erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/prim_inet.beam erts/preloaded/src/prim_inet.erl lib/hipe/cerl/erl_bif_types.erl lib/kernel/doc/src/inet.xml lib/kernel/src/inet.erl
2012-12-07Implement true asynchronous signaling between processes and portsRickard Green
2012-12-03Add erl_drv_[send|output]_termRickard Green
2012-12-03Use ptab functionality also for portsRickard Green
2012-12-03Prepare for use of ptab functionality also for portsRickard Green
2012-12-03Atomic port stateRickard Green
2012-12-03Generalize process table implementationRickard Green
2012-08-20Merge branch 'maint'Patrik Nyblom
Conflicts: erts/doc/src/erlang.xml erts/preloaded/ebin/init.beam lib/kernel/doc/src/os.xml lib/stdlib/test/filename_SUITE.erl
2012-08-14Make get/putenv and erlexec understand UnicodePatrik Nyblom
Putenv and getenv needs to convert to the proper environment strings in Unicode depending on platform and user settings for filename encoding. Also erlexec needs to pass environment strings in an appropriate way for kernel to pick up. All environment strings on the command line, as well as home directory, is now passed in UTF8 on windows and in whatever encoding you have on Unix, kernel tries to convert all parameters and environments from UTF8 before making strings.
2012-06-04Merge branch 'maint'Lukas Larsson
* maint: Remove stale code for hybrid heap and incremental GC Remove the hipe_bifs:show_message_area/0 BIF Remove support for erlang:system_info(global_heaps_size) Remove the erlang:garbage_collect_message_area/0 BIF Remove workarounds for hybrid and shared heaps in test suites Conflicts: erts/doc/src/erlang.xml erts/emulator/beam/erl_message.c erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h erts/emulator/hipe/hipe_bif2.tab lib/hipe/cerl/erl_bif_types.erl
2012-05-10Remove stale code for hybrid heap and incremental GCBjörn Gustavsson
The hybrid heap emulator was last working in the non-SMP R11B run-time system. When the constant pools were introduced in R12B, the hybrid heap emulator was not updated to handle them. At this point, the harm from reduced readability of the code is greater than any potential usefulness of keeping the code.
2012-05-10Remove support for erlang:system_info(global_heaps_size)Björn Gustavsson
2012-04-27Merge branch 'rickard/proc-sched/OTP-9892'Rickard Green
* rickard/proc-sched/OTP-9892: Teach etp-commands to understand new emulator internal data structures Optimize process state changes Optimize process table access Implement possibility to use ordinary mutexes as process locks Conflicts: erts/emulator/beam/erl_alloc.types
2012-04-27Optimize process state changesRickard Green
2012-04-17Make port_info(Port,os_pid) work on WindowsBjörn-Egil Dahlberg
2012-04-17Extend erlang:port_info/1,2 to show the OS pid of a spawned processMatthias Lang
When spawning OS (unix) processes with erlang:open_port, store the resulting unix pid so that it can be queried later on using erlang:port_info/1,2.
2012-04-16Optimize process table accessRickard Green
2012-04-10lcnt: Enhancement fixupsBjörn-Egil Dahlberg
2012-04-05erts: Add lcnt port and suspend optionsRick Reed
* Add new suspend, location, and port_locks options to erts_debug:lock_counters. * Init and destroy lock counting for processes and ports as appropriate. Conflicts: erts/emulator/beam/erl_bif_info.c
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-22Update slogan and add system_info for dynamic tracePatrik Nyblom
2012-03-22Change to more specific configure options for dtracePatrik Nyblom
2012-03-22Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 3/4Scott Lystig Fritchie
Add probes to the virtual machine, except (mostly) the efile_drv.c driver and other file I/O-related source files.
2012-01-26Implement statistics(scheduler_wall_time)Rickard Green
2011-12-02Get cerl and distribution working in Win64Patrik Nyblom
Can still not setup -a, but cerl works.
2011-12-02Mend the non-SMP emulatorBjörn Gustavsson
Commit 8781932b3b8769b6f208ac7c00471122ec7dd055 broke erlang:system_info(system_version) in the non-SMP emulator so that it would typically dump core. "rq:%d" was removed from the format string for erts_printf(), but the corresponding argument in the argument list was not removed, which ultimately caused "kernel-poll:%s" to be passed an integer (typically 0).
2011-12-01Merge branch 'rickard/rm-common-runq/OTP-9727'Rickard Green
* rickard/rm-common-runq/OTP-9727: Remove common run-queue in SMP case Fix scheduler suspend bug Conflicts: erts/emulator/beam/erl_init.c
2011-12-01Remove common run-queue in SMP caseRickard Green
The common run-queue implementation is removed since it is unused, untested, undocumented, unsupported, and only complicates the code. A spinlock used by the run-queue management sometimes got heavily contended. This code has now been rewritten, and the spinlock has been removed.
2011-11-13Merge branch 'rickard/generic-thr-queue/OTP-9632'Rickard Green
* rickard/generic-thr-queue/OTP-9632: Use generic lock-free queue for async threads Use generic lock-free queue for misc aux work Implement generic lock-free queue
2011-11-13Merge branch 'rickard/thr-progress-block/OTP-9631'Rickard Green
* rickard/thr-progress-block/OTP-9631: Replace system block with thread progress block
2011-11-13Merge branch 'rickard/alloc-opt/OTP-7775'Rickard Green
* rickard/alloc-opt/OTP-7775: Optimize memory allocation Conflicts: erts/aclocal.m4 erts/emulator/hipe/hipe_bif_list.m4 erts/preloaded/ebin/erl_prim_loader.beam erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/init.beam erts/preloaded/ebin/otp_ring0.beam erts/preloaded/ebin/prim_file.beam erts/preloaded/ebin/prim_inet.beam erts/preloaded/ebin/prim_zip.beam erts/preloaded/ebin/zlib.beam
2011-11-13Use generic lock-free queue for async threadsRickard Green
Queues used for communication between async threads and scheduler threads have been replaced with lock-free queues. Drivers using the driver_async functionality are not automatically locked to the system anymore, and can be unloaded as any dynamically linked in driver. Scheduling of ready async jobs is now also interleaved in between other jobs. Previously all ready async jobs was performed at once.
2011-11-13Replace system block with thread progress blockRickard Green
The ERTS internal system block functionality has been replaced by new functionality for blocking the system. The old system block functionality had contention issues and complexity issues. The new functionality piggy-backs on thread progress tracking functionality needed by newly introduced lock-free synchronization in the runtime system. When the functionality for blocking the system isn't used there is more or less no overhead at all. This since the functionality for tracking thread progress is there and needed anyway.
2011-11-13Optimize memory allocationRickard Green
A number of memory allocation optimizations have been implemented. Most optimizations reduce contention caused by synchronization between threads during allocation and deallocation of memory. Most notably: * Synchronization of memory management in scheduler specific allocator instances has been rewritten to use lock-free synchronization. * Synchronization of memory management in scheduler specific pre-allocators has been rewritten to use lock-free synchronization. * The 'mseg_alloc' memory segment allocator now use scheduler specific instances instead of one instance. Apart from reducing contention this also ensures that memory allocators always create memory segments on the local NUMA node on a NUMA system.
2011-11-09Merge branch 'sverk/bif-args/OTP-9662'Sverker Eriksson
* sverk/bif-args/OTP-9662: erts,hipe: Limited support for hipe cross compilation erts-hipe: Change THE_NON_VALUE for HiPE enabled debug emulator erts-hipe: Enable debug compiled hipe-VM with lock checker erts-hipe: Rename fail_bif_interface_0 to standard_bif_interface_0 erts-hipe: Deliberate leak of native fun entries erts-hipe: Fix new trap conventions for x86, amd64 and ppc Store the trap address in p->i Store the trap arguments in the X register array erts-hipe: Make some primops use new BIF calling convention erts-hipe: Adapt generated BIF wrappers for new calling convention erts-hipe: Remove obscuring macros in generated assembler code erts-hipe: Make hipe enabled emulator compile with new BIF calls Simplify the instructions for calling BIFs Change the calling convention for BIFs Use the proper macros in all BIFs Conflicts: erts/emulator/beam/bif.h erts/emulator/beam/erl_bif_info.c
2011-10-26Use the proper macros in all BIFsBjörn Gustavsson
As a preparation for changing the calling convention for BIFs, make sure that all BIFs use the macros. Also, eliminate all calls from one BIF to another, since that also breaks the calling convention abstraction.
2011-10-09Pre-build the tuples returned by os:type/0 and os:version/0Björn Gustavsson
Pre-building the tuples returned by os:type/0 (system_info(os_type)) and os:version() (system_info(os_version)) saves some run-time and avoids building garbage in the calling process.
2011-08-18Implement process_info(Pid, current_{location,stacktrace})Björn Gustavsson
2011-06-14Use new atomic API in runtime systemRickard Green
All uses of the old deprecated atomic API in the runtime system have been replaced with the use of the new atomic API. In a lot of places this change imply a relaxation of memory barriers used.
2011-06-14Improve ethread atomicsRickard Green
The ethread atomics API now also provide double word size atomics. Double word size atomics are implemented using native atomic instructions on x86 (when the cmpxchg8b instruction is available) and on x86_64 (when the cmpxchg16b instruction is available). On other hardware where 32-bit atomics or word size atomics are available, an optimized fallback is used; otherwise, a spinlock, or a mutex based fallback is used. The ethread library now performs runtime tests for presence of hardware features, such as for example SSE2 instructions, instead of requiring this to be determined at compile time. There are now functions implementing each atomic operation with the following implied memory barrier semantics: none, read, write, acquire, release, and full. Some of the operation-barrier combinations aren't especially useful. But instead of filtering useful ones out, and potentially miss a useful one, we implement them all. A much smaller set of functionality for native atomics are required to be implemented than before. More or less only cmpxchg and a membar macro are required to be implemented for each atomic size. Other functions will automatically be constructed from these. It is, of course, often wise to implement more that this if possible from a performance perspective.
2011-05-10Replace io_list_len() with erts_iolist_size()Björn Gustavsson
The io_list_len() function returns an int, where a negative return value indicates a type error. One problem is that an int only consists of 32 bits in a 64-bit emulator. Changing the return type to Sint will solve that problem, but in the 32-bit emulator, a large iolist and a iolist with a type error will both return a negative number. (Noticed by Jon Meredith.) Another problem is that for iolists whose total size exceed the word size, the result would be truncated, leading to a subsequent buffer overflow and emulator crash. Therefore, introduce the new erts_iolist_size() function which returns a status indication and writes the result size through a passed pointer. If the result size does not fit in a word, return an overflow indication.
2011-04-27Merge branch 'sverker/erts_printf-halfword' into devSverker Eriksson
* sverker/erts_printf-halfword: erts_printf %be to print integers of size Eterm Fix use of type BeamInstr in hipe_debug.c Conflicts: erts/emulator/hipe/hipe_debug.c
2011-03-21Make xml valgrind messages end up in xml logPatrik Nyblom
2011-03-16erts_printf %be to print integers of size EtermSverker Eriksson
Existing %bp to print pointer size integers does not work in halfword emulator to print Eterm size integers.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-09Fix 18 exabyte memory allocation failureBjörn Gustavsson
The new_binary() function takes a size argument that is an int. In the 64-bit emulator (sizeof(int) == 4, sizeof(Uint) == 8), any sizes >= 0x8000000 become 0xffffffff80000000 and above and triggers a memory allocation failure. Change the type of the size argument to Uint, and change any callers that cast the argument to an int. Correction-by: Jon Meredith
2010-12-16Use 32-bit atomics for misc scheduling specific informationRickard Green
2010-12-15Use new atomic types in emulatorRickard Green
2010-11-22ETS 'compressed' option.Sverker Eriksson
The compressed format is using a slighty modified variant of the extern format (term_to_binary). To not worsen key lookup's too much, the top tuple itself and the key element are not compressed. Table objects with only immediate non-key elements will therefor not gain anything (but actually consume one extra word for "alloc_size").