├── .gitignore ├── LICENSE ├── PerformanceMonitor.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ ├── qianjianeng.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── qianjn.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── qianjianeng.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── PerformanceMonitor.xcscheme │ │ └── xcschememanagement.plist │ └── qianjn.xcuserdatad │ └── xcschemes │ ├── PerformanceMonitor.xcscheme │ └── xcschememanagement.plist ├── PerformanceMonitor ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── CrashReporter.framework │ ├── .svn │ │ ├── entries │ │ ├── format │ │ ├── pristine │ │ │ ├── 13 │ │ │ │ └── 130b8faaf3e1acc1b95f77ac835e9c8b6eee5c96.svn-base │ │ │ ├── 30 │ │ │ │ └── 30f3042d70d9e1f161da0fa1f644960f695cedd0.svn-base │ │ │ ├── 38 │ │ │ │ └── 3888ecd6e323e49e9ec773c53338a20202d1df12.svn-base │ │ │ ├── 58 │ │ │ │ └── 584911b4ebb5d9cd16878581c908fb961ebceada.svn-base │ │ │ ├── 64 │ │ │ │ └── 64ba239b16dd66f2b80c325458adbdab9e24f3bf.svn-base │ │ │ ├── 70 │ │ │ │ └── 70e61adc399b89426dce57acee999d492c428aa2.svn-base │ │ │ ├── 71 │ │ │ │ └── 710191442cab38770c12afc78079514ce2995fd5.svn-base │ │ │ ├── 79 │ │ │ │ ├── 7936fdf63d39af33a60fd4d3dc56b9988493b1f5.svn-base │ │ │ │ └── 7990b3a661e710ded6e807d797438fd2afb1e6e5.svn-base │ │ │ ├── 83 │ │ │ │ └── 83f1ef71e4b51512313446364e2db78911330a7c.svn-base │ │ │ ├── 2c │ │ │ │ └── 2c31afc6c7a1f2d4b9f1d0974832ecf6c975c6c8.svn-base │ │ │ ├── 2d │ │ │ │ └── 2d94990d347f675868fad07016fe62f890b594a4.svn-base │ │ │ ├── 3f │ │ │ │ └── 3fd56abbf289ddc99caacd1f55cc508e71649f30.svn-base │ │ │ ├── 5c │ │ │ │ └── 5c063000cebed60ea3fadd0527a1cf130c1d9f4f.svn-base │ │ │ ├── 7e │ │ │ │ └── 7efdf8ddc11e92802ff54a3fd0ce448c0440f583.svn-base │ │ │ ├── 7f │ │ │ │ └── 7fabe16d3b1be90b8b52d56b7104d21e7fab0a1d.svn-base │ │ │ ├── 8d │ │ │ │ └── 8d448e33c67a62f13eea2c97c7b911371eaa988d.svn-base │ │ │ ├── 8e │ │ │ │ └── 8e5ee09ed62de2426359c337bb64575bb4005907.svn-base │ │ │ ├── a1 │ │ │ │ └── a1290f8354de21ee76c0fa940c895ac046bff886.svn-base │ │ │ ├── b1 │ │ │ │ └── b11d8240b08319779228758644b7d3fb84d58c4b.svn-base │ │ │ ├── b4 │ │ │ │ └── b4beb99c252244c0b9c365ad0c81674f2cf8f90f.svn-base │ │ │ ├── c1 │ │ │ │ └── c14937ab645201e1df23aa0bc20b04e53ac9b041.svn-base │ │ │ ├── c3 │ │ │ │ └── c3d76c81284e10ccb1ecb091ef0311f2af5acccb.svn-base │ │ │ ├── cb │ │ │ │ └── cbd2bd911f2c9f28f0408b5e5b2d68f3acf91e42.svn-base │ │ │ ├── ce │ │ │ │ └── ce71abb0d508b36f9ed0b197fc19ec2f3df3bd8f.svn-base │ │ │ ├── cf │ │ │ │ └── cfce5d4fbb9855b5ff4574f0dd08c8a9155d51d2.svn-base │ │ │ ├── d5 │ │ │ │ └── d5a2941b8f66c2be5ef4a037d76fa936c22306c0.svn-base │ │ │ ├── e3 │ │ │ │ └── e36a353a48fcf6bf90beb5c372dd2f2e6e16388c.svn-base │ │ │ └── f3 │ │ │ │ └── f3bd95bae40f8d8cd6e816dd6ff6fc524e8166f5.svn-base │ │ └── wc.db │ ├── CrashReporter │ ├── Headers │ ├── Resources │ └── Versions │ │ ├── A │ │ ├── CrashReporter │ │ ├── Headers │ │ │ ├── CrashReporter.h │ │ │ ├── PLCrashAsyncSignalInfo.h │ │ │ ├── PLCrashFeatureConfig.h │ │ │ ├── PLCrashMacros.h │ │ │ ├── PLCrashNamespace.h │ │ │ ├── PLCrashReport.h │ │ │ ├── PLCrashReportApplicationInfo.h │ │ │ ├── PLCrashReportBinaryImageInfo.h │ │ │ ├── PLCrashReportExceptionInfo.h │ │ │ ├── PLCrashReportFormatter.h │ │ │ ├── PLCrashReportMachExceptionInfo.h │ │ │ ├── PLCrashReportMachineInfo.h │ │ │ ├── PLCrashReportProcessInfo.h │ │ │ ├── PLCrashReportProcessorInfo.h │ │ │ ├── PLCrashReportRegisterInfo.h │ │ │ ├── PLCrashReportSignalInfo.h │ │ │ ├── PLCrashReportStackFrameInfo.h │ │ │ ├── PLCrashReportSymbolInfo.h │ │ │ ├── PLCrashReportSystemInfo.h │ │ │ ├── PLCrashReportTextFormatter.h │ │ │ ├── PLCrashReportThreadInfo.h │ │ │ ├── PLCrashReporter.h │ │ │ └── PLCrashReporterConfig.h │ │ └── Resources │ │ │ └── Info.plist │ │ └── Current ├── Info.plist ├── PerformanceMonitor.h ├── PerformanceMonitor.m ├── ViewController.h ├── ViewController.m └── main.m └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B8B10FA21BF5E02300447088 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B8B10FA11BF5E02300447088 /* main.m */; }; 11 | B8B10FA51BF5E02300447088 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B8B10FA41BF5E02300447088 /* AppDelegate.m */; }; 12 | B8B10FA81BF5E02300447088 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B8B10FA71BF5E02300447088 /* ViewController.m */; }; 13 | B8B10FAB1BF5E02400447088 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B8B10FA91BF5E02400447088 /* Main.storyboard */; }; 14 | B8B10FAD1BF5E02400447088 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B8B10FAC1BF5E02400447088 /* Assets.xcassets */; }; 15 | B8B10FB01BF5E02400447088 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B8B10FAE1BF5E02400447088 /* LaunchScreen.storyboard */; }; 16 | B8B10FB81BF5E05200447088 /* CrashReporter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B8B10FB71BF5E05200447088 /* CrashReporter.framework */; }; 17 | B8B10FBB1BF5E0BE00447088 /* PerformanceMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = B8B10FBA1BF5E0BE00447088 /* PerformanceMonitor.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | B8B10F9D1BF5E02300447088 /* PerformanceMonitor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PerformanceMonitor.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | B8B10FA11BF5E02300447088 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 23 | B8B10FA31BF5E02300447088 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 24 | B8B10FA41BF5E02300447088 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 25 | B8B10FA61BF5E02300447088 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 26 | B8B10FA71BF5E02300447088 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 27 | B8B10FAA1BF5E02400447088 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 28 | B8B10FAC1BF5E02400447088 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 29 | B8B10FAF1BF5E02400447088 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 30 | B8B10FB11BF5E02400447088 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | B8B10FB71BF5E05200447088 /* CrashReporter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CrashReporter.framework; sourceTree = ""; }; 32 | B8B10FB91BF5E0BE00447088 /* PerformanceMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceMonitor.h; sourceTree = ""; }; 33 | B8B10FBA1BF5E0BE00447088 /* PerformanceMonitor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PerformanceMonitor.m; sourceTree = ""; }; 34 | /* End PBXFileReference section */ 35 | 36 | /* Begin PBXFrameworksBuildPhase section */ 37 | B8B10F9A1BF5E02300447088 /* Frameworks */ = { 38 | isa = PBXFrameworksBuildPhase; 39 | buildActionMask = 2147483647; 40 | files = ( 41 | B8B10FB81BF5E05200447088 /* CrashReporter.framework in Frameworks */, 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | B8B10F941BF5E02300447088 = { 49 | isa = PBXGroup; 50 | children = ( 51 | B8B10F9F1BF5E02300447088 /* PerformanceMonitor */, 52 | B8B10F9E1BF5E02300447088 /* Products */, 53 | ); 54 | sourceTree = ""; 55 | }; 56 | B8B10F9E1BF5E02300447088 /* Products */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | B8B10F9D1BF5E02300447088 /* PerformanceMonitor.app */, 60 | ); 61 | name = Products; 62 | sourceTree = ""; 63 | }; 64 | B8B10F9F1BF5E02300447088 /* PerformanceMonitor */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | B8B10FB71BF5E05200447088 /* CrashReporter.framework */, 68 | B8B10FA31BF5E02300447088 /* AppDelegate.h */, 69 | B8B10FA41BF5E02300447088 /* AppDelegate.m */, 70 | B8B10FA61BF5E02300447088 /* ViewController.h */, 71 | B8B10FA71BF5E02300447088 /* ViewController.m */, 72 | B8B10FB91BF5E0BE00447088 /* PerformanceMonitor.h */, 73 | B8B10FBA1BF5E0BE00447088 /* PerformanceMonitor.m */, 74 | B8B10FA91BF5E02400447088 /* Main.storyboard */, 75 | B8B10FAC1BF5E02400447088 /* Assets.xcassets */, 76 | B8B10FAE1BF5E02400447088 /* LaunchScreen.storyboard */, 77 | B8B10FB11BF5E02400447088 /* Info.plist */, 78 | B8B10FA01BF5E02300447088 /* Supporting Files */, 79 | ); 80 | path = PerformanceMonitor; 81 | sourceTree = ""; 82 | }; 83 | B8B10FA01BF5E02300447088 /* Supporting Files */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | B8B10FA11BF5E02300447088 /* main.m */, 87 | ); 88 | name = "Supporting Files"; 89 | sourceTree = ""; 90 | }; 91 | /* End PBXGroup section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | B8B10F9C1BF5E02300447088 /* PerformanceMonitor */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = B8B10FB41BF5E02400447088 /* Build configuration list for PBXNativeTarget "PerformanceMonitor" */; 97 | buildPhases = ( 98 | B8B10F991BF5E02300447088 /* Sources */, 99 | B8B10F9A1BF5E02300447088 /* Frameworks */, 100 | B8B10F9B1BF5E02300447088 /* Resources */, 101 | ); 102 | buildRules = ( 103 | ); 104 | dependencies = ( 105 | ); 106 | name = PerformanceMonitor; 107 | productName = PerformanceMonitor; 108 | productReference = B8B10F9D1BF5E02300447088 /* PerformanceMonitor.app */; 109 | productType = "com.apple.product-type.application"; 110 | }; 111 | /* End PBXNativeTarget section */ 112 | 113 | /* Begin PBXProject section */ 114 | B8B10F951BF5E02300447088 /* Project object */ = { 115 | isa = PBXProject; 116 | attributes = { 117 | LastUpgradeCheck = 0710; 118 | ORGANIZATIONNAME = Tencent; 119 | TargetAttributes = { 120 | B8B10F9C1BF5E02300447088 = { 121 | CreatedOnToolsVersion = 7.1; 122 | }; 123 | }; 124 | }; 125 | buildConfigurationList = B8B10F981BF5E02300447088 /* Build configuration list for PBXProject "PerformanceMonitor" */; 126 | compatibilityVersion = "Xcode 3.2"; 127 | developmentRegion = English; 128 | hasScannedForEncodings = 0; 129 | knownRegions = ( 130 | en, 131 | Base, 132 | ); 133 | mainGroup = B8B10F941BF5E02300447088; 134 | productRefGroup = B8B10F9E1BF5E02300447088 /* Products */; 135 | projectDirPath = ""; 136 | projectRoot = ""; 137 | targets = ( 138 | B8B10F9C1BF5E02300447088 /* PerformanceMonitor */, 139 | ); 140 | }; 141 | /* End PBXProject section */ 142 | 143 | /* Begin PBXResourcesBuildPhase section */ 144 | B8B10F9B1BF5E02300447088 /* Resources */ = { 145 | isa = PBXResourcesBuildPhase; 146 | buildActionMask = 2147483647; 147 | files = ( 148 | B8B10FB01BF5E02400447088 /* LaunchScreen.storyboard in Resources */, 149 | B8B10FAD1BF5E02400447088 /* Assets.xcassets in Resources */, 150 | B8B10FAB1BF5E02400447088 /* Main.storyboard in Resources */, 151 | ); 152 | runOnlyForDeploymentPostprocessing = 0; 153 | }; 154 | /* End PBXResourcesBuildPhase section */ 155 | 156 | /* Begin PBXSourcesBuildPhase section */ 157 | B8B10F991BF5E02300447088 /* Sources */ = { 158 | isa = PBXSourcesBuildPhase; 159 | buildActionMask = 2147483647; 160 | files = ( 161 | B8B10FA81BF5E02300447088 /* ViewController.m in Sources */, 162 | B8B10FBB1BF5E0BE00447088 /* PerformanceMonitor.m in Sources */, 163 | B8B10FA51BF5E02300447088 /* AppDelegate.m in Sources */, 164 | B8B10FA21BF5E02300447088 /* main.m in Sources */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXSourcesBuildPhase section */ 169 | 170 | /* Begin PBXVariantGroup section */ 171 | B8B10FA91BF5E02400447088 /* Main.storyboard */ = { 172 | isa = PBXVariantGroup; 173 | children = ( 174 | B8B10FAA1BF5E02400447088 /* Base */, 175 | ); 176 | name = Main.storyboard; 177 | sourceTree = ""; 178 | }; 179 | B8B10FAE1BF5E02400447088 /* LaunchScreen.storyboard */ = { 180 | isa = PBXVariantGroup; 181 | children = ( 182 | B8B10FAF1BF5E02400447088 /* Base */, 183 | ); 184 | name = LaunchScreen.storyboard; 185 | sourceTree = ""; 186 | }; 187 | /* End PBXVariantGroup section */ 188 | 189 | /* Begin XCBuildConfiguration section */ 190 | B8B10FB21BF5E02400447088 /* Debug */ = { 191 | isa = XCBuildConfiguration; 192 | buildSettings = { 193 | ALWAYS_SEARCH_USER_PATHS = NO; 194 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 195 | CLANG_CXX_LIBRARY = "libc++"; 196 | CLANG_ENABLE_MODULES = YES; 197 | CLANG_ENABLE_OBJC_ARC = YES; 198 | CLANG_WARN_BOOL_CONVERSION = YES; 199 | CLANG_WARN_CONSTANT_CONVERSION = YES; 200 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 201 | CLANG_WARN_EMPTY_BODY = YES; 202 | CLANG_WARN_ENUM_CONVERSION = YES; 203 | CLANG_WARN_INT_CONVERSION = YES; 204 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 205 | CLANG_WARN_UNREACHABLE_CODE = YES; 206 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 207 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 208 | COPY_PHASE_STRIP = NO; 209 | DEBUG_INFORMATION_FORMAT = dwarf; 210 | ENABLE_STRICT_OBJC_MSGSEND = YES; 211 | ENABLE_TESTABILITY = YES; 212 | GCC_C_LANGUAGE_STANDARD = gnu99; 213 | GCC_DYNAMIC_NO_PIC = NO; 214 | GCC_NO_COMMON_BLOCKS = YES; 215 | GCC_OPTIMIZATION_LEVEL = 0; 216 | GCC_PREPROCESSOR_DEFINITIONS = ( 217 | "DEBUG=1", 218 | "$(inherited)", 219 | ); 220 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 221 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 222 | GCC_WARN_UNDECLARED_SELECTOR = YES; 223 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 224 | GCC_WARN_UNUSED_FUNCTION = YES; 225 | GCC_WARN_UNUSED_VARIABLE = YES; 226 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 227 | MTL_ENABLE_DEBUG_INFO = YES; 228 | ONLY_ACTIVE_ARCH = YES; 229 | SDKROOT = iphoneos; 230 | }; 231 | name = Debug; 232 | }; 233 | B8B10FB31BF5E02400447088 /* Release */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | ALWAYS_SEARCH_USER_PATHS = NO; 237 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 238 | CLANG_CXX_LIBRARY = "libc++"; 239 | CLANG_ENABLE_MODULES = YES; 240 | CLANG_ENABLE_OBJC_ARC = YES; 241 | CLANG_WARN_BOOL_CONVERSION = YES; 242 | CLANG_WARN_CONSTANT_CONVERSION = YES; 243 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 244 | CLANG_WARN_EMPTY_BODY = YES; 245 | CLANG_WARN_ENUM_CONVERSION = YES; 246 | CLANG_WARN_INT_CONVERSION = YES; 247 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 248 | CLANG_WARN_UNREACHABLE_CODE = YES; 249 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 250 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 251 | COPY_PHASE_STRIP = NO; 252 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 253 | ENABLE_NS_ASSERTIONS = NO; 254 | ENABLE_STRICT_OBJC_MSGSEND = YES; 255 | GCC_C_LANGUAGE_STANDARD = gnu99; 256 | GCC_NO_COMMON_BLOCKS = YES; 257 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 258 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 259 | GCC_WARN_UNDECLARED_SELECTOR = YES; 260 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 261 | GCC_WARN_UNUSED_FUNCTION = YES; 262 | GCC_WARN_UNUSED_VARIABLE = YES; 263 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 264 | MTL_ENABLE_DEBUG_INFO = NO; 265 | SDKROOT = iphoneos; 266 | VALIDATE_PRODUCT = YES; 267 | }; 268 | name = Release; 269 | }; 270 | B8B10FB51BF5E02400447088 /* Debug */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 274 | CODE_SIGN_IDENTITY = "iPhone Developer"; 275 | FRAMEWORK_SEARCH_PATHS = ( 276 | "$(inherited)", 277 | "$(PROJECT_DIR)/PerformanceMonitor", 278 | ); 279 | INFOPLIST_FILE = PerformanceMonitor/Info.plist; 280 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 281 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 282 | PRODUCT_BUNDLE_IDENTIFIER = com.tencent.PerformanceMonitor; 283 | PRODUCT_NAME = "$(TARGET_NAME)"; 284 | }; 285 | name = Debug; 286 | }; 287 | B8B10FB61BF5E02400447088 /* Release */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 291 | CODE_SIGN_IDENTITY = "iPhone Developer"; 292 | FRAMEWORK_SEARCH_PATHS = ( 293 | "$(inherited)", 294 | "$(PROJECT_DIR)/PerformanceMonitor", 295 | ); 296 | INFOPLIST_FILE = PerformanceMonitor/Info.plist; 297 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 298 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 299 | PRODUCT_BUNDLE_IDENTIFIER = com.tencent.PerformanceMonitor; 300 | PRODUCT_NAME = "$(TARGET_NAME)"; 301 | }; 302 | name = Release; 303 | }; 304 | /* End XCBuildConfiguration section */ 305 | 306 | /* Begin XCConfigurationList section */ 307 | B8B10F981BF5E02300447088 /* Build configuration list for PBXProject "PerformanceMonitor" */ = { 308 | isa = XCConfigurationList; 309 | buildConfigurations = ( 310 | B8B10FB21BF5E02400447088 /* Debug */, 311 | B8B10FB31BF5E02400447088 /* Release */, 312 | ); 313 | defaultConfigurationIsVisible = 0; 314 | defaultConfigurationName = Release; 315 | }; 316 | B8B10FB41BF5E02400447088 /* Build configuration list for PBXNativeTarget "PerformanceMonitor" */ = { 317 | isa = XCConfigurationList; 318 | buildConfigurations = ( 319 | B8B10FB51BF5E02400447088 /* Debug */, 320 | B8B10FB61BF5E02400447088 /* Release */, 321 | ); 322 | defaultConfigurationIsVisible = 0; 323 | defaultConfigurationName = Release; 324 | }; 325 | /* End XCConfigurationList section */ 326 | }; 327 | rootObject = B8B10F951BF5E02300447088 /* Project object */; 328 | } 329 | -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/project.xcworkspace/xcuserdata/qianjianeng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faimin/PerformanceMonitor/3bee775fc0c385956718544aca2210bcd7050950/PerformanceMonitor.xcodeproj/project.xcworkspace/xcuserdata/qianjianeng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/project.xcworkspace/xcuserdata/qianjn.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faimin/PerformanceMonitor/3bee775fc0c385956718544aca2210bcd7050950/PerformanceMonitor.xcodeproj/project.xcworkspace/xcuserdata/qianjn.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/xcuserdata/qianjianeng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/xcuserdata/qianjianeng.xcuserdatad/xcschemes/PerformanceMonitor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/xcuserdata/qianjianeng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PerformanceMonitor.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | B8B10F9C1BF5E02300447088 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/xcuserdata/qianjn.xcuserdatad/xcschemes/PerformanceMonitor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /PerformanceMonitor.xcodeproj/xcuserdata/qianjn.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PerformanceMonitor.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | B8B10F9C1BF5E02300447088 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /PerformanceMonitor/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // PerformanceMonitor 4 | // 5 | // Created by qianjianeng on 15/11/13. 6 | // Copyright © 2015年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /PerformanceMonitor/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // PerformanceMonitor 4 | // 5 | // Created by qianjianeng on 15/11/13. 6 | // Copyright © 2015年 Tencent. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "PerformanceMonitor.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | 20 | [[PerformanceMonitor sharedInstance] start]; 21 | 22 | return YES; 23 | } 24 | 25 | - (void)applicationWillResignActive:(UIApplication *)application { 26 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 27 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 28 | } 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | - (void)applicationWillEnterForeground:(UIApplication *)application { 36 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 37 | } 38 | 39 | - (void)applicationDidBecomeActive:(UIApplication *)application { 40 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 41 | } 42 | 43 | - (void)applicationWillTerminate:(UIApplication *)application { 44 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /PerformanceMonitor/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /PerformanceMonitor/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /PerformanceMonitor/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/entries: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/format: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/13/130b8faaf3e1acc1b95f77ac835e9c8b6eee5c96.svn-base: -------------------------------------------------------------------------------- 1 | link A -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/2c/2c31afc6c7a1f2d4b9f1d0974832ecf6c975c6c8.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2012-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #ifndef PLCRASH_FEATURE_CONFIG_H 30 | #define PLCRASH_FEATURE_CONFIG_H 31 | 32 | #include 33 | 34 | /** 35 | * @internal 36 | * 37 | * Build-time configuration for PLCrashReporter. 38 | * 39 | * This is used to automatically enable/disable features on a per-platform and per-configuration 40 | * basis; it may also be used by third-party vendors to configure a custom build of PLCrashReporter. 41 | * 42 | * @defgroup build_config Build Configuration 43 | * @ingroup constants 44 | * @{ 45 | */ 46 | 47 | /* 48 | * Defaults 49 | */ 50 | 51 | /* 52 | * For release builds, disable unused unwind implementations on targets that do not use them. For non-release 53 | * builds, we include the unwind implementations to allow testing on a broader range of targets. 54 | */ 55 | #ifdef PLCF_RELEASE_BUILD 56 | # if defined(__arm__) 57 | # ifndef PLCRASH_FEATURE_UNWIND_DWARF 58 | # define PLCRASH_FEATURE_UNWIND_DWARF 0 59 | # endif 60 | # ifndef PLCRASH_FEATURE_UNWIND_COMPACT 61 | # define PLCRASH_FEATURE_UNWIND_COMPACT 0 62 | # endif 63 | # endif 64 | #endif 65 | 66 | /* 67 | * Configuration Flags 68 | */ 69 | 70 | 71 | #ifndef PLCRASH_FEATURE_MACH_EXCEPTIONS 72 | /** 73 | * If true, enable Mach exception support. On Mac OS X, the Mach exception implementation is fully supported, 74 | * using publicly available API. On iOS, the APIs required for a complete implementation are not public. However, a 75 | * popular commercial crash reporter is now shipping with support for Mach exceptions, which implies that either 76 | * they've received special dispensation to use private APIs / private structures, they've found another way to do 77 | * it, or they're just using undocumented functionality and hoping for the best. 78 | * 79 | * The exposed surface of undocumented API usage is relatively low, and there has been strong user demand to 80 | * implement Mach exception handling regardless of concerns over API visiblity. Given this, we've enabled 81 | * Mach exception handling by default, and provided both build-time and runtime configuration 82 | * to disable its use. 83 | * 84 | * For more information on the potential issues with enabling mach exception support, @sa @ref mach_exceptions. 85 | */ 86 | # define PLCRASH_FEATURE_MACH_EXCEPTIONS 1 87 | #endif 88 | 89 | #ifndef PLCRASH_FEATURE_UNWIND_DWARF 90 | /** If true, enable DWARF unwinding support. */ 91 | # define PLCRASH_FEATURE_UNWIND_DWARF 1 92 | #endif 93 | 94 | 95 | #ifndef PLCRASH_FEATURE_UNWIND_COMPACT 96 | /** If true, enable compact unwinding support. */ 97 | # define PLCRASH_FEATURE_UNWIND_COMPACT 1 98 | #endif 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | #endif /* PLCRASH_FEATURE_CONFIG_H */ 105 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/2d/2d94990d347f675868fad07016fe62f890b594a4.svn-base: -------------------------------------------------------------------------------- 1 | link Versions/Current/CrashReporter -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/30/30f3042d70d9e1f161da0fa1f644960f695cedd0.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportThreadInfo.h" 31 | 32 | 33 | @interface PLCrashReportExceptionInfo : NSObject { 34 | @private 35 | /** Name */ 36 | NSString *_name; 37 | 38 | /** Reason */ 39 | NSString *_reason; 40 | 41 | /** Ordered list of PLCrashReportStackFrame instances, or nil if unavailable. */ 42 | NSArray *_stackFrames; 43 | } 44 | 45 | - (id) initWithExceptionName: (NSString *) name reason: (NSString *) reason; 46 | 47 | - (id) initWithExceptionName: (NSString *) name 48 | reason: (NSString *) reason 49 | stackFrames: (NSArray *) stackFrames; 50 | 51 | /** 52 | * The exception name. 53 | */ 54 | @property(nonatomic, readonly) NSString *exceptionName; 55 | 56 | /** 57 | * The exception reason. 58 | */ 59 | @property(nonatomic, readonly) NSString *exceptionReason; 60 | 61 | /* The exception's original call stack, as an array of PLCrashReportStackFrameInfo instances, or nil if unavailable. 62 | * This may be preserved across rethrow of an exception, and can be used to determine the original call stack. */ 63 | @property(nonatomic, readonly) NSArray *stackFrames; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/38/3888ecd6e323e49e9ec773c53338a20202d1df12.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportApplicationInfo : NSObject { 32 | @private 33 | /** Application identifier */ 34 | NSString *_applicationIdentifier; 35 | 36 | /** Application version */ 37 | NSString *_applicationVersion; 38 | 39 | /** Application marketing version */ 40 | NSString *_applicationMarketingVersion; 41 | } 42 | 43 | - (id) initWithApplicationIdentifier: (NSString *) applicationIdentifier 44 | applicationVersion: (NSString *) applicationVersion 45 | applicationMarketingVersion: (NSString *) applicationMarketingVersion; 46 | 47 | /** 48 | * The application identifier. This is usually the application's CFBundleIdentifier value. 49 | */ 50 | @property(nonatomic, readonly) NSString *applicationIdentifier; 51 | 52 | /** 53 | * The application version. This is usually the application's CFBundleVersion value. 54 | */ 55 | @property(nonatomic, readonly) NSString *applicationVersion; 56 | 57 | /** 58 | * The application marketing version. This is usually the application's CFBundleShortVersionString value if available. May be nil. 59 | */ 60 | @property(nonatomic, readonly) NSString *applicationMarketingVersion; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/58/584911b4ebb5d9cd16878581c908fb961ebceada.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import 31 | 32 | /** 33 | * @ingroup constants 34 | * 35 | * The type encodings supported for CPU types and subtypes. Currently only Apple 36 | * Mach-O defined encodings are supported. 37 | * 38 | * @internal 39 | * These enum values match the protobuf values. Keep them synchronized. 40 | */ 41 | typedef enum { 42 | /** Unknown cpu type encoding. */ 43 | PLCrashReportProcessorTypeEncodingUnknown = 0, 44 | 45 | /** Apple Mach-defined processor types. */ 46 | PLCrashReportProcessorTypeEncodingMach = 1 47 | } PLCrashReportProcessorTypeEncoding; 48 | 49 | @interface PLCrashReportProcessorInfo : NSObject { 50 | @private 51 | /** Type encoding */ 52 | PLCrashReportProcessorTypeEncoding _typeEncoding; 53 | 54 | /** CPU type */ 55 | uint64_t _type; 56 | 57 | /** CPU subtype */ 58 | uint64_t _subtype; 59 | } 60 | 61 | - (id) initWithTypeEncoding: (PLCrashReportProcessorTypeEncoding) typeEncoding 62 | type: (uint64_t) type 63 | subtype: (uint64_t) subtype; 64 | 65 | /** The CPU type encoding. */ 66 | @property(nonatomic, readonly) PLCrashReportProcessorTypeEncoding typeEncoding; 67 | 68 | /** The CPU type. */ 69 | @property(nonatomic, readonly) uint64_t type; 70 | 71 | /** The CPU subtype. */ 72 | @property(nonatomic, readonly) uint64_t subtype; 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/5c/5c063000cebed60ea3fadd0527a1cf130c1d9f4f.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 14F1021 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | CrashReporter 11 | CFBundleIdentifier 12 | coop.plausible.CrashReporter 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | CrashReporter 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleSignature 20 | ???? 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | CFBundleVersion 26 | 1.0 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 7B91b 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 15A278 35 | DTSDKName 36 | macosx10.11 37 | DTXcode 38 | 0710 39 | DTXcodeBuild 40 | 7B91b 41 | 42 | 43 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/64/64ba239b16dd66f2b80c325458adbdab9e24f3bf.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import 31 | 32 | #import "PLCrashReporterConfig.h" 33 | #import "PLCrashMacros.h" 34 | 35 | @class PLCrashMachExceptionServer; 36 | @class PLCrashMachExceptionPortSet; 37 | 38 | /** 39 | * @ingroup functions 40 | * 41 | * Prototype of a callback function used to execute additional user code with signal information as provided 42 | * by PLCrashReporter. Called upon completion of crash handling, after the crash report has been written to disk. 43 | * 44 | * @param info The signal info. 45 | * @param uap The crash's threads context. 46 | * @param context The API client's supplied context value. 47 | * 48 | * @sa The @ref async_safety documentation. 49 | * @sa PLCrashReporter::setPostCrashCallbacks: 50 | */ 51 | typedef void (*PLCrashReporterPostCrashSignalCallback)(siginfo_t *info, ucontext_t *uap, void *context); 52 | 53 | /** 54 | * @ingroup types 55 | * 56 | * This structure contains callbacks supported by PLCrashReporter to allow the host application to perform 57 | * additional tasks prior to program termination after a crash has occured. 58 | * 59 | * @sa The @ref async_safety documentation. 60 | */ 61 | typedef struct PLCrashReporterCallbacks { 62 | /** The version number of this structure. If not one of the defined version numbers for this type, the behavior 63 | * is undefined. The current version of this structure is 0. */ 64 | uint16_t version; 65 | 66 | /** An arbitrary user-supplied context value. This value may be NULL. */ 67 | void *context; 68 | 69 | /** 70 | * The callback used to report caught signal information. In version 0 of this structure, all crashes will be 71 | * reported via this function. 72 | * 73 | * @warning When using PLCrashReporterSignalHandlerTypeMach, the siginfo_t argument to this function will be derived 74 | * from the Mach exception data, and may be incorrect, or may otherwise not match the expected data as provided via 75 | * PLCrashReporterSignalHandlerTypeBSD. In addition, the provided ucontext_t value will be zero-initialized, and will 76 | * not provide valid thread state. 77 | * 78 | * This callback will be deprecated in favor of a Mach-compatible replacement in a future release; support is maintained 79 | * here to allow clients that rely on post-crash callbacks without thread state to make use of Mach exceptions. 80 | */ 81 | PLCrashReporterPostCrashSignalCallback handleSignal; 82 | } PLCrashReporterCallbacks; 83 | 84 | @interface PLCrashReporter : NSObject { 85 | @private 86 | /** Reporter configuration */ 87 | PLCrashReporterConfig *_config; 88 | 89 | /** YES if the crash reporter has been enabled */ 90 | BOOL _enabled; 91 | 92 | #if PLCRASH_FEATURE_MACH_EXCEPTIONS 93 | /** The backing Mach exception server, if any. Nil if the reporter has not been enabled, or if 94 | * the configured signal handler type is not PLCrashReporterSignalHandlerTypeMach. */ 95 | PLCrashMachExceptionServer *_machServer; 96 | 97 | /** Previously registered Mach exception ports, if any. */ 98 | PLCrashMachExceptionPortSet *_previousMachPorts; 99 | #endif /* PLCRASH_FEATURE_MACH_EXCEPTIONS */ 100 | 101 | /** Application identifier */ 102 | NSString *_applicationIdentifier; 103 | 104 | /** Application version */ 105 | NSString *_applicationVersion; 106 | 107 | /** Application marketing version */ 108 | NSString *_applicationMarketingVersion; 109 | 110 | /** Path to the crash reporter internal data directory */ 111 | NSString *_crashReportDirectory; 112 | } 113 | 114 | + (PLCrashReporter *) sharedReporter PLCR_DEPRECATED; 115 | 116 | - (instancetype) initWithConfiguration: (PLCrashReporterConfig *) config; 117 | 118 | - (BOOL) hasPendingCrashReport; 119 | 120 | - (NSData *) loadPendingCrashReportData; 121 | - (NSData *) loadPendingCrashReportDataAndReturnError: (NSError **) outError; 122 | 123 | - (NSData *) generateLiveReportWithThread: (thread_t) thread; 124 | - (NSData *) generateLiveReportWithThread: (thread_t) thread error: (NSError **) outError; 125 | 126 | - (NSData *) generateLiveReport; 127 | - (NSData *) generateLiveReportAndReturnError: (NSError **) outError; 128 | 129 | - (BOOL) purgePendingCrashReport; 130 | - (BOOL) purgePendingCrashReportAndReturnError: (NSError **) outError; 131 | 132 | - (BOOL) enableCrashReporter; 133 | - (BOOL) enableCrashReporterAndReturnError: (NSError **) outError; 134 | 135 | - (void) setCrashCallbacks: (PLCrashReporterCallbacks *) callbacks; 136 | 137 | @end 138 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/70/70e61adc399b89426dce57acee999d492c428aa2.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashFeatureConfig.h" 31 | 32 | /** 33 | * @ingroup enums 34 | * Supported mechanisms for trapping and handling crashes. 35 | */ 36 | typedef NS_ENUM(NSUInteger, PLCrashReporterSignalHandlerType) { 37 | /** 38 | * Trap fatal signals via a sigaction(2)-registered BSD signal handler. 39 | * 40 | * PLCrashReporter's signal handler will supersede previously registered handlers; existing 41 | * handlers will not be called. This behavior may be modified in a future release, and should 42 | * not be relied upon as a mechanism to prevent existing signal handlers from being called. 43 | * 44 | * There are some limitations to signal-based crash handling on Mac OS X and iOS; specifically: 45 | * 46 | * - On Mac OS X, stack overflows will only be handled on the thread on which 47 | * the crash reporter was initialized. This should generally be the main thread. 48 | * - On iOS 6.0 and later, any stack overflows will not be handled due to sigaltstack() being 49 | * non-functional on the device. (see rdar://13002712 - SA_ONSTACK/sigaltstack() ignored on iOS). 50 | * - Some exit paths in Apple's Libc will deregister a signal handler before firing SIGABRT, resulting 51 | * in the signal handler never being called (see rdar://14313497 - ___abort() disables SIGABRT signal 52 | * handlers prior to raising SIGABRT). These __abort()-based checks are: 53 | * - Implemented for unsafe memcpy/strcpy/snprintf C functions. 54 | * - Only enabled when operating on a fixed-width target buffer (in which case the 55 | * compiler rewrites the function calls to the built-in variants, and provides the fixed-width length as an argument). 56 | * - Only trigger in the case that the source data exceeds the size of the fixed width target 57 | * buffer, and the maximum length argument either isn't supplied by the caller (eg, when using strcpy), 58 | * or a too-long argument is supplied (eg, strncpy with a length argument longer than the target buffer), 59 | * AND that argument can't be checked at compile-time. 60 | */ 61 | PLCrashReporterSignalHandlerTypeBSD = 0, 62 | 63 | #if PLCRASH_FEATURE_MACH_EXCEPTIONS 64 | /** 65 | * Trap fatal signals via a Mach exception server. 66 | * 67 | * If any existing Mach exception server has been registered for the task, exceptions will be forwarded to that 68 | * exception handler. Should the exceptions be handled by an existing handler, no report will be generated 69 | * by PLCrashReporter. 70 | * 71 | * @par Mac OS X 72 | * 73 | * On Mac OS X, the Mach exception implementation is fully supported, using publicly available API -- note, 74 | * however, that some kernel-internal constants, as well as architecture-specific trap information, 75 | * may be required to fully interpret a Mach exception's root cause. 76 | * 77 | * @par iOS 78 | * 79 | * On iOS, the APIs required for a complete implementation are not fully public. 80 | * 81 | * The exposed surface of undocumented API usage is relatively low, and there has been strong user demand to 82 | * implement Mach exception handling regardless of concerns over API visiblity. Given this, we've included 83 | * Mach exception handling as an optional feature, with both build-time and runtime configuration 84 | * to disable its inclusion or use, respectively. 85 | * 86 | * @par Debugger Incompatibility 87 | * 88 | * The Mach exception handler executes in-process, and will interfere with debuggers when they attempt to 89 | * suspend all active threads (which will include the Mach exception handler). Mach-based handling 90 | * should not be used when a debugger is attached. 91 | * 92 | * @par More Details 93 | * 94 | * For more information, refer to @ref mach_exceptions. 95 | */ 96 | PLCrashReporterSignalHandlerTypeMach = 1 97 | #endif /* PLCRASH_FEATURE_MACH_EXCEPTIONS */ 98 | }; 99 | 100 | /** 101 | * @ingroup enums 102 | * Supported mechanisms for performing local symbolication. 103 | * 104 | * Local symbolication is performed using inexact heuristics and symbol data available at runtime; it may 105 | * return information that is incorrect. This may still be useful in the case where DWARF data is unavailable 106 | * for a given build; in that case, it can provide function and method names (though not line numbers) for a 107 | * crash report that may otherwise be unusable. 108 | * 109 | * Note, however, this comes at the cost of a significant increase in code that must run within the critical 110 | * crash reporting section, where failures may result in crash reports being corrupted or left unwritten. In 111 | * addition, some of the provided symbolication strategies rely on knowledge of runtime internals that may 112 | * change in future iOS releases. Given that DWARF symbolication data will always be more accurate, and 113 | * the risks inherent in executing considerably more code at crash time, it is strongly recommended that local 114 | * symbolication only be enabled for non-release builds. 115 | * 116 | * Multiple symbolication strategies may be enabled, in which case a best-match heuristic will be applied to the 117 | * results. 118 | */ 119 | typedef NS_OPTIONS(NSUInteger, PLCrashReporterSymbolicationStrategy) { 120 | /** No symbolication. */ 121 | PLCrashReporterSymbolicationStrategyNone = 0, 122 | 123 | /** 124 | * Use the standard binary symbol table. On iOS, this alone will return 125 | * incomplete results, as most symbols are rewritten to the common '\' string. 126 | */ 127 | PLCrashReporterSymbolicationStrategySymbolTable = 1 << 0, 128 | 129 | /** 130 | * Use Objective-C metadata to find method and class names. This relies on detailed parsing 131 | * of the Objective-C runtime data, including undefined flags and other runtime internals. As such, 132 | * it may return incorrect data should the runtime be changed incompatibly. 133 | */ 134 | PLCrashReporterSymbolicationStrategyObjC = 1 << 1, 135 | 136 | /** 137 | * Enable all available symbolication strategies. 138 | */ 139 | PLCrashReporterSymbolicationStrategyAll = (PLCrashReporterSymbolicationStrategySymbolTable|PLCrashReporterSymbolicationStrategyObjC) 140 | }; 141 | 142 | @interface PLCrashReporterConfig : NSObject { 143 | @private 144 | /** The configured signal handler type. */ 145 | PLCrashReporterSignalHandlerType _signalHandlerType; 146 | 147 | /** The configured symbolication strategy. */ 148 | PLCrashReporterSymbolicationStrategy _symbolicationStrategy; 149 | } 150 | 151 | + (instancetype) defaultConfiguration; 152 | 153 | - (instancetype) init; 154 | - (instancetype) initWithSignalHandlerType: (PLCrashReporterSignalHandlerType) signalHandlerType 155 | symbolicationStrategy: (PLCrashReporterSymbolicationStrategy) symbolicationStrategy; 156 | 157 | /** The configured signal handler type. */ 158 | @property(nonatomic, readonly) PLCrashReporterSignalHandlerType signalHandlerType; 159 | 160 | /** The configured symbolication strategy. */ 161 | @property(nonatomic, readonly) PLCrashReporterSymbolicationStrategy symbolicationStrategy; 162 | 163 | 164 | @end 165 | 166 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/71/710191442cab38770c12afc78079514ce2995fd5.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #ifndef PLCRASH_CONSTANTS_H 30 | #define PLCRASH_CONSTANTS_H 31 | 32 | #include 33 | 34 | #if defined(__cplusplus) 35 | # define PLCR_EXPORT extern "C" 36 | # define PLCR_C_BEGIN_DECLS extern "C" { 37 | # define PLCR_C_END_DECLS } 38 | #else 39 | # define PLCR_EXPORT extern 40 | # define PLCR_C_BEGIN_DECLS 41 | # define PLCR_C_END_DECLS 42 | #endif 43 | 44 | #if defined(__cplusplus) 45 | # if defined(PLCRASHREPORTER_PREFIX) 46 | /** @internal Define the plcrash namespace, automatically inserting an inline namespace containing the configured PLCRASHREPORTER_PREFIX, if any. */ 47 | # define PLCR_CPP_BEGIN_NS namespace plcrash { inline namespace PLCRASHREPORTER_PREFIX { 48 | 49 | /** @internal Close the definition of the `plcrash` namespace (and the PLCRASHREPORTER_PREFIX inline namespace, if any). */ 50 | # define PLCR_CPP_END_NS }} 51 | # else 52 | # define PLCR_CPP_BEGIN_NS namespace plcrash { 53 | # define PLCR_CPP_END_NS } 54 | # endif 55 | # 56 | /** @internal Define the plcrash::async namespace, automatically inserting an inline namespace containing the configured PLCRASHREPORTER_PREFIX, if any. */ 57 | # define PLCR_CPP_BEGIN_ASYNC_NS PLCR_CPP_BEGIN_NS namespace async { 58 | 59 | /** @internal Close the definition of the `plcrash::async` namespace (and the PLCRASHREPORTER_PREFIX inline namespace, if any). */ 60 | # define PLCR_CPP_END_ASYNC_NS PLCR_CPP_END_NS } 61 | #endif 62 | 63 | #ifdef __clang__ 64 | # define PLCR_PRAGMA_CLANG(_p) _Pragma(_p) 65 | #else 66 | # define PLCR_PRAGMA_CLANG(_p) 67 | #endif 68 | 69 | #ifdef __clang__ 70 | # define PLCR_DEPRECATED __attribute__((deprecated)) 71 | #else 72 | # define PLCR_DEPRECATED 73 | #endif 74 | 75 | #if defined(__clang__) || defined(__GNUC__) 76 | # define PLCR_UNUSED __attribute__((unused)) 77 | #else 78 | # define PLCR_UNUSED 79 | #endif 80 | 81 | #ifdef PLCR_PRIVATE 82 | /** 83 | * Marks a definition as deprecated only for for external clients, allowing 84 | * uses of it internal fo the framework. 85 | */ 86 | # define PLCR_EXTERNAL_DEPRECATED 87 | 88 | /** 89 | * @internal 90 | * A macro to put above a definition marked PLCR_EXTERNAL_DEPRECATED that will 91 | * silence warnings about there being a deprecation documentation marker but the 92 | * definition not being marked deprecated. 93 | */ 94 | # define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH() \ 95 | PLCR_PRAGMA_CLANG("clang diagnostic push"); \ 96 | PLCR_PRAGMA_CLANG("clang diagnostic ignored \"-Wdocumentation-deprecated-sync\"") 97 | 98 | /** 99 | * @internal 100 | * A macro to put below a definition marked PLCR_EXTERNAL_DEPRECATED that will 101 | * silence warnings about there being a deprecation documentation marker but the 102 | * definition not being marked deprecated. 103 | */ 104 | # define PLCR_EXTERNAL_DEPRECATED_NOWARN_POP() PLCR_PRAGMA_CLANG("clang diagnostic pop") 105 | 106 | #else 107 | 108 | # define PLCR_EXTERNAL_DEPRECATED PLCR_DEPRECATED 109 | # define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH() 110 | # define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH() 111 | 112 | #endif /* PLCR_PRIVATE */ 113 | 114 | #ifdef PLCR_PRIVATE 115 | # if defined(__clang__) && __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") 116 | # define PLCR_FALLTHROUGH [[clang::fallthrough]] 117 | # else 118 | # define PLCR_FALLTHROUGH do {} while (0) 119 | # endif 120 | #endif 121 | 122 | #ifdef PLCR_PRIVATE 123 | /** 124 | * @internal 125 | * Static compile-time assertion. 126 | * 127 | * @param name The assertion name; must be valid for use within a C identifier. 128 | * @param cond Assertion condition 129 | */ 130 | # define PLCR_ASSERT_STATIC(name, cond) PLCR_ASSERT_STATIC_(name, cond, __LINE__) 131 | /* 132 | * C++11 and C11 both provide a static_assert(). 133 | * 134 | * Otherwise, we have to use typedef-based static assertions. 135 | */ 136 | # if (defined(__cplusplus) && __cplusplus >= 201103L) || (!defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) 137 | # define PLCR_ASSERT_STATIC_(name, cond, line) PLCR_ASSERT_STATIC__(#name, cond) 138 | # define PLCR_ASSERT_STATIC__(name, cond) static_assert(cond, #name) 139 | # else 140 | # define PLCR_ASSERT_STATIC_(name, cond, line) PLCR_ASSERT_STATIC__(name, cond, line) 141 | # define PLCR_ASSERT_STATIC__(name, cond, line) typedef int plcf_static_assert_##name##_##line [(cond) ? 1 : -1] PLCR_UNUSED 142 | # endif 143 | #endif /* PLCR_PRIVATE */ 144 | 145 | #endif /* PLCRASH_CONSTANTS_H */ 146 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/79/7936fdf63d39af33a60fd4d3dc56b9988493b1f5.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #include "PLCrashMacros.h" 31 | @class PLCrashReportProcessorInfo; 32 | 33 | /** 34 | * @ingroup constants 35 | * 36 | * Indicates the Operating System under which a Crash Log was generated. 37 | * 38 | * @internal 39 | * These enum values match the protobuf values. Keep them synchronized. 40 | */ 41 | typedef enum { 42 | /** Mac OS X. */ 43 | PLCrashReportOperatingSystemMacOSX = 0, 44 | 45 | /** iPhone OS */ 46 | PLCrashReportOperatingSystemiPhoneOS = 1, 47 | 48 | /** iPhone Simulator (Mac OS X with additional simulator-specific runtime libraries) */ 49 | PLCrashReportOperatingSystemiPhoneSimulator = 2, 50 | 51 | /** Unknown operating system */ 52 | PLCrashReportOperatingSystemUnknown = 3, 53 | } PLCrashReportOperatingSystem; 54 | 55 | /** 56 | * @ingroup constants 57 | * 58 | * Indicates the architecture under which a Crash Log was generated. 59 | * 60 | * @note The architecture value has been deprecated in v1.1 and later crash reports. All new reports 61 | * will make use of the new PLCrashReportProcessorInfo CPU type encodings. 62 | * 63 | * @internal 64 | * These enum values match the protobuf values. Keep them synchronized. 65 | */ 66 | typedef enum { 67 | /** x86-32. */ 68 | PLCrashReportArchitectureX86_32 = 0, 69 | 70 | /** x86-64 */ 71 | PLCrashReportArchitectureX86_64 = 1, 72 | 73 | /** ARMv6 */ 74 | PLCrashReportArchitectureARMv6 = 2, 75 | 76 | /** 77 | * ARMv6 78 | * @deprecated This value has been deprecated in favor of ARM subtype-specific 79 | * values. 80 | * @sa PLCrashReportArchitectureARMv6 81 | */ 82 | PLCrashReportArchitectureARM PLCR_DEPRECATED = PLCrashReportArchitectureARMv6, 83 | 84 | /** PPC */ 85 | PLCrashReportArchitecturePPC = 3, 86 | 87 | /** PPC64 */ 88 | PLCrashReportArchitecturePPC64 = 4, 89 | 90 | /** ARMv7 */ 91 | PLCrashReportArchitectureARMv7 = 5, 92 | 93 | /** Unknown */ 94 | PLCrashReportArchitectureUnknown = 6 95 | } PLCrashReportArchitecture; 96 | 97 | 98 | extern PLCrashReportOperatingSystem PLCrashReportHostOperatingSystem; 99 | PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH(); 100 | extern PLCrashReportArchitecture PLCrashReportHostArchitecture PLCR_EXTERNAL_DEPRECATED; 101 | PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH(); 102 | 103 | @interface PLCrashReportSystemInfo : NSObject { 104 | @private 105 | /** Operating system */ 106 | PLCrashReportOperatingSystem _operatingSystem; 107 | 108 | /** Operating system version */ 109 | NSString *_osVersion; 110 | 111 | /** OS build. May be nil. */ 112 | NSString *_osBuild; 113 | 114 | /** Architecture */ 115 | PLCrashReportArchitecture _architecture; 116 | 117 | /** Date crash report was generated. May be nil if the date is unknown. */ 118 | NSDate *_timestamp; 119 | 120 | /** Processor information. */ 121 | PLCrashReportProcessorInfo *_processorInfo; 122 | } 123 | 124 | - (id) initWithOperatingSystem: (PLCrashReportOperatingSystem) operatingSystem 125 | operatingSystemVersion: (NSString *) operatingSystemVersion 126 | architecture: (PLCrashReportArchitecture) architecture 127 | timestamp: (NSDate *) timestamp PLCR_DEPRECATED; 128 | 129 | - (id) initWithOperatingSystem: (PLCrashReportOperatingSystem) operatingSystem 130 | operatingSystemVersion: (NSString *) operatingSystemVersion 131 | operatingSystemBuild: (NSString *) operatingSystemBuild 132 | architecture: (PLCrashReportArchitecture) architecture 133 | timestamp: (NSDate *) timestamp PLCR_DEPRECATED; 134 | 135 | - (id) initWithOperatingSystem: (PLCrashReportOperatingSystem) operatingSystem 136 | operatingSystemVersion: (NSString *) operatingSystemVersion 137 | operatingSystemBuild: (NSString *) operatingSystemBuild 138 | architecture: (PLCrashReportArchitecture) architecture 139 | processorInfo: (PLCrashReportProcessorInfo *) processorInfo 140 | timestamp: (NSDate *) timestamp; 141 | 142 | /** The operating system. */ 143 | @property(nonatomic, readonly) PLCrashReportOperatingSystem operatingSystem; 144 | 145 | /** The operating system's release version. */ 146 | @property(nonatomic, readonly) NSString *operatingSystemVersion; 147 | 148 | /** The operating system's build identifier (eg, 10J869). This may be unavailable, and this property will be nil. */ 149 | @property(nonatomic, readonly) NSString *operatingSystemBuild; 150 | 151 | /** Architecture. @deprecated The architecture value has been deprecated in v1.1 and later crash reports. All new reports 152 | * include the CPU type as part of the crash report's machine info structure, using the PLCrashReportProcessorInfo 153 | * extensible encoding. */ 154 | @property(nonatomic, readonly) PLCrashReportArchitecture architecture PLCR_DEPRECATED; 155 | 156 | /** Date and time that the crash report was generated. This may be unavailable, and this property will be nil. */ 157 | @property(nonatomic, readonly) NSDate *timestamp; 158 | 159 | /** The processor type. For v1.2 reports and later, this is an alias to the machine info's processorInfo. 160 | * For earlier reports, this will be synthesized from the deprecated architecture property. */ 161 | @property(nonatomic, readonly) PLCrashReportProcessorInfo *processorInfo; 162 | 163 | @end 164 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/79/7990b3a661e710ded6e807d797438fd2afb1e6e5.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportSignalInfo : NSObject { 32 | @private 33 | /** Signal name */ 34 | NSString *_name; 35 | 36 | /** Signal code */ 37 | NSString *_code; 38 | 39 | /** Fauling instruction or address */ 40 | uint64_t _address; 41 | } 42 | 43 | - (id) initWithSignalName: (NSString *) name code: (NSString *) code address: (uint64_t) address; 44 | 45 | /** 46 | * The signal name. 47 | */ 48 | @property(nonatomic, readonly) NSString *name; 49 | 50 | /** 51 | * The signal code. 52 | */ 53 | @property(nonatomic, readonly) NSString *code; 54 | 55 | /** 56 | * The faulting instruction or address. 57 | */ 58 | @property(nonatomic, readonly) uint64_t address; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/7e/7efdf8ddc11e92802ff54a3fd0ce448c0440f583.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportSymbolInfo.h" 31 | 32 | @interface PLCrashReportStackFrameInfo : NSObject { 33 | @private 34 | /** Frame instruction pointer. */ 35 | uint64_t _instructionPointer; 36 | 37 | /** Symbol information, if available. Otherwise, will be nil. */ 38 | PLCrashReportSymbolInfo *_symbolInfo; 39 | } 40 | 41 | - (id) initWithInstructionPointer: (uint64_t) instructionPointer symbolInfo: (PLCrashReportSymbolInfo *) symbolInfo; 42 | 43 | /** 44 | * Frame's instruction pointer. 45 | */ 46 | @property(nonatomic, readonly) uint64_t instructionPointer; 47 | 48 | /** Symbol information for this frame. 49 | * This may be unavailable, and this property will be nil. */ 50 | @property(nonatomic, readonly) PLCrashReportSymbolInfo *symbolInfo; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/7f/7fabe16d3b1be90b8b52d56b7104d21e7fab0a1d.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReportApplicationInfo.h" 32 | #import "PLCrashReportBinaryImageInfo.h" 33 | #import "PLCrashReportExceptionInfo.h" 34 | #import "PLCrashReportMachineInfo.h" 35 | #import "PLCrashReportMachExceptionInfo.h" 36 | #import "PLCrashReportProcessInfo.h" 37 | #import "PLCrashReportProcessorInfo.h" 38 | #import "PLCrashReportRegisterInfo.h" 39 | #import "PLCrashReportSignalInfo.h" 40 | #import "PLCrashReportStackFrameInfo.h" 41 | #import "PLCrashReportSymbolInfo.h" 42 | #import "PLCrashReportSystemInfo.h" 43 | #import "PLCrashReportThreadInfo.h" 44 | 45 | /** 46 | * @ingroup constants 47 | * Crash file magic identifier */ 48 | #define PLCRASH_REPORT_FILE_MAGIC "plcrash" 49 | 50 | /** 51 | * @ingroup constants 52 | * Crash format version byte identifier. Will not change outside of the introduction of 53 | * an entirely new crash log format. */ 54 | #define PLCRASH_REPORT_FILE_VERSION 1 55 | 56 | /** 57 | * @ingroup types 58 | * Crash log file header format. 59 | * 60 | * Crash log files start with 7 byte magic identifier (#PLCRASH_REPORT_FILE_MAGIC), 61 | * followed by a single unsigned byte version number (#PLCRASH_REPORT_FILE_VERSION). 62 | * The crash log message format itself is extensible, so this version number will only 63 | * be incremented in the event of an incompatible encoding or format change. 64 | */ 65 | struct PLCrashReportFileHeader { 66 | /** Crash log magic identifier, not NULL terminated */ 67 | const char magic[7]; 68 | 69 | /** Crash log encoding/format version */ 70 | const uint8_t version; 71 | 72 | /** File data */ 73 | const uint8_t data[]; 74 | } __attribute__((packed)); 75 | 76 | 77 | /** 78 | * @internal 79 | * Private decoder instance variables (used to hide the underlying protobuf parser). 80 | */ 81 | typedef struct _PLCrashReportDecoder _PLCrashReportDecoder; 82 | 83 | @interface PLCrashReport : NSObject { 84 | @private 85 | /** Private implementation variables (used to hide the underlying protobuf parser) */ 86 | _PLCrashReportDecoder *_decoder; 87 | 88 | /** System info */ 89 | PLCrashReportSystemInfo *_systemInfo; 90 | 91 | /** Machine info */ 92 | PLCrashReportMachineInfo *_machineInfo; 93 | 94 | /** Application info */ 95 | PLCrashReportApplicationInfo *_applicationInfo; 96 | 97 | /** Process info */ 98 | PLCrashReportProcessInfo *_processInfo; 99 | 100 | /** Signal info */ 101 | PLCrashReportSignalInfo *_signalInfo; 102 | 103 | /** Mach exception info */ 104 | PLCrashReportMachExceptionInfo *_machExceptionInfo; 105 | 106 | /** Thread info (PLCrashReportThreadInfo instances) */ 107 | NSArray *_threads; 108 | 109 | /** Binary images (PLCrashReportBinaryImageInfo instances */ 110 | NSArray *_images; 111 | 112 | /** Exception information (may be nil) */ 113 | PLCrashReportExceptionInfo *_exceptionInfo; 114 | 115 | /** Report UUID */ 116 | CFUUIDRef _uuid; 117 | } 118 | 119 | - (id) initWithData: (NSData *) encodedData error: (NSError **) outError; 120 | 121 | - (PLCrashReportBinaryImageInfo *) imageForAddress: (uint64_t) address; 122 | 123 | /** 124 | * System information. 125 | */ 126 | @property(nonatomic, readonly) PLCrashReportSystemInfo *systemInfo; 127 | 128 | /** 129 | * YES if machine information is available. 130 | */ 131 | @property(nonatomic, readonly) BOOL hasMachineInfo; 132 | 133 | /** 134 | * Machine information. Only available in later (v1.1+) crash report format versions. If not available, 135 | * will be nil. 136 | */ 137 | @property(nonatomic, readonly) PLCrashReportMachineInfo *machineInfo; 138 | 139 | /** 140 | * Application information. 141 | */ 142 | @property(nonatomic, readonly) PLCrashReportApplicationInfo *applicationInfo; 143 | 144 | /** 145 | * YES if process information is available. 146 | */ 147 | @property(nonatomic, readonly) BOOL hasProcessInfo; 148 | 149 | /** 150 | * Process information. Only available in later (v1.1+) crash report format versions. If not available, 151 | * will be nil. 152 | */ 153 | @property(nonatomic, readonly) PLCrashReportProcessInfo *processInfo; 154 | 155 | /** 156 | * Signal information. This provides the signal and signal code of the fatal signal. 157 | */ 158 | @property(nonatomic, readonly) PLCrashReportSignalInfo *signalInfo; 159 | 160 | /** 161 | * Mach exception information, if available. This will only be included in the 162 | * case that encoding crash reporter's exception-based reporting was enabled, and a Mach 163 | * exception was caught. 164 | * 165 | * @warning If Mach exception information is available, the legacy signalInfo property will also be provided; this 166 | * s required to maintain backwards compatibility with the established API. Note, however, that the signal info may be derived from the 167 | * Mach exception info by the encoding crash reporter, and thus may not exactly match the kernel exception-to-signal 168 | * mappings implemented in xnu. As such, when Mach exception info is available, its use should be preferred. 169 | */ 170 | @property(nonatomic, readonly) PLCrashReportMachExceptionInfo *machExceptionInfo; 171 | 172 | /** 173 | * Thread information. Returns a list of PLCrashReportThreadInfo instances. 174 | */ 175 | @property(nonatomic, readonly) NSArray *threads; 176 | 177 | /** 178 | * Binary image information. Returns a list of PLCrashReportBinaryImageInfo instances. 179 | */ 180 | @property(nonatomic, readonly) NSArray *images; 181 | 182 | /** 183 | * YES if exception information is available. 184 | */ 185 | @property(nonatomic, readonly) BOOL hasExceptionInfo; 186 | 187 | /** 188 | * Exception information. Only available if a crash was caused by an uncaught exception, 189 | * otherwise nil. 190 | */ 191 | @property(nonatomic, readonly) PLCrashReportExceptionInfo *exceptionInfo; 192 | 193 | /** 194 | * A client-generated 16-byte UUID. May be used to filter duplicate reports submitted or generated 195 | * by a single client. Only available in later (v1.2+) crash report format versions. If not available, 196 | * will be NULL. 197 | */ 198 | @property(nonatomic, readonly) CFUUIDRef uuidRef; 199 | 200 | @end 201 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/83/83f1ef71e4b51512313446364e2db78911330a7c.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportMachExceptionInfo : NSObject { 32 | @private 33 | /** The Mach exception type. */ 34 | uint64_t _type; 35 | 36 | /** The Mach exception codes, represented as an ordered array of NSNumber instances. */ 37 | NSArray *_codes; 38 | } 39 | 40 | - (id) initWithType: (uint64_t) type codes: (NSArray *) codes; 41 | 42 | /** The Mach exception type. */ 43 | @property(nonatomic, readonly) uint64_t type; 44 | 45 | /** The Mach exception codes, represented as an ordered array of 64-bit unsigned NSNumber instances. */ 46 | @property(nonatomic, readonly) NSArray *codes; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/8d/8d448e33c67a62f13eea2c97c7b911371eaa988d.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faimin/PerformanceMonitor/3bee775fc0c385956718544aca2210bcd7050950/PerformanceMonitor/CrashReporter.framework/.svn/pristine/8d/8d448e33c67a62f13eea2c97c7b911371eaa988d.svn-base -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/8e/8e5ee09ed62de2426359c337bb64575bb4005907.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Authors: 3 | * Landon Fuller 4 | * Damian Morris 5 | * 6 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 7 | * Copyright (c) 2010 MOSO Corporation, Pty Ltd. 8 | * All rights reserved. 9 | * 10 | * Permission is hereby granted, free of charge, to any person 11 | * obtaining a copy of this software and associated documentation 12 | * files (the "Software"), to deal in the Software without 13 | * restriction, including without limitation the rights to use, 14 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | * copies of the Software, and to permit persons to whom the 16 | * Software is furnished to do so, subject to the following 17 | * conditions: 18 | * 19 | * The above copyright notice and this permission notice shall be 20 | * included in all copies or substantial portions of the Software. 21 | * 22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 24 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 26 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 27 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 29 | * OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | 32 | 33 | #import 34 | 35 | #import "PLCrashReportFormatter.h" 36 | 37 | /** 38 | * Supported text output formats. 39 | * 40 | * @ingroup enums 41 | */ 42 | typedef enum { 43 | /** An iOS-compatible crash log text format. Compatible with the crash logs generated by the device and available 44 | * through iTunes Connect. */ 45 | PLCrashReportTextFormatiOS = 0 46 | } PLCrashReportTextFormat; 47 | 48 | 49 | @interface PLCrashReportTextFormatter : NSObject { 50 | @private 51 | /** Text output format. */ 52 | PLCrashReportTextFormat _textFormat; 53 | 54 | /** Encoding to use for string output. */ 55 | NSStringEncoding _stringEncoding; 56 | } 57 | 58 | + (NSString *) stringValueForCrashReport: (PLCrashReport *) report withTextFormat: (PLCrashReportTextFormat) textFormat; 59 | 60 | - (id) initWithTextFormat: (PLCrashReportTextFormat) textFormat stringEncoding: (NSStringEncoding) stringEncoding; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/a1/a1290f8354de21ee76c0fa940c895ac046bff886.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2012-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportSymbolInfo : NSObject { 32 | @private 33 | /** The symbol name. */ 34 | NSString *_symbolName; 35 | 36 | /** The symbol start address. */ 37 | uint64_t _startAddress; 38 | 39 | /** The symbol end address, if explicitly defined. Will be 0 if unknown. */ 40 | uint64_t _endAddress; 41 | } 42 | 43 | - (id) initWithSymbolName: (NSString *) symbolName 44 | startAddress: (uint64_t) startAddress 45 | endAddress: (uint64_t) endAddress; 46 | 47 | /** The symbol name. */ 48 | @property(nonatomic, readonly) NSString *symbolName; 49 | 50 | /** The symbol start address. */ 51 | @property(nonatomic, readonly) uint64_t startAddress; 52 | 53 | /* The symbol end address, if explicitly defined. This will only be included if the end address is 54 | * explicitly defined (eg, by DWARF debugging information), will not be derived by best-guess 55 | * heuristics. 56 | * 57 | * If unknown, the address will be 0. 58 | */ 59 | @property(nonatomic, readonly) uint64_t endAddress; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/b1/b11d8240b08319779228758644b7d3fb84d58c4b.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #ifndef PLCRASH_ASYNC_SIGNAL_INFO_H 30 | #define PLCRASH_ASYNC_SIGNAL_INFO_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | /** 37 | * @internal 38 | * 39 | * @defgroup plcrash_async_signal_info Signal Information 40 | * @ingroup plcrash_async 41 | * 42 | * Provides mapping of signal number and code to strings. 43 | * 44 | * @{ 45 | */ 46 | 47 | const char *plcrash_async_signal_signame (int signal); 48 | const char *plcrash_async_signal_sigcode (int signal, int si_code); 49 | 50 | /** 51 | * @} plcrash_async_signal_info 52 | */ 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif /* PLCRASH_ASYNC_SIGNAL_INFO_H */ 59 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/b4/b4beb99c252244c0b9c365ad0c81674f2cf8f90f.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReportProcessorInfo.h" 32 | 33 | @interface PLCrashReportMachineInfo : NSObject { 34 | @private 35 | /** The hardware model name (eg, MacBookPro6,1). This may be unavailable, and this property will be nil. */ 36 | NSString *_modelName; 37 | 38 | /** The processor type. */ 39 | PLCrashReportProcessorInfo *_processorInfo; 40 | 41 | /* The number of actual physical processor cores. */ 42 | NSUInteger _processorCount; 43 | 44 | /* The number of logical processors. */ 45 | NSUInteger _logicalProcessorCount; 46 | } 47 | 48 | - (id) initWithModelName: (NSString *) modelName 49 | processorInfo: (PLCrashReportProcessorInfo *) processorInfo 50 | processorCount: (NSUInteger) processorCount 51 | logicalProcessorCount: (NSUInteger) logicalProcessorCount; 52 | 53 | /** The hardware model name (eg, MacBookPro6,1). This may be unavailable, and this property will be nil. */ 54 | @property(nonatomic, readonly) NSString *modelName; 55 | 56 | /** The processor type. This will be unavailable in reports generated prior to PLCrashReporter 1.2, in which case this property will be nil. */ 57 | @property(nonatomic, readonly) PLCrashReportProcessorInfo *processorInfo; 58 | 59 | /* 60 | * The number of actual physical processor cores. Note that the number of active processors may be managed by the 61 | * operating system's power management system, and this value may not reflect the number of active 62 | * processors at the time of the crash. 63 | */ 64 | @property(nonatomic, readonly) NSUInteger processorCount; 65 | 66 | /* 67 | * The number of logical processors. Note that the number of active processors may be managed by the 68 | * operating system's power management system, and this value may not reflect the number of active 69 | * processors at the time of the crash. 70 | */ 71 | @property(nonatomic, readonly) NSUInteger logicalProcessorCount; 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/c1/c14937ab645201e1df23aa0bc20b04e53ac9b041.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportProcessorInfo.h" 31 | 32 | @interface PLCrashReportBinaryImageInfo : NSObject { 33 | @private 34 | /** Code type */ 35 | PLCrashReportProcessorInfo *_processorInfo; 36 | 37 | /** Base image address */ 38 | uint64_t _baseAddress; 39 | 40 | /** Image segment size */ 41 | uint64_t _imageSize; 42 | 43 | /** Name of binary image */ 44 | NSString *_imageName; 45 | 46 | /** If the UUID is available */ 47 | BOOL _hasImageUUID; 48 | 49 | /** 128-bit object UUID. May be nil. */ 50 | NSString *_imageUUID; 51 | } 52 | 53 | - (id) initWithCodeType: (PLCrashReportProcessorInfo *) processorInfo 54 | baseAddress: (uint64_t) baseAddress 55 | size: (uint64_t) imageSize 56 | name: (NSString *) imageName 57 | uuid: (NSData *) uuid; 58 | 59 | /** 60 | * Image code type, or nil if unavailable. 61 | */ 62 | @property(nonatomic, readonly) PLCrashReportProcessorInfo *codeType; 63 | 64 | /** 65 | * Image base address. 66 | */ 67 | @property(nonatomic, readonly) uint64_t imageBaseAddress; 68 | 69 | /** 70 | * Segment size. 71 | */ 72 | @property(nonatomic, readonly) uint64_t imageSize; 73 | 74 | /** 75 | * Image name (absolute path) 76 | */ 77 | @property(nonatomic, readonly) NSString *imageName; 78 | 79 | 80 | /** 81 | * YES if this image has an associated UUID. 82 | */ 83 | @property(nonatomic, readonly) BOOL hasImageUUID; 84 | 85 | /** 86 | * 128-bit object UUID (matches Mach-O DWARF dSYM files). May be nil if unavailable. 87 | */ 88 | @property(nonatomic, readonly) NSString *imageUUID; 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/c3/c3d76c81284e10ccb1ecb091ef0311f2af5acccb.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReportStackFrameInfo.h" 32 | #import "PLCrashReportRegisterInfo.h" 33 | 34 | @interface PLCrashReportThreadInfo : NSObject { 35 | @private 36 | /** The thread number. Should be unique within a given crash log. */ 37 | NSInteger _threadNumber; 38 | 39 | /** Ordered list of PLCrashReportStackFrame instances */ 40 | NSArray *_stackFrames; 41 | 42 | /** YES if this thread crashed. */ 43 | BOOL _crashed; 44 | 45 | /** List of PLCrashReportRegister instances. Will be empty if _crashed is NO. */ 46 | NSArray *_registers; 47 | } 48 | 49 | - (id) initWithThreadNumber: (NSInteger) threadNumber 50 | stackFrames: (NSArray *) stackFrames 51 | crashed: (BOOL) crashed 52 | registers: (NSArray *) registers; 53 | 54 | /** 55 | * Application thread number. 56 | */ 57 | @property(nonatomic, readonly) NSInteger threadNumber; 58 | 59 | /** 60 | * Thread backtrace. Provides an array of PLCrashReportStackFrameInfo instances. 61 | * The array is ordered, last callee to first. 62 | */ 63 | @property(nonatomic, readonly) NSArray *stackFrames; 64 | 65 | /** 66 | * If this thread crashed, set to YES. 67 | */ 68 | @property(nonatomic, readonly) BOOL crashed; 69 | 70 | /** 71 | * State of the general purpose and related registers, as a list of 72 | * PLCrashReportRegister instances. If this thead did not crash (crashed returns NO), 73 | * this list will be empty. 74 | */ 75 | @property(nonatomic, readonly) NSArray *registers; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/cb/cbd2bd911f2c9f28f0408b5e5b2d68f3acf91e42.svn-base: -------------------------------------------------------------------------------- 1 | link Versions/Current/Headers -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/ce/ce71abb0d508b36f9ed0b197fc19ec2f3df3bd8f.svn-base: -------------------------------------------------------------------------------- 1 | link Versions/Current/Resources -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/cf/cfce5d4fbb9855b5ff4574f0dd08c8a9155d51d2.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReport.h" 32 | 33 | /** 34 | * A crash report formatter accepts a PLCrashReport instance, formats it according to implementation-specified rules, 35 | * (such as implementing text output support), and returns the result. 36 | */ 37 | @protocol PLCrashReportFormatter 38 | 39 | /** 40 | * Format the provided @a report. 41 | * 42 | * @param report Report to be formatted. 43 | * @param outError A pointer to an NSError object variable. If an error occurs, this pointer will contain an error 44 | * object indicating why the pending crash report could not be formatted. If no error occurs, this parameter will 45 | * be left unmodified. You may specify nil for this parameter, and no error information will be provided. 46 | * 47 | * @return Returns the formatted report data on success, or nil on failure. 48 | */ 49 | - (NSData *) formatReport: (PLCrashReport *) report error: (NSError **) outError; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/e3/e36a353a48fcf6bf90beb5c372dd2f2e6e16388c.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Damian Morris 3 | * 4 | * Copyright (c) 2010 MOSO Corporation, Pty Ltd. 5 | * Copyright (c) 2010-2013 Plausible Labs Cooperative, Inc. 6 | * 7 | * All rights reserved. 8 | * 9 | * Permission is hereby granted, free of charge, to any person 10 | * obtaining a copy of this software and associated documentation 11 | * files (the "Software"), to deal in the Software without 12 | * restriction, including without limitation the rights to use, 13 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the 15 | * Software is furnished to do so, subject to the following 16 | * conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be 19 | * included in all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | * OTHER DEALINGS IN THE SOFTWARE. 29 | */ 30 | 31 | #import 32 | 33 | @interface PLCrashReportProcessInfo : NSObject { 34 | @private 35 | /** Process name, or nil if unavailable. */ 36 | NSString *_processName; 37 | 38 | /** Process ID */ 39 | NSUInteger _processID; 40 | 41 | /** Process path */ 42 | NSString* _processPath; 43 | 44 | /** Date and time that the crashing process was started. This may be unavailable, and this property 45 | * will be nil. */ 46 | NSDate *_processStartTime; 47 | 48 | /** Parent process name, or nil if unavailable. */ 49 | NSString *_parentProcessName; 50 | 51 | /** Parent process ID */ 52 | NSUInteger _parentProcessID; 53 | 54 | /** If false, the process is being run via process-level CPU emulation (such as Rosetta). */ 55 | BOOL _native; 56 | } 57 | 58 | - (id) initWithProcessName: (NSString *) processName 59 | processID: (NSUInteger) processID 60 | processPath: (NSString *) processPath 61 | processStartTime: (NSDate *) processStartTime 62 | parentProcessName: (NSString *) parentProcessName 63 | parentProcessID: (NSUInteger) parentProcessID 64 | native: (BOOL) native; 65 | 66 | /** 67 | * The process name. This value may not be included in the crash report, in which case this property 68 | * will be nil. 69 | */ 70 | @property(nonatomic, readonly) NSString *processName; 71 | 72 | /** 73 | * The process ID. 74 | */ 75 | @property(nonatomic, readonly) NSUInteger processID; 76 | 77 | /** 78 | * The path to the process executable. This value may not be included in the crash report, in which case this property 79 | * will be nil. 80 | */ 81 | @property(nonatomic, readonly) NSString *processPath; 82 | 83 | /** 84 | * Date and time that the crashing process was started. This value may not be included in the crash report, in which case this property 85 | * will be nil. 86 | */ 87 | @property(nonatomic, readonly) NSDate *processStartTime; 88 | 89 | /** 90 | * The parent process name. This value may not be included in the crash report, in which case this property 91 | * will be nil. 92 | */ 93 | @property(nonatomic, readonly) NSString *parentProcessName; 94 | 95 | /** 96 | * The parent process ID. 97 | */ 98 | @property(nonatomic, readonly) NSUInteger parentProcessID; 99 | 100 | /** The process' native execution status. If false, the process is being run via process-level CPU emulation (such as Rosetta). */ 101 | @property(nonatomic, readonly) BOOL native; 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/pristine/f3/f3bd95bae40f8d8cd6e816dd6ff6fc524e8166f5.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportRegisterInfo : NSObject { 32 | @private 33 | /** Register name */ 34 | NSString *_registerName; 35 | 36 | /** Register value */ 37 | uint64_t _registerValue; 38 | } 39 | 40 | - (id) initWithRegisterName: (NSString *) registerName registerValue: (uint64_t) registerValue; 41 | 42 | /** 43 | * Register name. 44 | */ 45 | @property(nonatomic, readonly) NSString *registerName; 46 | 47 | /** 48 | * Register value. 49 | */ 50 | @property(nonatomic, readonly) uint64_t registerValue; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/.svn/wc.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faimin/PerformanceMonitor/3bee775fc0c385956718544aca2210bcd7050950/PerformanceMonitor/CrashReporter.framework/.svn/wc.db -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/CrashReporter: -------------------------------------------------------------------------------- 1 | Versions/Current/CrashReporter -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/CrashReporter: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faimin/PerformanceMonitor/3bee775fc0c385956718544aca2210bcd7050950/PerformanceMonitor/CrashReporter.framework/Versions/A/CrashReporter -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashAsyncSignalInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #ifndef PLCRASH_ASYNC_SIGNAL_INFO_H 30 | #define PLCRASH_ASYNC_SIGNAL_INFO_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | /** 37 | * @internal 38 | * 39 | * @defgroup plcrash_async_signal_info Signal Information 40 | * @ingroup plcrash_async 41 | * 42 | * Provides mapping of signal number and code to strings. 43 | * 44 | * @{ 45 | */ 46 | 47 | const char *plcrash_async_signal_signame (int signal); 48 | const char *plcrash_async_signal_sigcode (int signal, int si_code); 49 | 50 | /** 51 | * @} plcrash_async_signal_info 52 | */ 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif /* PLCRASH_ASYNC_SIGNAL_INFO_H */ 59 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashFeatureConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2012-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #ifndef PLCRASH_FEATURE_CONFIG_H 30 | #define PLCRASH_FEATURE_CONFIG_H 31 | 32 | #include 33 | 34 | /** 35 | * @internal 36 | * 37 | * Build-time configuration for PLCrashReporter. 38 | * 39 | * This is used to automatically enable/disable features on a per-platform and per-configuration 40 | * basis; it may also be used by third-party vendors to configure a custom build of PLCrashReporter. 41 | * 42 | * @defgroup build_config Build Configuration 43 | * @ingroup constants 44 | * @{ 45 | */ 46 | 47 | /* 48 | * Defaults 49 | */ 50 | 51 | /* 52 | * For release builds, disable unused unwind implementations on targets that do not use them. For non-release 53 | * builds, we include the unwind implementations to allow testing on a broader range of targets. 54 | */ 55 | #ifdef PLCF_RELEASE_BUILD 56 | # if defined(__arm__) 57 | # ifndef PLCRASH_FEATURE_UNWIND_DWARF 58 | # define PLCRASH_FEATURE_UNWIND_DWARF 0 59 | # endif 60 | # ifndef PLCRASH_FEATURE_UNWIND_COMPACT 61 | # define PLCRASH_FEATURE_UNWIND_COMPACT 0 62 | # endif 63 | # endif 64 | #endif 65 | 66 | /* 67 | * Configuration Flags 68 | */ 69 | 70 | 71 | #ifndef PLCRASH_FEATURE_MACH_EXCEPTIONS 72 | /** 73 | * If true, enable Mach exception support. On Mac OS X, the Mach exception implementation is fully supported, 74 | * using publicly available API. On iOS, the APIs required for a complete implementation are not public. However, a 75 | * popular commercial crash reporter is now shipping with support for Mach exceptions, which implies that either 76 | * they've received special dispensation to use private APIs / private structures, they've found another way to do 77 | * it, or they're just using undocumented functionality and hoping for the best. 78 | * 79 | * The exposed surface of undocumented API usage is relatively low, and there has been strong user demand to 80 | * implement Mach exception handling regardless of concerns over API visiblity. Given this, we've enabled 81 | * Mach exception handling by default, and provided both build-time and runtime configuration 82 | * to disable its use. 83 | * 84 | * For more information on the potential issues with enabling mach exception support, @sa @ref mach_exceptions. 85 | */ 86 | # define PLCRASH_FEATURE_MACH_EXCEPTIONS 1 87 | #endif 88 | 89 | #ifndef PLCRASH_FEATURE_UNWIND_DWARF 90 | /** If true, enable DWARF unwinding support. */ 91 | # define PLCRASH_FEATURE_UNWIND_DWARF 1 92 | #endif 93 | 94 | 95 | #ifndef PLCRASH_FEATURE_UNWIND_COMPACT 96 | /** If true, enable compact unwinding support. */ 97 | # define PLCRASH_FEATURE_UNWIND_COMPACT 1 98 | #endif 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | #endif /* PLCRASH_FEATURE_CONFIG_H */ 105 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashMacros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #ifndef PLCRASH_CONSTANTS_H 30 | #define PLCRASH_CONSTANTS_H 31 | 32 | #include 33 | 34 | #if defined(__cplusplus) 35 | # define PLCR_EXPORT extern "C" 36 | # define PLCR_C_BEGIN_DECLS extern "C" { 37 | # define PLCR_C_END_DECLS } 38 | #else 39 | # define PLCR_EXPORT extern 40 | # define PLCR_C_BEGIN_DECLS 41 | # define PLCR_C_END_DECLS 42 | #endif 43 | 44 | #if defined(__cplusplus) 45 | # if defined(PLCRASHREPORTER_PREFIX) 46 | /** @internal Define the plcrash namespace, automatically inserting an inline namespace containing the configured PLCRASHREPORTER_PREFIX, if any. */ 47 | # define PLCR_CPP_BEGIN_NS namespace plcrash { inline namespace PLCRASHREPORTER_PREFIX { 48 | 49 | /** @internal Close the definition of the `plcrash` namespace (and the PLCRASHREPORTER_PREFIX inline namespace, if any). */ 50 | # define PLCR_CPP_END_NS }} 51 | # else 52 | # define PLCR_CPP_BEGIN_NS namespace plcrash { 53 | # define PLCR_CPP_END_NS } 54 | # endif 55 | # 56 | /** @internal Define the plcrash::async namespace, automatically inserting an inline namespace containing the configured PLCRASHREPORTER_PREFIX, if any. */ 57 | # define PLCR_CPP_BEGIN_ASYNC_NS PLCR_CPP_BEGIN_NS namespace async { 58 | 59 | /** @internal Close the definition of the `plcrash::async` namespace (and the PLCRASHREPORTER_PREFIX inline namespace, if any). */ 60 | # define PLCR_CPP_END_ASYNC_NS PLCR_CPP_END_NS } 61 | #endif 62 | 63 | #ifdef __clang__ 64 | # define PLCR_PRAGMA_CLANG(_p) _Pragma(_p) 65 | #else 66 | # define PLCR_PRAGMA_CLANG(_p) 67 | #endif 68 | 69 | #ifdef __clang__ 70 | # define PLCR_DEPRECATED __attribute__((deprecated)) 71 | #else 72 | # define PLCR_DEPRECATED 73 | #endif 74 | 75 | #if defined(__clang__) || defined(__GNUC__) 76 | # define PLCR_UNUSED __attribute__((unused)) 77 | #else 78 | # define PLCR_UNUSED 79 | #endif 80 | 81 | #ifdef PLCR_PRIVATE 82 | /** 83 | * Marks a definition as deprecated only for for external clients, allowing 84 | * uses of it internal fo the framework. 85 | */ 86 | # define PLCR_EXTERNAL_DEPRECATED 87 | 88 | /** 89 | * @internal 90 | * A macro to put above a definition marked PLCR_EXTERNAL_DEPRECATED that will 91 | * silence warnings about there being a deprecation documentation marker but the 92 | * definition not being marked deprecated. 93 | */ 94 | # define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH() \ 95 | PLCR_PRAGMA_CLANG("clang diagnostic push"); \ 96 | PLCR_PRAGMA_CLANG("clang diagnostic ignored \"-Wdocumentation-deprecated-sync\"") 97 | 98 | /** 99 | * @internal 100 | * A macro to put below a definition marked PLCR_EXTERNAL_DEPRECATED that will 101 | * silence warnings about there being a deprecation documentation marker but the 102 | * definition not being marked deprecated. 103 | */ 104 | # define PLCR_EXTERNAL_DEPRECATED_NOWARN_POP() PLCR_PRAGMA_CLANG("clang diagnostic pop") 105 | 106 | #else 107 | 108 | # define PLCR_EXTERNAL_DEPRECATED PLCR_DEPRECATED 109 | # define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH() 110 | # define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH() 111 | 112 | #endif /* PLCR_PRIVATE */ 113 | 114 | #ifdef PLCR_PRIVATE 115 | # if defined(__clang__) && __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") 116 | # define PLCR_FALLTHROUGH [[clang::fallthrough]] 117 | # else 118 | # define PLCR_FALLTHROUGH do {} while (0) 119 | # endif 120 | #endif 121 | 122 | #ifdef PLCR_PRIVATE 123 | /** 124 | * @internal 125 | * Static compile-time assertion. 126 | * 127 | * @param name The assertion name; must be valid for use within a C identifier. 128 | * @param cond Assertion condition 129 | */ 130 | # define PLCR_ASSERT_STATIC(name, cond) PLCR_ASSERT_STATIC_(name, cond, __LINE__) 131 | /* 132 | * C++11 and C11 both provide a static_assert(). 133 | * 134 | * Otherwise, we have to use typedef-based static assertions. 135 | */ 136 | # if (defined(__cplusplus) && __cplusplus >= 201103L) || (!defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) 137 | # define PLCR_ASSERT_STATIC_(name, cond, line) PLCR_ASSERT_STATIC__(#name, cond) 138 | # define PLCR_ASSERT_STATIC__(name, cond) static_assert(cond, #name) 139 | # else 140 | # define PLCR_ASSERT_STATIC_(name, cond, line) PLCR_ASSERT_STATIC__(name, cond, line) 141 | # define PLCR_ASSERT_STATIC__(name, cond, line) typedef int plcf_static_assert_##name##_##line [(cond) ? 1 : -1] PLCR_UNUSED 142 | # endif 143 | #endif /* PLCR_PRIVATE */ 144 | 145 | #endif /* PLCRASH_CONSTANTS_H */ 146 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReportApplicationInfo.h" 32 | #import "PLCrashReportBinaryImageInfo.h" 33 | #import "PLCrashReportExceptionInfo.h" 34 | #import "PLCrashReportMachineInfo.h" 35 | #import "PLCrashReportMachExceptionInfo.h" 36 | #import "PLCrashReportProcessInfo.h" 37 | #import "PLCrashReportProcessorInfo.h" 38 | #import "PLCrashReportRegisterInfo.h" 39 | #import "PLCrashReportSignalInfo.h" 40 | #import "PLCrashReportStackFrameInfo.h" 41 | #import "PLCrashReportSymbolInfo.h" 42 | #import "PLCrashReportSystemInfo.h" 43 | #import "PLCrashReportThreadInfo.h" 44 | 45 | /** 46 | * @ingroup constants 47 | * Crash file magic identifier */ 48 | #define PLCRASH_REPORT_FILE_MAGIC "plcrash" 49 | 50 | /** 51 | * @ingroup constants 52 | * Crash format version byte identifier. Will not change outside of the introduction of 53 | * an entirely new crash log format. */ 54 | #define PLCRASH_REPORT_FILE_VERSION 1 55 | 56 | /** 57 | * @ingroup types 58 | * Crash log file header format. 59 | * 60 | * Crash log files start with 7 byte magic identifier (#PLCRASH_REPORT_FILE_MAGIC), 61 | * followed by a single unsigned byte version number (#PLCRASH_REPORT_FILE_VERSION). 62 | * The crash log message format itself is extensible, so this version number will only 63 | * be incremented in the event of an incompatible encoding or format change. 64 | */ 65 | struct PLCrashReportFileHeader { 66 | /** Crash log magic identifier, not NULL terminated */ 67 | const char magic[7]; 68 | 69 | /** Crash log encoding/format version */ 70 | const uint8_t version; 71 | 72 | /** File data */ 73 | const uint8_t data[]; 74 | } __attribute__((packed)); 75 | 76 | 77 | /** 78 | * @internal 79 | * Private decoder instance variables (used to hide the underlying protobuf parser). 80 | */ 81 | typedef struct _PLCrashReportDecoder _PLCrashReportDecoder; 82 | 83 | @interface PLCrashReport : NSObject { 84 | @private 85 | /** Private implementation variables (used to hide the underlying protobuf parser) */ 86 | _PLCrashReportDecoder *_decoder; 87 | 88 | /** System info */ 89 | PLCrashReportSystemInfo *_systemInfo; 90 | 91 | /** Machine info */ 92 | PLCrashReportMachineInfo *_machineInfo; 93 | 94 | /** Application info */ 95 | PLCrashReportApplicationInfo *_applicationInfo; 96 | 97 | /** Process info */ 98 | PLCrashReportProcessInfo *_processInfo; 99 | 100 | /** Signal info */ 101 | PLCrashReportSignalInfo *_signalInfo; 102 | 103 | /** Mach exception info */ 104 | PLCrashReportMachExceptionInfo *_machExceptionInfo; 105 | 106 | /** Thread info (PLCrashReportThreadInfo instances) */ 107 | NSArray *_threads; 108 | 109 | /** Binary images (PLCrashReportBinaryImageInfo instances */ 110 | NSArray *_images; 111 | 112 | /** Exception information (may be nil) */ 113 | PLCrashReportExceptionInfo *_exceptionInfo; 114 | 115 | /** Report UUID */ 116 | CFUUIDRef _uuid; 117 | } 118 | 119 | - (id) initWithData: (NSData *) encodedData error: (NSError **) outError; 120 | 121 | - (PLCrashReportBinaryImageInfo *) imageForAddress: (uint64_t) address; 122 | 123 | /** 124 | * System information. 125 | */ 126 | @property(nonatomic, readonly) PLCrashReportSystemInfo *systemInfo; 127 | 128 | /** 129 | * YES if machine information is available. 130 | */ 131 | @property(nonatomic, readonly) BOOL hasMachineInfo; 132 | 133 | /** 134 | * Machine information. Only available in later (v1.1+) crash report format versions. If not available, 135 | * will be nil. 136 | */ 137 | @property(nonatomic, readonly) PLCrashReportMachineInfo *machineInfo; 138 | 139 | /** 140 | * Application information. 141 | */ 142 | @property(nonatomic, readonly) PLCrashReportApplicationInfo *applicationInfo; 143 | 144 | /** 145 | * YES if process information is available. 146 | */ 147 | @property(nonatomic, readonly) BOOL hasProcessInfo; 148 | 149 | /** 150 | * Process information. Only available in later (v1.1+) crash report format versions. If not available, 151 | * will be nil. 152 | */ 153 | @property(nonatomic, readonly) PLCrashReportProcessInfo *processInfo; 154 | 155 | /** 156 | * Signal information. This provides the signal and signal code of the fatal signal. 157 | */ 158 | @property(nonatomic, readonly) PLCrashReportSignalInfo *signalInfo; 159 | 160 | /** 161 | * Mach exception information, if available. This will only be included in the 162 | * case that encoding crash reporter's exception-based reporting was enabled, and a Mach 163 | * exception was caught. 164 | * 165 | * @warning If Mach exception information is available, the legacy signalInfo property will also be provided; this 166 | * s required to maintain backwards compatibility with the established API. Note, however, that the signal info may be derived from the 167 | * Mach exception info by the encoding crash reporter, and thus may not exactly match the kernel exception-to-signal 168 | * mappings implemented in xnu. As such, when Mach exception info is available, its use should be preferred. 169 | */ 170 | @property(nonatomic, readonly) PLCrashReportMachExceptionInfo *machExceptionInfo; 171 | 172 | /** 173 | * Thread information. Returns a list of PLCrashReportThreadInfo instances. 174 | */ 175 | @property(nonatomic, readonly) NSArray *threads; 176 | 177 | /** 178 | * Binary image information. Returns a list of PLCrashReportBinaryImageInfo instances. 179 | */ 180 | @property(nonatomic, readonly) NSArray *images; 181 | 182 | /** 183 | * YES if exception information is available. 184 | */ 185 | @property(nonatomic, readonly) BOOL hasExceptionInfo; 186 | 187 | /** 188 | * Exception information. Only available if a crash was caused by an uncaught exception, 189 | * otherwise nil. 190 | */ 191 | @property(nonatomic, readonly) PLCrashReportExceptionInfo *exceptionInfo; 192 | 193 | /** 194 | * A client-generated 16-byte UUID. May be used to filter duplicate reports submitted or generated 195 | * by a single client. Only available in later (v1.2+) crash report format versions. If not available, 196 | * will be NULL. 197 | */ 198 | @property(nonatomic, readonly) CFUUIDRef uuidRef; 199 | 200 | @end 201 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportApplicationInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportApplicationInfo : NSObject { 32 | @private 33 | /** Application identifier */ 34 | NSString *_applicationIdentifier; 35 | 36 | /** Application version */ 37 | NSString *_applicationVersion; 38 | 39 | /** Application marketing version */ 40 | NSString *_applicationMarketingVersion; 41 | } 42 | 43 | - (id) initWithApplicationIdentifier: (NSString *) applicationIdentifier 44 | applicationVersion: (NSString *) applicationVersion 45 | applicationMarketingVersion: (NSString *) applicationMarketingVersion; 46 | 47 | /** 48 | * The application identifier. This is usually the application's CFBundleIdentifier value. 49 | */ 50 | @property(nonatomic, readonly) NSString *applicationIdentifier; 51 | 52 | /** 53 | * The application version. This is usually the application's CFBundleVersion value. 54 | */ 55 | @property(nonatomic, readonly) NSString *applicationVersion; 56 | 57 | /** 58 | * The application marketing version. This is usually the application's CFBundleShortVersionString value if available. May be nil. 59 | */ 60 | @property(nonatomic, readonly) NSString *applicationMarketingVersion; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportBinaryImageInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportProcessorInfo.h" 31 | 32 | @interface PLCrashReportBinaryImageInfo : NSObject { 33 | @private 34 | /** Code type */ 35 | PLCrashReportProcessorInfo *_processorInfo; 36 | 37 | /** Base image address */ 38 | uint64_t _baseAddress; 39 | 40 | /** Image segment size */ 41 | uint64_t _imageSize; 42 | 43 | /** Name of binary image */ 44 | NSString *_imageName; 45 | 46 | /** If the UUID is available */ 47 | BOOL _hasImageUUID; 48 | 49 | /** 128-bit object UUID. May be nil. */ 50 | NSString *_imageUUID; 51 | } 52 | 53 | - (id) initWithCodeType: (PLCrashReportProcessorInfo *) processorInfo 54 | baseAddress: (uint64_t) baseAddress 55 | size: (uint64_t) imageSize 56 | name: (NSString *) imageName 57 | uuid: (NSData *) uuid; 58 | 59 | /** 60 | * Image code type, or nil if unavailable. 61 | */ 62 | @property(nonatomic, readonly) PLCrashReportProcessorInfo *codeType; 63 | 64 | /** 65 | * Image base address. 66 | */ 67 | @property(nonatomic, readonly) uint64_t imageBaseAddress; 68 | 69 | /** 70 | * Segment size. 71 | */ 72 | @property(nonatomic, readonly) uint64_t imageSize; 73 | 74 | /** 75 | * Image name (absolute path) 76 | */ 77 | @property(nonatomic, readonly) NSString *imageName; 78 | 79 | 80 | /** 81 | * YES if this image has an associated UUID. 82 | */ 83 | @property(nonatomic, readonly) BOOL hasImageUUID; 84 | 85 | /** 86 | * 128-bit object UUID (matches Mach-O DWARF dSYM files). May be nil if unavailable. 87 | */ 88 | @property(nonatomic, readonly) NSString *imageUUID; 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportExceptionInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportThreadInfo.h" 31 | 32 | 33 | @interface PLCrashReportExceptionInfo : NSObject { 34 | @private 35 | /** Name */ 36 | NSString *_name; 37 | 38 | /** Reason */ 39 | NSString *_reason; 40 | 41 | /** Ordered list of PLCrashReportStackFrame instances, or nil if unavailable. */ 42 | NSArray *_stackFrames; 43 | } 44 | 45 | - (id) initWithExceptionName: (NSString *) name reason: (NSString *) reason; 46 | 47 | - (id) initWithExceptionName: (NSString *) name 48 | reason: (NSString *) reason 49 | stackFrames: (NSArray *) stackFrames; 50 | 51 | /** 52 | * The exception name. 53 | */ 54 | @property(nonatomic, readonly) NSString *exceptionName; 55 | 56 | /** 57 | * The exception reason. 58 | */ 59 | @property(nonatomic, readonly) NSString *exceptionReason; 60 | 61 | /* The exception's original call stack, as an array of PLCrashReportStackFrameInfo instances, or nil if unavailable. 62 | * This may be preserved across rethrow of an exception, and can be used to determine the original call stack. */ 63 | @property(nonatomic, readonly) NSArray *stackFrames; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportFormatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReport.h" 32 | 33 | /** 34 | * A crash report formatter accepts a PLCrashReport instance, formats it according to implementation-specified rules, 35 | * (such as implementing text output support), and returns the result. 36 | */ 37 | @protocol PLCrashReportFormatter 38 | 39 | /** 40 | * Format the provided @a report. 41 | * 42 | * @param report Report to be formatted. 43 | * @param outError A pointer to an NSError object variable. If an error occurs, this pointer will contain an error 44 | * object indicating why the pending crash report could not be formatted. If no error occurs, this parameter will 45 | * be left unmodified. You may specify nil for this parameter, and no error information will be provided. 46 | * 47 | * @return Returns the formatted report data on success, or nil on failure. 48 | */ 49 | - (NSData *) formatReport: (PLCrashReport *) report error: (NSError **) outError; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportMachExceptionInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportMachExceptionInfo : NSObject { 32 | @private 33 | /** The Mach exception type. */ 34 | uint64_t _type; 35 | 36 | /** The Mach exception codes, represented as an ordered array of NSNumber instances. */ 37 | NSArray *_codes; 38 | } 39 | 40 | - (id) initWithType: (uint64_t) type codes: (NSArray *) codes; 41 | 42 | /** The Mach exception type. */ 43 | @property(nonatomic, readonly) uint64_t type; 44 | 45 | /** The Mach exception codes, represented as an ordered array of 64-bit unsigned NSNumber instances. */ 46 | @property(nonatomic, readonly) NSArray *codes; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportMachineInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReportProcessorInfo.h" 32 | 33 | @interface PLCrashReportMachineInfo : NSObject { 34 | @private 35 | /** The hardware model name (eg, MacBookPro6,1). This may be unavailable, and this property will be nil. */ 36 | NSString *_modelName; 37 | 38 | /** The processor type. */ 39 | PLCrashReportProcessorInfo *_processorInfo; 40 | 41 | /* The number of actual physical processor cores. */ 42 | NSUInteger _processorCount; 43 | 44 | /* The number of logical processors. */ 45 | NSUInteger _logicalProcessorCount; 46 | } 47 | 48 | - (id) initWithModelName: (NSString *) modelName 49 | processorInfo: (PLCrashReportProcessorInfo *) processorInfo 50 | processorCount: (NSUInteger) processorCount 51 | logicalProcessorCount: (NSUInteger) logicalProcessorCount; 52 | 53 | /** The hardware model name (eg, MacBookPro6,1). This may be unavailable, and this property will be nil. */ 54 | @property(nonatomic, readonly) NSString *modelName; 55 | 56 | /** The processor type. This will be unavailable in reports generated prior to PLCrashReporter 1.2, in which case this property will be nil. */ 57 | @property(nonatomic, readonly) PLCrashReportProcessorInfo *processorInfo; 58 | 59 | /* 60 | * The number of actual physical processor cores. Note that the number of active processors may be managed by the 61 | * operating system's power management system, and this value may not reflect the number of active 62 | * processors at the time of the crash. 63 | */ 64 | @property(nonatomic, readonly) NSUInteger processorCount; 65 | 66 | /* 67 | * The number of logical processors. Note that the number of active processors may be managed by the 68 | * operating system's power management system, and this value may not reflect the number of active 69 | * processors at the time of the crash. 70 | */ 71 | @property(nonatomic, readonly) NSUInteger logicalProcessorCount; 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportProcessInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Damian Morris 3 | * 4 | * Copyright (c) 2010 MOSO Corporation, Pty Ltd. 5 | * Copyright (c) 2010-2013 Plausible Labs Cooperative, Inc. 6 | * 7 | * All rights reserved. 8 | * 9 | * Permission is hereby granted, free of charge, to any person 10 | * obtaining a copy of this software and associated documentation 11 | * files (the "Software"), to deal in the Software without 12 | * restriction, including without limitation the rights to use, 13 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the 15 | * Software is furnished to do so, subject to the following 16 | * conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be 19 | * included in all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | * OTHER DEALINGS IN THE SOFTWARE. 29 | */ 30 | 31 | #import 32 | 33 | @interface PLCrashReportProcessInfo : NSObject { 34 | @private 35 | /** Process name, or nil if unavailable. */ 36 | NSString *_processName; 37 | 38 | /** Process ID */ 39 | NSUInteger _processID; 40 | 41 | /** Process path */ 42 | NSString* _processPath; 43 | 44 | /** Date and time that the crashing process was started. This may be unavailable, and this property 45 | * will be nil. */ 46 | NSDate *_processStartTime; 47 | 48 | /** Parent process name, or nil if unavailable. */ 49 | NSString *_parentProcessName; 50 | 51 | /** Parent process ID */ 52 | NSUInteger _parentProcessID; 53 | 54 | /** If false, the process is being run via process-level CPU emulation (such as Rosetta). */ 55 | BOOL _native; 56 | } 57 | 58 | - (id) initWithProcessName: (NSString *) processName 59 | processID: (NSUInteger) processID 60 | processPath: (NSString *) processPath 61 | processStartTime: (NSDate *) processStartTime 62 | parentProcessName: (NSString *) parentProcessName 63 | parentProcessID: (NSUInteger) parentProcessID 64 | native: (BOOL) native; 65 | 66 | /** 67 | * The process name. This value may not be included in the crash report, in which case this property 68 | * will be nil. 69 | */ 70 | @property(nonatomic, readonly) NSString *processName; 71 | 72 | /** 73 | * The process ID. 74 | */ 75 | @property(nonatomic, readonly) NSUInteger processID; 76 | 77 | /** 78 | * The path to the process executable. This value may not be included in the crash report, in which case this property 79 | * will be nil. 80 | */ 81 | @property(nonatomic, readonly) NSString *processPath; 82 | 83 | /** 84 | * Date and time that the crashing process was started. This value may not be included in the crash report, in which case this property 85 | * will be nil. 86 | */ 87 | @property(nonatomic, readonly) NSDate *processStartTime; 88 | 89 | /** 90 | * The parent process name. This value may not be included in the crash report, in which case this property 91 | * will be nil. 92 | */ 93 | @property(nonatomic, readonly) NSString *parentProcessName; 94 | 95 | /** 96 | * The parent process ID. 97 | */ 98 | @property(nonatomic, readonly) NSUInteger parentProcessID; 99 | 100 | /** The process' native execution status. If false, the process is being run via process-level CPU emulation (such as Rosetta). */ 101 | @property(nonatomic, readonly) BOOL native; 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportProcessorInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import 31 | 32 | /** 33 | * @ingroup constants 34 | * 35 | * The type encodings supported for CPU types and subtypes. Currently only Apple 36 | * Mach-O defined encodings are supported. 37 | * 38 | * @internal 39 | * These enum values match the protobuf values. Keep them synchronized. 40 | */ 41 | typedef enum { 42 | /** Unknown cpu type encoding. */ 43 | PLCrashReportProcessorTypeEncodingUnknown = 0, 44 | 45 | /** Apple Mach-defined processor types. */ 46 | PLCrashReportProcessorTypeEncodingMach = 1 47 | } PLCrashReportProcessorTypeEncoding; 48 | 49 | @interface PLCrashReportProcessorInfo : NSObject { 50 | @private 51 | /** Type encoding */ 52 | PLCrashReportProcessorTypeEncoding _typeEncoding; 53 | 54 | /** CPU type */ 55 | uint64_t _type; 56 | 57 | /** CPU subtype */ 58 | uint64_t _subtype; 59 | } 60 | 61 | - (id) initWithTypeEncoding: (PLCrashReportProcessorTypeEncoding) typeEncoding 62 | type: (uint64_t) type 63 | subtype: (uint64_t) subtype; 64 | 65 | /** The CPU type encoding. */ 66 | @property(nonatomic, readonly) PLCrashReportProcessorTypeEncoding typeEncoding; 67 | 68 | /** The CPU type. */ 69 | @property(nonatomic, readonly) uint64_t type; 70 | 71 | /** The CPU subtype. */ 72 | @property(nonatomic, readonly) uint64_t subtype; 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportRegisterInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportRegisterInfo : NSObject { 32 | @private 33 | /** Register name */ 34 | NSString *_registerName; 35 | 36 | /** Register value */ 37 | uint64_t _registerValue; 38 | } 39 | 40 | - (id) initWithRegisterName: (NSString *) registerName registerValue: (uint64_t) registerValue; 41 | 42 | /** 43 | * Register name. 44 | */ 45 | @property(nonatomic, readonly) NSString *registerName; 46 | 47 | /** 48 | * Register value. 49 | */ 50 | @property(nonatomic, readonly) uint64_t registerValue; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportSignalInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportSignalInfo : NSObject { 32 | @private 33 | /** Signal name */ 34 | NSString *_name; 35 | 36 | /** Signal code */ 37 | NSString *_code; 38 | 39 | /** Fauling instruction or address */ 40 | uint64_t _address; 41 | } 42 | 43 | - (id) initWithSignalName: (NSString *) name code: (NSString *) code address: (uint64_t) address; 44 | 45 | /** 46 | * The signal name. 47 | */ 48 | @property(nonatomic, readonly) NSString *name; 49 | 50 | /** 51 | * The signal code. 52 | */ 53 | @property(nonatomic, readonly) NSString *code; 54 | 55 | /** 56 | * The faulting instruction or address. 57 | */ 58 | @property(nonatomic, readonly) uint64_t address; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportStackFrameInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportSymbolInfo.h" 31 | 32 | @interface PLCrashReportStackFrameInfo : NSObject { 33 | @private 34 | /** Frame instruction pointer. */ 35 | uint64_t _instructionPointer; 36 | 37 | /** Symbol information, if available. Otherwise, will be nil. */ 38 | PLCrashReportSymbolInfo *_symbolInfo; 39 | } 40 | 41 | - (id) initWithInstructionPointer: (uint64_t) instructionPointer symbolInfo: (PLCrashReportSymbolInfo *) symbolInfo; 42 | 43 | /** 44 | * Frame's instruction pointer. 45 | */ 46 | @property(nonatomic, readonly) uint64_t instructionPointer; 47 | 48 | /** Symbol information for this frame. 49 | * This may be unavailable, and this property will be nil. */ 50 | @property(nonatomic, readonly) PLCrashReportSymbolInfo *symbolInfo; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportSymbolInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2012-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportSymbolInfo : NSObject { 32 | @private 33 | /** The symbol name. */ 34 | NSString *_symbolName; 35 | 36 | /** The symbol start address. */ 37 | uint64_t _startAddress; 38 | 39 | /** The symbol end address, if explicitly defined. Will be 0 if unknown. */ 40 | uint64_t _endAddress; 41 | } 42 | 43 | - (id) initWithSymbolName: (NSString *) symbolName 44 | startAddress: (uint64_t) startAddress 45 | endAddress: (uint64_t) endAddress; 46 | 47 | /** The symbol name. */ 48 | @property(nonatomic, readonly) NSString *symbolName; 49 | 50 | /** The symbol start address. */ 51 | @property(nonatomic, readonly) uint64_t startAddress; 52 | 53 | /* The symbol end address, if explicitly defined. This will only be included if the end address is 54 | * explicitly defined (eg, by DWARF debugging information), will not be derived by best-guess 55 | * heuristics. 56 | * 57 | * If unknown, the address will be 0. 58 | */ 59 | @property(nonatomic, readonly) uint64_t endAddress; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportSystemInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #include "PLCrashMacros.h" 31 | @class PLCrashReportProcessorInfo; 32 | 33 | /** 34 | * @ingroup constants 35 | * 36 | * Indicates the Operating System under which a Crash Log was generated. 37 | * 38 | * @internal 39 | * These enum values match the protobuf values. Keep them synchronized. 40 | */ 41 | typedef enum { 42 | /** Mac OS X. */ 43 | PLCrashReportOperatingSystemMacOSX = 0, 44 | 45 | /** iPhone OS */ 46 | PLCrashReportOperatingSystemiPhoneOS = 1, 47 | 48 | /** iPhone Simulator (Mac OS X with additional simulator-specific runtime libraries) */ 49 | PLCrashReportOperatingSystemiPhoneSimulator = 2, 50 | 51 | /** Unknown operating system */ 52 | PLCrashReportOperatingSystemUnknown = 3, 53 | } PLCrashReportOperatingSystem; 54 | 55 | /** 56 | * @ingroup constants 57 | * 58 | * Indicates the architecture under which a Crash Log was generated. 59 | * 60 | * @note The architecture value has been deprecated in v1.1 and later crash reports. All new reports 61 | * will make use of the new PLCrashReportProcessorInfo CPU type encodings. 62 | * 63 | * @internal 64 | * These enum values match the protobuf values. Keep them synchronized. 65 | */ 66 | typedef enum { 67 | /** x86-32. */ 68 | PLCrashReportArchitectureX86_32 = 0, 69 | 70 | /** x86-64 */ 71 | PLCrashReportArchitectureX86_64 = 1, 72 | 73 | /** ARMv6 */ 74 | PLCrashReportArchitectureARMv6 = 2, 75 | 76 | /** 77 | * ARMv6 78 | * @deprecated This value has been deprecated in favor of ARM subtype-specific 79 | * values. 80 | * @sa PLCrashReportArchitectureARMv6 81 | */ 82 | PLCrashReportArchitectureARM PLCR_DEPRECATED = PLCrashReportArchitectureARMv6, 83 | 84 | /** PPC */ 85 | PLCrashReportArchitecturePPC = 3, 86 | 87 | /** PPC64 */ 88 | PLCrashReportArchitecturePPC64 = 4, 89 | 90 | /** ARMv7 */ 91 | PLCrashReportArchitectureARMv7 = 5, 92 | 93 | /** Unknown */ 94 | PLCrashReportArchitectureUnknown = 6 95 | } PLCrashReportArchitecture; 96 | 97 | 98 | extern PLCrashReportOperatingSystem PLCrashReportHostOperatingSystem; 99 | PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH(); 100 | extern PLCrashReportArchitecture PLCrashReportHostArchitecture PLCR_EXTERNAL_DEPRECATED; 101 | PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH(); 102 | 103 | @interface PLCrashReportSystemInfo : NSObject { 104 | @private 105 | /** Operating system */ 106 | PLCrashReportOperatingSystem _operatingSystem; 107 | 108 | /** Operating system version */ 109 | NSString *_osVersion; 110 | 111 | /** OS build. May be nil. */ 112 | NSString *_osBuild; 113 | 114 | /** Architecture */ 115 | PLCrashReportArchitecture _architecture; 116 | 117 | /** Date crash report was generated. May be nil if the date is unknown. */ 118 | NSDate *_timestamp; 119 | 120 | /** Processor information. */ 121 | PLCrashReportProcessorInfo *_processorInfo; 122 | } 123 | 124 | - (id) initWithOperatingSystem: (PLCrashReportOperatingSystem) operatingSystem 125 | operatingSystemVersion: (NSString *) operatingSystemVersion 126 | architecture: (PLCrashReportArchitecture) architecture 127 | timestamp: (NSDate *) timestamp PLCR_DEPRECATED; 128 | 129 | - (id) initWithOperatingSystem: (PLCrashReportOperatingSystem) operatingSystem 130 | operatingSystemVersion: (NSString *) operatingSystemVersion 131 | operatingSystemBuild: (NSString *) operatingSystemBuild 132 | architecture: (PLCrashReportArchitecture) architecture 133 | timestamp: (NSDate *) timestamp PLCR_DEPRECATED; 134 | 135 | - (id) initWithOperatingSystem: (PLCrashReportOperatingSystem) operatingSystem 136 | operatingSystemVersion: (NSString *) operatingSystemVersion 137 | operatingSystemBuild: (NSString *) operatingSystemBuild 138 | architecture: (PLCrashReportArchitecture) architecture 139 | processorInfo: (PLCrashReportProcessorInfo *) processorInfo 140 | timestamp: (NSDate *) timestamp; 141 | 142 | /** The operating system. */ 143 | @property(nonatomic, readonly) PLCrashReportOperatingSystem operatingSystem; 144 | 145 | /** The operating system's release version. */ 146 | @property(nonatomic, readonly) NSString *operatingSystemVersion; 147 | 148 | /** The operating system's build identifier (eg, 10J869). This may be unavailable, and this property will be nil. */ 149 | @property(nonatomic, readonly) NSString *operatingSystemBuild; 150 | 151 | /** Architecture. @deprecated The architecture value has been deprecated in v1.1 and later crash reports. All new reports 152 | * include the CPU type as part of the crash report's machine info structure, using the PLCrashReportProcessorInfo 153 | * extensible encoding. */ 154 | @property(nonatomic, readonly) PLCrashReportArchitecture architecture PLCR_DEPRECATED; 155 | 156 | /** Date and time that the crash report was generated. This may be unavailable, and this property will be nil. */ 157 | @property(nonatomic, readonly) NSDate *timestamp; 158 | 159 | /** The processor type. For v1.2 reports and later, this is an alias to the machine info's processorInfo. 160 | * For earlier reports, this will be synthesized from the deprecated architecture property. */ 161 | @property(nonatomic, readonly) PLCrashReportProcessorInfo *processorInfo; 162 | 163 | @end 164 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportTextFormatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Authors: 3 | * Landon Fuller 4 | * Damian Morris 5 | * 6 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 7 | * Copyright (c) 2010 MOSO Corporation, Pty Ltd. 8 | * All rights reserved. 9 | * 10 | * Permission is hereby granted, free of charge, to any person 11 | * obtaining a copy of this software and associated documentation 12 | * files (the "Software"), to deal in the Software without 13 | * restriction, including without limitation the rights to use, 14 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | * copies of the Software, and to permit persons to whom the 16 | * Software is furnished to do so, subject to the following 17 | * conditions: 18 | * 19 | * The above copyright notice and this permission notice shall be 20 | * included in all copies or substantial portions of the Software. 21 | * 22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 24 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 26 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 27 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 29 | * OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | 32 | 33 | #import 34 | 35 | #import "PLCrashReportFormatter.h" 36 | 37 | /** 38 | * Supported text output formats. 39 | * 40 | * @ingroup enums 41 | */ 42 | typedef enum { 43 | /** An iOS-compatible crash log text format. Compatible with the crash logs generated by the device and available 44 | * through iTunes Connect. */ 45 | PLCrashReportTextFormatiOS = 0 46 | } PLCrashReportTextFormat; 47 | 48 | 49 | @interface PLCrashReportTextFormatter : NSObject { 50 | @private 51 | /** Text output format. */ 52 | PLCrashReportTextFormat _textFormat; 53 | 54 | /** Encoding to use for string output. */ 55 | NSStringEncoding _stringEncoding; 56 | } 57 | 58 | + (NSString *) stringValueForCrashReport: (PLCrashReport *) report withTextFormat: (PLCrashReportTextFormat) textFormat; 59 | 60 | - (id) initWithTextFormat: (PLCrashReportTextFormat) textFormat stringEncoding: (NSStringEncoding) stringEncoding; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReportThreadInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReportStackFrameInfo.h" 32 | #import "PLCrashReportRegisterInfo.h" 33 | 34 | @interface PLCrashReportThreadInfo : NSObject { 35 | @private 36 | /** The thread number. Should be unique within a given crash log. */ 37 | NSInteger _threadNumber; 38 | 39 | /** Ordered list of PLCrashReportStackFrame instances */ 40 | NSArray *_stackFrames; 41 | 42 | /** YES if this thread crashed. */ 43 | BOOL _crashed; 44 | 45 | /** List of PLCrashReportRegister instances. Will be empty if _crashed is NO. */ 46 | NSArray *_registers; 47 | } 48 | 49 | - (id) initWithThreadNumber: (NSInteger) threadNumber 50 | stackFrames: (NSArray *) stackFrames 51 | crashed: (BOOL) crashed 52 | registers: (NSArray *) registers; 53 | 54 | /** 55 | * Application thread number. 56 | */ 57 | @property(nonatomic, readonly) NSInteger threadNumber; 58 | 59 | /** 60 | * Thread backtrace. Provides an array of PLCrashReportStackFrameInfo instances. 61 | * The array is ordered, last callee to first. 62 | */ 63 | @property(nonatomic, readonly) NSArray *stackFrames; 64 | 65 | /** 66 | * If this thread crashed, set to YES. 67 | */ 68 | @property(nonatomic, readonly) BOOL crashed; 69 | 70 | /** 71 | * State of the general purpose and related registers, as a list of 72 | * PLCrashReportRegister instances. If this thead did not crash (crashed returns NO), 73 | * this list will be empty. 74 | */ 75 | @property(nonatomic, readonly) NSArray *registers; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReporter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import 31 | 32 | #import "PLCrashReporterConfig.h" 33 | #import "PLCrashMacros.h" 34 | 35 | @class PLCrashMachExceptionServer; 36 | @class PLCrashMachExceptionPortSet; 37 | 38 | /** 39 | * @ingroup functions 40 | * 41 | * Prototype of a callback function used to execute additional user code with signal information as provided 42 | * by PLCrashReporter. Called upon completion of crash handling, after the crash report has been written to disk. 43 | * 44 | * @param info The signal info. 45 | * @param uap The crash's threads context. 46 | * @param context The API client's supplied context value. 47 | * 48 | * @sa The @ref async_safety documentation. 49 | * @sa PLCrashReporter::setPostCrashCallbacks: 50 | */ 51 | typedef void (*PLCrashReporterPostCrashSignalCallback)(siginfo_t *info, ucontext_t *uap, void *context); 52 | 53 | /** 54 | * @ingroup types 55 | * 56 | * This structure contains callbacks supported by PLCrashReporter to allow the host application to perform 57 | * additional tasks prior to program termination after a crash has occured. 58 | * 59 | * @sa The @ref async_safety documentation. 60 | */ 61 | typedef struct PLCrashReporterCallbacks { 62 | /** The version number of this structure. If not one of the defined version numbers for this type, the behavior 63 | * is undefined. The current version of this structure is 0. */ 64 | uint16_t version; 65 | 66 | /** An arbitrary user-supplied context value. This value may be NULL. */ 67 | void *context; 68 | 69 | /** 70 | * The callback used to report caught signal information. In version 0 of this structure, all crashes will be 71 | * reported via this function. 72 | * 73 | * @warning When using PLCrashReporterSignalHandlerTypeMach, the siginfo_t argument to this function will be derived 74 | * from the Mach exception data, and may be incorrect, or may otherwise not match the expected data as provided via 75 | * PLCrashReporterSignalHandlerTypeBSD. In addition, the provided ucontext_t value will be zero-initialized, and will 76 | * not provide valid thread state. 77 | * 78 | * This callback will be deprecated in favor of a Mach-compatible replacement in a future release; support is maintained 79 | * here to allow clients that rely on post-crash callbacks without thread state to make use of Mach exceptions. 80 | */ 81 | PLCrashReporterPostCrashSignalCallback handleSignal; 82 | } PLCrashReporterCallbacks; 83 | 84 | @interface PLCrashReporter : NSObject { 85 | @private 86 | /** Reporter configuration */ 87 | PLCrashReporterConfig *_config; 88 | 89 | /** YES if the crash reporter has been enabled */ 90 | BOOL _enabled; 91 | 92 | #if PLCRASH_FEATURE_MACH_EXCEPTIONS 93 | /** The backing Mach exception server, if any. Nil if the reporter has not been enabled, or if 94 | * the configured signal handler type is not PLCrashReporterSignalHandlerTypeMach. */ 95 | PLCrashMachExceptionServer *_machServer; 96 | 97 | /** Previously registered Mach exception ports, if any. */ 98 | PLCrashMachExceptionPortSet *_previousMachPorts; 99 | #endif /* PLCRASH_FEATURE_MACH_EXCEPTIONS */ 100 | 101 | /** Application identifier */ 102 | NSString *_applicationIdentifier; 103 | 104 | /** Application version */ 105 | NSString *_applicationVersion; 106 | 107 | /** Application marketing version */ 108 | NSString *_applicationMarketingVersion; 109 | 110 | /** Path to the crash reporter internal data directory */ 111 | NSString *_crashReportDirectory; 112 | } 113 | 114 | + (PLCrashReporter *) sharedReporter PLCR_DEPRECATED; 115 | 116 | - (instancetype) initWithConfiguration: (PLCrashReporterConfig *) config; 117 | 118 | - (BOOL) hasPendingCrashReport; 119 | 120 | - (NSData *) loadPendingCrashReportData; 121 | - (NSData *) loadPendingCrashReportDataAndReturnError: (NSError **) outError; 122 | 123 | - (NSData *) generateLiveReportWithThread: (thread_t) thread; 124 | - (NSData *) generateLiveReportWithThread: (thread_t) thread error: (NSError **) outError; 125 | 126 | - (NSData *) generateLiveReport; 127 | - (NSData *) generateLiveReportAndReturnError: (NSError **) outError; 128 | 129 | - (BOOL) purgePendingCrashReport; 130 | - (BOOL) purgePendingCrashReportAndReturnError: (NSError **) outError; 131 | 132 | - (BOOL) enableCrashReporter; 133 | - (BOOL) enableCrashReporterAndReturnError: (NSError **) outError; 134 | 135 | - (void) setCrashCallbacks: (PLCrashReporterCallbacks *) callbacks; 136 | 137 | @end 138 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Headers/PLCrashReporterConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashFeatureConfig.h" 31 | 32 | /** 33 | * @ingroup enums 34 | * Supported mechanisms for trapping and handling crashes. 35 | */ 36 | typedef NS_ENUM(NSUInteger, PLCrashReporterSignalHandlerType) { 37 | /** 38 | * Trap fatal signals via a sigaction(2)-registered BSD signal handler. 39 | * 40 | * PLCrashReporter's signal handler will supersede previously registered handlers; existing 41 | * handlers will not be called. This behavior may be modified in a future release, and should 42 | * not be relied upon as a mechanism to prevent existing signal handlers from being called. 43 | * 44 | * There are some limitations to signal-based crash handling on Mac OS X and iOS; specifically: 45 | * 46 | * - On Mac OS X, stack overflows will only be handled on the thread on which 47 | * the crash reporter was initialized. This should generally be the main thread. 48 | * - On iOS 6.0 and later, any stack overflows will not be handled due to sigaltstack() being 49 | * non-functional on the device. (see rdar://13002712 - SA_ONSTACK/sigaltstack() ignored on iOS). 50 | * - Some exit paths in Apple's Libc will deregister a signal handler before firing SIGABRT, resulting 51 | * in the signal handler never being called (see rdar://14313497 - ___abort() disables SIGABRT signal 52 | * handlers prior to raising SIGABRT). These __abort()-based checks are: 53 | * - Implemented for unsafe memcpy/strcpy/snprintf C functions. 54 | * - Only enabled when operating on a fixed-width target buffer (in which case the 55 | * compiler rewrites the function calls to the built-in variants, and provides the fixed-width length as an argument). 56 | * - Only trigger in the case that the source data exceeds the size of the fixed width target 57 | * buffer, and the maximum length argument either isn't supplied by the caller (eg, when using strcpy), 58 | * or a too-long argument is supplied (eg, strncpy with a length argument longer than the target buffer), 59 | * AND that argument can't be checked at compile-time. 60 | */ 61 | PLCrashReporterSignalHandlerTypeBSD = 0, 62 | 63 | #if PLCRASH_FEATURE_MACH_EXCEPTIONS 64 | /** 65 | * Trap fatal signals via a Mach exception server. 66 | * 67 | * If any existing Mach exception server has been registered for the task, exceptions will be forwarded to that 68 | * exception handler. Should the exceptions be handled by an existing handler, no report will be generated 69 | * by PLCrashReporter. 70 | * 71 | * @par Mac OS X 72 | * 73 | * On Mac OS X, the Mach exception implementation is fully supported, using publicly available API -- note, 74 | * however, that some kernel-internal constants, as well as architecture-specific trap information, 75 | * may be required to fully interpret a Mach exception's root cause. 76 | * 77 | * @par iOS 78 | * 79 | * On iOS, the APIs required for a complete implementation are not fully public. 80 | * 81 | * The exposed surface of undocumented API usage is relatively low, and there has been strong user demand to 82 | * implement Mach exception handling regardless of concerns over API visiblity. Given this, we've included 83 | * Mach exception handling as an optional feature, with both build-time and runtime configuration 84 | * to disable its inclusion or use, respectively. 85 | * 86 | * @par Debugger Incompatibility 87 | * 88 | * The Mach exception handler executes in-process, and will interfere with debuggers when they attempt to 89 | * suspend all active threads (which will include the Mach exception handler). Mach-based handling 90 | * should not be used when a debugger is attached. 91 | * 92 | * @par More Details 93 | * 94 | * For more information, refer to @ref mach_exceptions. 95 | */ 96 | PLCrashReporterSignalHandlerTypeMach = 1 97 | #endif /* PLCRASH_FEATURE_MACH_EXCEPTIONS */ 98 | }; 99 | 100 | /** 101 | * @ingroup enums 102 | * Supported mechanisms for performing local symbolication. 103 | * 104 | * Local symbolication is performed using inexact heuristics and symbol data available at runtime; it may 105 | * return information that is incorrect. This may still be useful in the case where DWARF data is unavailable 106 | * for a given build; in that case, it can provide function and method names (though not line numbers) for a 107 | * crash report that may otherwise be unusable. 108 | * 109 | * Note, however, this comes at the cost of a significant increase in code that must run within the critical 110 | * crash reporting section, where failures may result in crash reports being corrupted or left unwritten. In 111 | * addition, some of the provided symbolication strategies rely on knowledge of runtime internals that may 112 | * change in future iOS releases. Given that DWARF symbolication data will always be more accurate, and 113 | * the risks inherent in executing considerably more code at crash time, it is strongly recommended that local 114 | * symbolication only be enabled for non-release builds. 115 | * 116 | * Multiple symbolication strategies may be enabled, in which case a best-match heuristic will be applied to the 117 | * results. 118 | */ 119 | typedef NS_OPTIONS(NSUInteger, PLCrashReporterSymbolicationStrategy) { 120 | /** No symbolication. */ 121 | PLCrashReporterSymbolicationStrategyNone = 0, 122 | 123 | /** 124 | * Use the standard binary symbol table. On iOS, this alone will return 125 | * incomplete results, as most symbols are rewritten to the common '\' string. 126 | */ 127 | PLCrashReporterSymbolicationStrategySymbolTable = 1 << 0, 128 | 129 | /** 130 | * Use Objective-C metadata to find method and class names. This relies on detailed parsing 131 | * of the Objective-C runtime data, including undefined flags and other runtime internals. As such, 132 | * it may return incorrect data should the runtime be changed incompatibly. 133 | */ 134 | PLCrashReporterSymbolicationStrategyObjC = 1 << 1, 135 | 136 | /** 137 | * Enable all available symbolication strategies. 138 | */ 139 | PLCrashReporterSymbolicationStrategyAll = (PLCrashReporterSymbolicationStrategySymbolTable|PLCrashReporterSymbolicationStrategyObjC) 140 | }; 141 | 142 | @interface PLCrashReporterConfig : NSObject { 143 | @private 144 | /** The configured signal handler type. */ 145 | PLCrashReporterSignalHandlerType _signalHandlerType; 146 | 147 | /** The configured symbolication strategy. */ 148 | PLCrashReporterSymbolicationStrategy _symbolicationStrategy; 149 | } 150 | 151 | + (instancetype) defaultConfiguration; 152 | 153 | - (instancetype) init; 154 | - (instancetype) initWithSignalHandlerType: (PLCrashReporterSignalHandlerType) signalHandlerType 155 | symbolicationStrategy: (PLCrashReporterSymbolicationStrategy) symbolicationStrategy; 156 | 157 | /** The configured signal handler type. */ 158 | @property(nonatomic, readonly) PLCrashReporterSignalHandlerType signalHandlerType; 159 | 160 | /** The configured symbolication strategy. */ 161 | @property(nonatomic, readonly) PLCrashReporterSymbolicationStrategy symbolicationStrategy; 162 | 163 | 164 | @end 165 | 166 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 14F1021 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | CrashReporter 11 | CFBundleIdentifier 12 | coop.plausible.CrashReporter 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | CrashReporter 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleSignature 20 | ???? 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | CFBundleVersion 26 | 1.0 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 7B91b 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 15A278 35 | DTSDKName 36 | macosx10.11 37 | DTXcode 38 | 0710 39 | DTXcodeBuild 40 | 7B91b 41 | 42 | 43 | -------------------------------------------------------------------------------- /PerformanceMonitor/CrashReporter.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /PerformanceMonitor/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /PerformanceMonitor/PerformanceMonitor.h: -------------------------------------------------------------------------------- 1 | // 2 | // PerformanceMonitor.h 3 | // SuperApp 4 | // 5 | // Created by qianjianeng on 15/11/12. 6 | // Copyright © 2015年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PerformanceMonitor : NSObject 12 | 13 | + (instancetype)sharedInstance; 14 | 15 | - (void)startMonitor; 16 | - (void)stopMonitor; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /PerformanceMonitor/PerformanceMonitor.m: -------------------------------------------------------------------------------- 1 | // 2 | // PerformanceMonitor.m 3 | // SuperApp 4 | // 5 | // Created by qianjianeng on 15/11/12. 6 | // Copyright © 2015年 Tencent. All rights reserved. 7 | // 8 | 9 | #import "PerformanceMonitor.h" 10 | #import 11 | 12 | @interface PerformanceMonitor () 13 | { 14 | int timeoutCount; 15 | CFRunLoopObserverRef observer; 16 | 17 | @public 18 | dispatch_semaphore_t semaphore; 19 | CFRunLoopActivity activity; 20 | } 21 | @end 22 | 23 | @implementation PerformanceMonitor 24 | 25 | + (instancetype)sharedInstance 26 | { 27 | static id instance = nil; 28 | static dispatch_once_t onceToken; 29 | dispatch_once(&onceToken, ^{ 30 | instance = [[self alloc] init]; 31 | }); 32 | return instance; 33 | } 34 | 35 | static void runLoopObserverCallBack(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) 36 | { 37 | PerformanceMonitor *moniotr = (__bridge PerformanceMonitor*)info; 38 | 39 | moniotr->activity = activity; 40 | 41 | dispatch_semaphore_t semaphore = moniotr->semaphore; 42 | dispatch_semaphore_signal(semaphore); 43 | } 44 | 45 | - (void)stopMonitor 46 | { 47 | if (!observer) 48 | return; 49 | CFRunLoopRemoveObserver(CFRunLoopGetMain(), observer, kCFRunLoopCommonModes); 50 | CFRelease(observer); 51 | observer = NULL; 52 | } 53 | 54 | - (void)startMonitor 55 | { 56 | if (observer) 57 | return; 58 | 59 | // 信号,Dispatch Semaphore保证同步 60 | semaphore = dispatch_semaphore_create(0); 61 | 62 | // 注册RunLoop状态观察 63 | CFRunLoopObserverContext context = {0,(__bridge void*)self,NULL,NULL}; 64 | observer = CFRunLoopObserverCreate(kCFAllocatorDefault, 65 | kCFRunLoopAllActivities, 66 | YES, 67 | NSUIntegerMax, 68 | &runLoopObserverCallBack, 69 | &context); 70 | //将观察者添加到主线程runloop的common模式下的观察中 71 | CFRunLoopAddObserver(CFRunLoopGetMain(), observer, kCFRunLoopCommonModes); 72 | 73 | // 在子线程监控时长 开启一个持续的loop用来进行监控 74 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 75 | while (YES) 76 | { 77 | //假定连续5次超时50ms认为卡顿(当然也包含了单次超时250ms) 78 | long st = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, 50*NSEC_PER_MSEC)); 79 | if (st != 0) 80 | { 81 | if (!observer) 82 | { 83 | timeoutCount = 0; 84 | semaphore = 0; 85 | activity = 0; 86 | return; 87 | } 88 | 89 | //两个runloop的状态,BeforeSources和AfterWaiting这两个状态区间时间能够检测到是否卡顿 90 | if (activity == kCFRunLoopBeforeSources || activity == kCFRunLoopAfterWaiting) 91 | { 92 | if (++timeoutCount < 5) 93 | continue; 94 | PLCrashReporterConfig *config = [[PLCrashReporterConfig alloc] initWithSignalHandlerType:PLCrashReporterSignalHandlerTypeBSD 95 | symbolicationStrategy:PLCrashReporterSymbolicationStrategyAll]; 96 | PLCrashReporter *crashReporter = [[PLCrashReporter alloc] initWithConfiguration:config]; 97 | NSData *data = [crashReporter generateLiveReport]; 98 | PLCrashReport *reporter = [[PLCrashReport alloc] initWithData:data error:NULL]; 99 | NSString *report = [PLCrashReportTextFormatter stringValueForCrashReport:reporter 100 | withTextFormat:PLCrashReportTextFormatiOS]; 101 | //上传服务器 102 | NSLog(@"此处发生卡顿:---%@", report); 103 | }//end activity 104 | }// end semaphore wait 105 | timeoutCount = 0; 106 | }// end while 107 | }); 108 | } 109 | 110 | @end 111 | -------------------------------------------------------------------------------- /PerformanceMonitor/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // PerformanceMonitor 4 | // 5 | // Created by qianjianeng on 15/11/13. 6 | // Copyright © 2015年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /PerformanceMonitor/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // PerformanceMonitor 4 | // 5 | // Created by qianjianeng on 15/11/13. 6 | // Copyright © 2015年 Tencent. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | { 13 | UITableView *_tableView; 14 | } 15 | @end 16 | 17 | @implementation ViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | 23 | _tableView = [[UITableView alloc] initWithFrame:self.view.bounds]; 24 | _tableView.dataSource = self; 25 | _tableView.delegate = self; 26 | [self.view addSubview:_tableView]; 27 | } 28 | 29 | - (void)didReceiveMemoryWarning 30 | { 31 | [super didReceiveMemoryWarning]; 32 | // Dispose of any resources that can be recreated. 33 | } 34 | 35 | #pragma mark - UITableViewDataSource 36 | 37 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 38 | { 39 | return 100; 40 | } 41 | 42 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 43 | { 44 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; 45 | if (!cell) 46 | { 47 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; 48 | } 49 | 50 | NSString *cellText = nil; 51 | if (indexPath.row%10 == 0) 52 | { 53 | sleep(1); 54 | cellText = @"这里卡住了"; 55 | }else 56 | { 57 | cellText = [NSString stringWithFormat:@"cell%ld",indexPath.row]; 58 | } 59 | 60 | cell.textLabel.text = cellText; 61 | return cell; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /PerformanceMonitor/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PerformanceMonitor 4 | // 5 | // Created by tanhao on 15/11/13. 6 | // Copyright © 2015年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iOS 性能检测 2 | 3 | iOS开发中,如果是由于占用内存或者`cpu`过高导致性能下降,使用`Instruments`比较容易那些造成性能低下的”罪魁祸首”,在开发测试阶段它可以帮助我们分析软件运行的性能消耗,但是这可定是远远不够的,我们需要一个工具,可以在正式环境中由大量用户在使用过程中监控、分析到的数据更能解决一些隐藏的问题。 4 | 5 | ### Time Profiler 6 | 7 | 可以查看多个线程中每个方法的耗时。 8 | 9 | #### 对 Xcode 进行设置 10 | 11 | ##### 1. 不设置该选项,只能看到一堆栈 12 | 13 | 如果想要在`TimeProfile`中直观的查看方法耗时,需要对`Xcode`进行设置 14 | 在`Xcode->Build Setting->Debug Information Format中`设置选项为:`DWARF with DSYM File` 15 | 16 | ![image](https://raw.githubusercontent.com/suifengqjn/demoimages/master/PerformanceMonitor/1.png) 17 | 18 | #### 对TimeProfile进行设置 19 | 20 | ##### 1. 21 | 22 | 在`TimeProfile` 的 `Call Tree` 中,右侧面板有三个检查器:`record setting`(记录设置)、`display setting`(展示设置)、还有`extends detail`(扩展详情) 23 | 24 | ##### 2. 25 | 26 | 我们选择`display setting`,并在该选择器中勾选`Separate by Thread和Hide System Libraries`(两个最基本的选项) 27 | 28 | ![image](https://raw.githubusercontent.com/suifengqjn/demoimages/master/PerformanceMonitor/2.png) 29 | 30 | ##### 3. 31 | 32 | 这样就可以逐级查看每个方法的耗时了 33 | 34 | ![image](https://raw.githubusercontent.com/suifengqjn/demoimages/master/PerformanceMonitor/3.png) 35 | 36 | ### Allocations 37 | 38 | 这里可以对每个动作的前后进行`Generations`,对比内存的增加,查看使内存增加的具体的方法和代码所在位置。具体操作是在右侧`Generation Analysis`里点击`Mark Generation`,这样会产生一个`Generation`,切换到其他页面或一段时间产生了另外一个事件时再点`Mark Generation`来产生一个新的`Generation`,这样反复,生成多个`Generation`,查看这几个`Generation`会看到`Growth`的大小,如果太大可以点进去查看相应占用较大的线程里右侧`Heaviest Stack Trace`里查看对应的代码块,然后进行相应的处理。 39 | 40 | ### Leak 41 | 42 | 可以在上面区域的`Leaks`部分看到对应的时间点产生的溢出,选择后在下面区域的`Statistics>Allocation Summary`能够看到泄漏的对象,同样可以通过`Stack Trace`查看到具体对应的代码区域。 43 | 44 | ### UIImage 45 | 46 | 这里要主要是会影响内存的开销,需要权衡下`imagedNamed`和`imageWithContentsOfFile`,了解两者特性后,在只需要显示一次的图片用后者,这样会减少内存的消耗,但是页面显示会增加`Image IO`的消耗,这个需要注意下。由于`imageWithContentsOfFile`不缓存,所以需要在每次页面显示前加载一次,这个`IO`的操作也是需要考虑权衡的一个点。 47 | 48 | ### 页面加载 49 | 50 | 如果一个页面内容过多,view过多,这样将长页面中的需要滚动才能看到的那个部分视图内容通过开启新的线程同步的加载。 51 | 52 | ### 优化首次加载时间 53 | 54 | 通过`Time Profier`可以查看到启动所占用的时间,如果太长可以通过`Heaviest Stack Trace`找到费时的方法进行改造。 55 | 56 | ### 寻找卡顿的切入点 57 | 58 | > 监控卡顿,最直接就是找到主线程都在干些啥玩意儿.我们知道一个线程的消息事件处理都是依赖于NSRunLoop来驱动,所以要知道线程正在调用什么方法,就需要从`NSRunLoop`来入手.`CFRunLoop`的代码是开源,可以在此处查阅到源代码 [https://github.com/apple/swift-corelibs-foundation/blob/main/CoreFoundation/RunLoop.subproj/CFRunLoop.c](https://github.com/apple/swift-corelibs-foundation/blob/main/CoreFoundation/RunLoop.subproj/CFRunLoop.c) , 其中核心方法CFRunLoopRun简化后的主要逻辑大概是这样的: 59 | 60 |
61 | 62 | ```c++ 63 | int32_t __CFRunLoopRun() 64 | { 65 | //通知即将进入runloop 66 | __CFRunLoopDoObservers(KCFRunLoopEntry); 67 | 68 | do 69 | { 70 | // 通知将要处理timer和source 71 | __CFRunLoopDoObservers(kCFRunLoopBeforeTimers); 72 | __CFRunLoopDoObservers(kCFRunLoopBeforeSources); 73 | 74 | __CFRunLoopDoBlocks(); //处理非延迟的主线程调用 75 | __CFRunLoopDoSource0(); //处理UIEvent事件 76 | 77 | //GCD dispatch main queue 78 | CheckIfExistMessagesInMainDispatchQueue(); 79 | 80 | // 即将进入休眠 81 | __CFRunLoopDoObservers(kCFRunLoopBeforeWaiting); 82 | 83 | // 等待内核mach_msg事件 84 | mach_port_t wakeUpPort = SleepAndWaitForWakingUpPorts(); 85 | 86 | // Zzz... 87 | 88 | // 从等待中醒来 89 | __CFRunLoopDoObservers(kCFRunLoopAfterWaiting); 90 | 91 | // 处理因timer的唤醒 92 | if (wakeUpPort == timerPort) 93 | __CFRunLoopDoTimers(); 94 | 95 | // 处理异步方法唤醒,如dispatch_async 96 | else if (wakeUpPort == mainDispatchQueuePort) 97 | __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__() 98 | 99 | // UI刷新,动画显示 100 | else 101 | __CFRunLoopDoSource1(); 102 | 103 | // 再次确保是否有同步的方法需要调用 104 | __CFRunLoopDoBlocks(); 105 | 106 | } while (!stop && !timeout); 107 | 108 | //通知即将退出runloop 109 | __CFRunLoopDoObservers(CFRunLoopExit); 110 | } 111 | ``` 112 | 113 |
114 | 115 | > 不难发现`NSRunLoop`调用方法主要就是在`kCFRunLoopBeforeSources`和`kCFRunLoopBeforeWaiting`之间,还有`kCFRunLoopAfterWaiting`之后,也就是如果我们发现这两个时间内耗时太长,那么就可以判定出此时主线程卡顿. 116 | 117 |
118 | 119 | ### 量化卡顿的程度 120 | 121 | > 要监控NSRunLoop的状态,我们需要使用到CFRunLoopObserverRef,通过它可以实时获得这些状态值的变化,具体的使用如下: 122 | > 123 | 124 |
125 | 126 | ```c++ 127 | static void runLoopObserverCallBack(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) 128 | { 129 | MyClass *object = (__bridge MyClass*)info; 130 | object->activity = activity; 131 | } 132 | 133 | - (void)registerObserver 134 | { 135 | CFRunLoopObserverContext context = {0,(__bridge void*)self,NULL,NULL}; 136 | CFRunLoopObserverRef observer = CFRunLoopObserverCreate(kCFAllocatorDefault, 137 | kCFRunLoopAllActivities, 138 | YES, 139 | NSUIntegerMax, 140 | &runLoopObserverCallBack, 141 | &context); 142 | CFRunLoopAddObserver(CFRunLoopGetMain(), observer, kCFRunLoopCommonModes); 143 | } 144 | ``` 145 |
146 | 147 | > 只需要另外再开启一个线程,实时计算这两个状态区域之间的耗时是否到达某个阀值,便能揪出这些性能杀手. 148 | 为了让计算更精确,需要让子线程更及时的获知主线程`NSRunLoop`状态变化, 所以`dispatch_semaphore_t`是个不错的选择,另外卡顿需要覆盖到多次连续小卡顿和单次长时间卡顿两种情景,所以判定条件也需要做适当优化.将上面两个方法添加计算的逻辑如下: 149 | 150 |
151 | 152 | ```c++ 153 | static void runLoopObserverCallBack(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) 154 | { 155 | PerformanceMonitor *moniotr = (__bridge PerformanceMonitor*)info; 156 | 157 | moniotr->activity = activity; 158 | 159 | dispatch_semaphore_t semaphore = moniotr->semaphore; 160 | dispatch_semaphore_signal(semaphore); 161 | } 162 | 163 | - (void)startMonitor 164 | { 165 | if (observer) 166 | return; 167 | 168 | // 信号,Dispatch Semaphore保证同步 169 | semaphore = dispatch_semaphore_create(0); 170 | 171 | // 注册RunLoop状态观察 172 | CFRunLoopObserverContext context = {0,(__bridge void*)self,NULL,NULL}; 173 | observer = CFRunLoopObserverCreate(kCFAllocatorDefault, 174 | kCFRunLoopAllActivities, 175 | YES, 176 | NSUIntegerMax, 177 | &runLoopObserverCallBack, 178 | &context); 179 | //将观察者添加到主线程runloop的common模式下的观察中 180 | CFRunLoopAddObserver(CFRunLoopGetMain(), observer, kCFRunLoopCommonModes); 181 | 182 | // 在子线程监控时长 开启一个持续的loop用来进行监控 183 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 184 | while (YES) 185 | { 186 | //假定连续5次超时50ms认为卡顿(当然也包含了单次超时250ms) 187 | long st = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, 50*NSEC_PER_MSEC)); 188 | if (st != 0) 189 | { 190 | if (!observer) 191 | { 192 | timeoutCount = 0; 193 | semaphore = 0; 194 | activity = 0; 195 | return; 196 | } 197 | 198 | //两个runloop的状态,BeforeSources和AfterWaiting这两个状态区间时间能够检测到是否卡顿 199 | if (activity==kCFRunLoopBeforeSources || activity==kCFRunLoopAfterWaiting) 200 | { 201 | if (++timeoutCount < 5) 202 | continue; 203 | PLCrashReporterConfig *config = [[PLCrashReporterConfig alloc] initWithSignalHandlerType:PLCrashReporterSignalHandlerTypeBSD 204 | symbolicationStrategy:PLCrashReporterSymbolicationStrategyAll]; 205 | PLCrashReporter *crashReporter = [[PLCrashReporter alloc] initWithConfiguration:config]; 206 | NSData *data = [crashReporter generateLiveReport]; 207 | PLCrashReport *reporter = [[PLCrashReport alloc] initWithData:data error:NULL]; 208 | NSString *report = [PLCrashReportTextFormatter stringValueForCrashReport:reporter 209 | withTextFormat:PLCrashReportTextFormatiOS]; 210 | //上传服务器 211 | NSLog(@"此处发生卡顿:---%@", report); 212 | }//end activity 213 | }// end semaphore wait 214 | 215 | timeoutCount = 0; 216 | 217 | }// end while 218 | }); 219 | } 220 | ``` 221 | 222 | ### 记录卡顿的函数调用 223 | 224 |
225 | 226 | > 监控到了卡顿现场,当然下一步便是记录此时的函数调用信息,此处可以使用一个第三方Crash收集组件PLCrashReporter,它不仅可以收集Crash信息也可用于实时获取各线程的调用堆栈,使用示例如下: 227 | 228 |
229 | 230 | ```c++ 231 | PLCrashReporterConfig *config = [[PLCrashReporterConfig alloc] initWithSignalHandlerType:PLCrashReporterSignalHandlerTypeBSD 232 | symbolicationStrategy:PLCrashReporterSymbolicationStrategyAll]; 233 | PLCrashReporter *crashReporter = [[PLCrashReporter alloc] initWithConfiguration:config]; 234 | 235 | NSData *data = [crashReporter generateLiveReport]; 236 | PLCrashReport *reporter = [[PLCrashReport alloc] initWithData:data error:NULL]; 237 | NSString *report = [PLCrashReportTextFormatter stringValueForCrashReport:reporter 238 | withTextFormat:PLCrashReportTextFormatiOS]; 239 | 240 | ``` 241 | 242 | 当检测到卡顿时,抓取堆栈信息,然后在客户端做一些过滤处理,便可以上报到服务器,通过收集一定量的卡顿数据后经过分析便能准确定位需要优化的逻辑. 243 | 244 | 245 | --------------------------------------------------------------------------------