aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_trace.c
AgeCommit message (Collapse)Author
2014-12-09erts: Allow cpu_timestamp tracing for LinuxLukas Larsson
2013-06-05Merge branch 'pan/r16b01/system_monitor_long_schedule/OTP-11067' into maintPatrik Nyblom
* pan/r16b01/system_monitor_long_schedule/OTP-11067: Minor spelling correction Add system_monitor of long_schedule
2013-05-02Add system_monitor of long_schedulePatrik Nyblom
2013-04-30Fix some sign warnings found with ClangAnthony Ramine
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-01-28erts: Fix ASSERT crash in erts_try_seize_code_write_permissionSverker Eriksson
ASSERT(code_writing_process != c_p); The assert was actually harmless and could be removed as one solution. But I think it's better to keep it as a way to catch bugs that would otherwise lead to horrible deadlocks if a thread "forgets" to call erts_release_code_write_permission(). As a result erts_release_code_write_permission() must be called BEFORE resuming the suspended process.
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-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-10-05Merge branch 'sverk/code-load-refactor-later-op'Sverker Eriksson
* sverk/code-load-refactor-later-op: erts: Fix faulty lock check assert erts: Refactor naming regarding code_write_permission erts: Refactor tracing to use erts_schedule_thr_prgr_later_op erts: Allow thr_prgr_later_op to reschedule erts: Refactor code loading to use erts_schedule_thr_prgr_later_op erts: Remove some compiler warnings
2012-08-31erts: Refactor naming regarding code_write_permissionSverker Eriksson
The concept of code_write_permission is used by tracing as well and is not specific to code_ix.
2012-08-31erts: Refactor tracing to use erts_schedule_thr_prgr_later_opSverker Eriksson
2012-08-31erts: Remove some compiler warningsSverker Eriksson
2012-08-28Make sure that turning off local trace does not turn off global traceBjörn Gustavsson
Attempting to turn off local call trace when there was global call trace enabled would incorrectly turn off the global call trace. This bug was introduced in bf5bf8b93dccca86c4775b21ee0db49eb6a3b133.
2012-08-28erl_bif_trace: Remove an unused variableBjörn Gustavsson
2012-06-25Don't go to single-scheduler mode when managing breakpointsBjörn Gustavsson
Calls to erlang:set_trace_pattern/3 will no longer block all other schedulers. We will still go to single-scheduler mode when new code is loaded for a module that is traced, or when loading code when there is a default trace pattern set. That is not impossible to fix, but that requires much closer cooperation between tracing BIFs and the loader BIFs.
2012-06-25Refactor the code for managing breakpointsBjörn Gustavsson
To allow us to manage breakpoints without going to single-scheduler mode, we will need to update the breakpoints in several stages with memory barriers in between each stage. Prepare for that by splitting up the breakpoint setting and clearing functions into several smaller functions.
2012-06-25Change the data structures for breakpointsBjörn Gustavsson
Change the data structures for breakpoints to make it possible (in a future commit) to manage breakpoints without taking down the system to single-scheduling mode. The current "breakpoint wheel" data structure (a circular, double-linked list of breakpoints) was invented before the SMP emulator. To support it in the SMP emulator, there is essentially one breakpoint wheel per scheduler. As more breakpoint types have been added, the implementation has become messy and hard to understand and maintain. Therefore, the time for a rewrite has come. Use one struct to hold all breakpoint data for a breakpoint in a function. Use a flag field to indicate what different type of break actions that are enabled.
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-16Optimize process table accessRickard Green
2012-03-30Merge branch 'maint'Björn-Egil Dahlberg
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-22Merge branch 'maint'Patrik Nyblom
Conflicts: erts/emulator/beam/beam_emu.c erts/emulator/beam/bif.tab erts/preloaded/ebin/prim_file.beam lib/hipe/cerl/erl_bif_types.erl
2012-03-22Change to more specific configure options for dtracePatrik Nyblom
2012-03-22Add user tag spreading functionality to VM and use in filePatrik Nyblom
User tags in a dynamic trace enabled VM are spread throughout the system in the same way as seq_trace tokens. This is used by the file module and various other modules to get hold of the tag from the user process without changing the protocol.
2012-02-23erts: Refactor code loading with renamingSverker Eriksson
Rename lock_code_ix as seize_code_write_permission. Don't want to call it a "lock" as it can be held between schedulings and different threads and is not managed by lock checker. Rename "activate" staging as "commit" staging. Why not be consistent and use git terminology all the way.
2012-02-23erts: Seize code_ix lock when updating trace settingsSverker Eriksson
We want to avoid the race when trace settings are done in the time gap while a code stager process is waiting for thread process before commiting and releasing code_ix lock.
2012-02-21erts: Fix tracing bug for new non-blocking loadSverker Eriksson
Made on_load-tracing always set after commit on active code_ix when system is still blocked. Bug caused cprof_SUITE:on_load to fail.
2012-02-21erts: Fallback to blocking upgrade when tracing is enabledSverker Eriksson
2012-02-21erts: Keep count of number of global traced functions per moduleSverker Eriksson
2012-02-21erts: Use several addresses in each ExportSverker Eriksson
2012-02-21erts: Multiple export tab's using code_ixSverker Eriksson
Still blocking code loading
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-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-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-09-29Update copyright yearsBjörn-Egil Dahlberg
2011-09-15Fix more misspellings of compatibilityTuncer Ayaz
2010-07-20One off-heap list, to eliminate two words per ETS object.Sverker Eriksson
Merging the three off-heap lists (binaries, funs and externals) into one list. This reduces memory consumption by two words (pointers) per ETS object.
2010-06-03Teach call time trace patterns to include bifsBjörn-Egil Dahlberg
2010-06-03Teach call_time trace to use intruction pointersBjörn-Egil Dahlberg
call_time trace will use instruction pointers instead of breakpoint data pointers. More costly lookup but the bdt structure might be deallocated, we do not want that. Remove unnecessary pattern lock.
2010-06-03Add return_time trace and PSD deletionsBjörn-Egil Dahlberg
2010-06-03Add processes hashes for call time breakpointsBjörn-Egil Dahlberg
Call time breakpoint tracing traces per call trace per process. - Add hashes to support the extra dimension. - Teach trace_info/2 to handle the extra information dimension.
2010-06-03Call time breakpoint tracing frameworkBjörn-Egil Dahlberg
Initial commit with a new breakpoint instruction and PSD areas for temporary time storage during tracing.
2010-03-22Merge branch 'pan/otp_8332_halfword' into devErlang/OTP
* pan/otp_8332_halfword: Teach testcase in driver_suite the new prototype for driver_async wx: Correct usage of driver callbacks from wx thread Adopt the new (R13B04) Nif functionality to the halfword codebase Support monitoring and demonitoring from driver threads Fix further test-suite problems Correct the VM to work for more test suites Teach {wordsize,internal|external} to system_info/1 Make tracing and distribution work Turn on instruction packing in the loader and virtual machine Add the BeamInstr data type for loaded BEAM code Fix the BEAM dissambler for the half-word emulator Store pointers to heap data in 32-bit words Add a custom mmap wrapper to force heaps into the lower address range Fit all heap data into the 32-bit address range
2010-03-10Add the BeamInstr data type for loaded BEAM codePatrik Nyblom
For cleanliness, use BeamInstr instead of the UWord data type to any machine-sized words that are used for BEAM instructions. Only use UWord for untyped words in general.
2010-03-10Store pointers to heap data in 32-bit wordsPatrik Nyblom
Store Erlang terms in 32-bit entities on the heap, expanding the pointers to 64-bit when needed. This works because all terms are stored on addresses in the 32-bit address range (the 32 most significant bits of pointers to term data are always 0). Introduce a new datatype called UWord (along with its companion SWord), which is an integer having the exact same size as the machine word (a void *), but might be larger than Eterm/Uint. Store code as machine words, as the instructions are pointers to executable code which might reside outside the 32-bit address range. Continuation pointers are stored on the 32-bit stack and hence must point to addresses in the low range, which means that loaded beam code much be placed in the low 32-bit address range (but, as said earlier, the instructions themselves are full words). No Erlang term data can be stored on C stacks (enforced by an earlier commit). This version gives a prompt, but test cases still fail (and dump core). The loader (and emulator loop) has instruction packing disabled. The main issues has been in rewriting loader and actual virtual machine. Subsystems (like distribution) does not work yet.
2010-03-10Fit all heap data into the 32-bit address rangePatrik Nyblom
This is the first step in the implementation of the half-word emulator, a 64-bit emulator where all pointers to heap data will be stored in 32-bit words. Code specific for this emulator variant is conditionally compiled when the HALFWORD_HEAP define has a non-zero value. First force all pointers to heap data to fall into a single 32-bit range, but still store them in 64-bit words. Temporary term data stored on C stack is moved into scheduler specific storage (allocated as heaps) and macros are added to make this happen only in emulators where this is needed. For a vanilla VM the temporary terms are still stored on the C stack.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP