The predicate defines a profile, ProfileName, for use by the sampling profiler. Samples of the statistics (statistics/2 metric keywords) specified in Statistics are collected every SamplePeriod seconds and stored in File. The format of file is such that it can easily be analysed or graphed offline.
The sample based profiler is implemented using after events and is therefore less intrusive in its effect on the performance of the executing code than the instrumentation profiler. However, it is used to indicate the trend of resource usage over time of a running program not to attribute specific costs of a statistic to a specific piece of code. The instrumentation based profiler is used to do this.
[eclipse 1]: instprofile:statsample(memory, 5, [global_stack_used, trail_stack_used], 'memory_sample.dat'). string compiled traceable 476 bytes in 0.00 seconds Yes (0.01s cpu)