-
Notifications
You must be signed in to change notification settings - Fork 0
/
RPCallTree.h
78 lines (48 loc) · 2.16 KB
/
RPCallTree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// RPCallTree.h
// Rampler
//
// Copyright 2010-2012 Fotonauts. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface RPCallTree : NSObject {
UInt8 _mergeStatus;
}
// canonical identifiers
@property (nonatomic, assign) NSInteger methodId;
@property (nonatomic, assign) NSInteger classId;
@property (nonatomic, assign) NSInteger fileId;
// human readable symbol (derived from corresponding canonical identifiers)
@property (nonatomic) NSString* method;
@property (nonatomic) NSString* file;
@property (nonatomic) NSString* moduleOrClass;
// canonical timing data
@property (nonatomic, assign) NSInteger selfSampleCount;
@property (nonatomic, assign) NSInteger selfStackTraceCount;
@property (nonatomic, assign) NSInteger selfBlockedTicks;
// computed timing data (recomputed by freeze method)
@property (nonatomic, assign) NSInteger sampleCount;
@property (nonatomic, assign) NSInteger stackTraceCount;
@property (nonatomic, assign) NSInteger blockedTicks;
// dynamically computed timing data
@property (nonatomic, readonly) double totalTime;
@property (nonatomic, readonly) double selfTime;
@property (nonatomic, assign) double duration;
// children
@property (nonatomic) NSMutableArray* subTrees; // canonical data
@property (nonatomic) NSArray* children; // sorted children for presentation
// access to ancestors.
@property (readonly, unsafe_unretained) RPCallTree* parent; // Consistency is handled by the code. Declared unsafe to avoid costly weak ARC maps
@property (readonly, unsafe_unretained) RPCallTree* root; // Same comment ^^
// more or less deprecated or not yet refactored
@property (nonatomic, assign) SInt64 thread;
@property (nonatomic, assign) NSInteger startLine;
- (RPCallTree*) subTreeForMethodId:(NSInteger)methodId classId:(NSInteger)classId create:(BOOL)createIfNeeded;
- (void)freeze;
@end
@interface RPCallTree(Private)
- (void) mergeRecursionsWithMaxRecursionHops:(NSInteger)maxHops;
- (void) recursivelyMergeIdenticalCalls:(RPCallTree*)targetCall into:(RPCallTree*)rootDestination;
- (RPCallTree *)copyWithParent:(RPCallTree*)parent withRoot:(RPCallTree*)root;
- (void)addSubTree:(RPCallTree*)child;
@end