Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 17. Trace BIFs, the dbg Tracer, ... > Tracing Calls with the trace_pattern...

17.3. Tracing Calls with the trace_pattern BIF

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:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint