- System requirements
- Running the profiler
- Profiler activation
- Start profiling
- Connect to profiled application
- Capturing snapshots
- Solving performance problems
- CPU profiling
- Memory profiling
- Memory telemetry
- Object allocation recording
- Shallow and retained sizes
- Memory views
- Memory inspections
- Comparing memory snapshots
- Values of primitive types
- Useful actions
- Garbage collection
- Exception profiling
- Probes: monitor higher level events
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- Time measurement (CPU time, wall time)
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler API
- Command line tool to control profiling
Object allocation recording
The profiler can optionally record object allocations, that is, track method call stacks where objects are created. Memory snapshots captured when allocations are being recorded contain allocation information. If an object was created when allocations were not being recorded, or recording was stopped at least once after the object had been created, snapshot will contain no allocation information for that object.
1. Ensure object allocation recording is enabled in your profiled application
Due to performance considerations, object allocation recording is not always enabled. You should explicitly enable it when starting your profiled application.
With object allocation recording enabled, even if allocations are not actually being recorded, there is some overhead to the application being profiled. The overhead depends on the number of created objects; in most cases it is not significant (less than 3-5%).
2. Start object allocation recording
Connect to running profiled application and start object allocation recording with the help of corresponding toolbar button:
In some cases, it may be useful to immediately start object allocation recording as soon as profiled application starts. Please find corresponding option on the Welcome screen.
Recording of allocations adds performance overhead. This is the reason why allocations should not be recorded permanently. Instead, it is recommended to record allocations only when you really need them.
In order to keep moderate overhead, it is reasonable to skip allocation events for some percent of objects. This approach is useful to find the excessive garbage collection.
Also, you can record allocations for each object with size bigger than certain threshold. It is valuable to know where the biggest objects are allocated. Normally there are not so many such big objects, thus recording their allocation should not add any significant overhead.
In some rare cases you can record each created object e.g. when allocation information for some particular object must be obtained. To achieve this, set "Record each" to 1.
3. Allocation telemetry
Allocation telemetry is available when allocations are being recorded. However, it provides only basic information. For comprehensive analysis, capture a memory snapshot (see below).
4. Capture snapshot
Capture memory snapshot for analysis of recorded allocation information.
If you capture a performance snapshot instead, only allocation telemetry will be available.
You can start and stop object allocation recording during execution of your application as many times as you wish.