| 747 | } |
| 748 | |
| 749 | static const char* ReadFile( const char* path ) |
| 750 | { |
| 751 | int fd = open( path, O_RDONLY ); |
| 752 | if( fd < 0 ) return nullptr; |
| 753 | |
| 754 | static char tmp[64]; |
| 755 | const auto cnt = read( fd, tmp, 63 ); |
| 756 | close( fd ); |
| 757 | if( cnt < 0 ) return nullptr; |
| 758 | tmp[cnt] = '\0'; |
| 759 | return tmp; |
| 760 | } |
| 761 | |
| 762 | bool SysTraceStart( int64_t& samplingPeriod ) |
| 763 | { |