
[;1m  system_profile()[0m

  Returns the current system profiling settings set by [;;4m[0m
  [;;4merlang:system_profile/2[0m as [;;4m{ProfilerPid, Options}[0m, or [;;4m[0m
  [;;4mundefined[0m if there are no settings. The order of the options can
  be different from the one that was set.

[;1m  system_profile(ProfilerPid, Options)[0m

  Sets system profiler options. [;;4mProfilerPid[0m is a local process
  identifier (pid) or port receiving profiling messages. The
  receiver is excluded from all profiling. The second argument is a
  list of profiling options:

   • [;;4mexclusive[0m - If a synchronous call to a port from a process
     is done, the calling process is considered not runnable
     during the call runtime to the port. The calling process is
     notified as [;;4minactive[0m, and later [;;4mactive[0m when the port
     callback returns.

   • [;;4mmonotonic_timestamp[0m - Time stamps in profile messages use
     Erlang monotonic time. The time stamp (Ts) has the same
     format and value as produced by [;;4m[0m
     [;;4merlang:monotonic_time(nanosecond)[0m.

   • [;;4mrunnable_procs[0m - If a process is put into or removed from
     the run queue, a message, [;;4m{profile, Pid, State, Mfa, Ts}[0m,
     is sent to [;;4mProfilerPid[0m. Running processes that are
     reinserted into the run queue after having been pre-empted
     do not trigger this message.

   • [;;4mrunnable_ports[0m - If a port is put into or removed from the
     run queue, a message, [;;4m{profile, Port, State, 0, Ts}[0m, is
     sent to [;;4mProfilerPid[0m.

   • [;;4mscheduler[0m - If a scheduler is put to sleep or awoken, a
     message, [;;4m{profile, scheduler, Id, State, NoScheds, Ts}[0m, is
     sent to [;;4mProfilerPid[0m.

   • [;;4mstrict_monotonic_timestamp[0m - Time stamps in profile
     messages consist of Erlang monotonic time and a
     monotonically increasing integer. The time stamp (Ts) has
     the same format and value as produced by [;;4m[0m
     [;;4m{erlang:monotonic_time(nanosecond),[0m
     [;;4merlang:unique_integer([monotonic])}[0m.

   • [;;4mtimestamp[0m - Time stamps in profile messages include a time
     stamp (Ts) that has the same form as returned by [;;4m[0m
     [;;4merlang:now()[0m. This is also the default if no time stamp
     flag is specified. If [;;4mcpu_timestamp[0m has been enabled
     through [;;4mtrace:process/4[0m, this also effects the time stamp
     produced in profiling messages when flag [;;4mtimestamp[0m is
     enabled.

  [;;4mNote[0m

    [;;4merlang:system_profile[0m behavior can change in a future
    release.
