This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void startListening() | |
{ | |
void (*registerCallbacks)(RCTProfileCallbacks *) = dlsym(RTLD_DEFAULT, "RCTProfileRegisterCallbacks"); | |
if(registerCallbacks != NULL) | |
{ | |
registerCallbacks(&profilerHackedCallbacks); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char* profileStart() | |
{ | |
NSLog(@"profile start"); | |
return 0; | |
} | |
void profileStop() | |
{ | |
NSLog(@"profile stop"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
const char *key; | |
int key_len; | |
const char *value; | |
int value_len; | |
} systrace_arg_t; | |
typedef struct { | |
char *(*start)(void); | |
void (*stop)(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
#import <UIKit/UIKit.h> | |
@import ObjectiveC; | |
@import Darwin; |