Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You use the erlang:trace_pattern/3 BIF to enable tracing of local and global function calls. You must use this BIF in conjunction with the erlang:trace/3 BIF, called with the call and return_to flags. Tracing will be enabled on the intersection of the sets created through the calls to the two trace BIFs (see Figure 17-3). Using trace/3, you define which processes you want to monitor. Using trace_pattern/3, you define the subset of functions you are tracing. An event will be generated only if a traced process executes a traced function.
The trace messages generated by the intersection of these two BIFs will be of the following form: