/developtools/profiler/device/base/src/ |
D | event_notifier.cpp | 39 EventNotifier::EventNotifier(unsigned int initValue, unsigned int mask) : fd_(-1), flags_(O_CLOEXEC) in EventNotifier() 47 fd_ = eventfd(initValue, flags_); in EventNotifier() 48 CHECK_TRUE(fd_ >= 0, NO_RETVAL, "create eventfd FAILED, %d", errno); in EventNotifier() 49 HILOG_DEBUG(LOG_CORE, "EventNotifier create eventfd %d done!", fd_); in EventNotifier() 52 EventNotifier::EventNotifier(int fd) : fd_(fd), flags_(0) in EventNotifier() 54 int flags = fcntl(fd_, F_GETFL); in EventNotifier() 56 HILOG_DEBUG(LOG_CORE, "EventNotifier bind eventfd %d done!", fd_); in EventNotifier() 61 HILOG_DEBUG(LOG_CORE, "EventNotifier close eventfd %d", fd_); in ~EventNotifier() 62 close(fd_); in ~EventNotifier() 67 return fd_; in GetFd() [all …]
|
/developtools/profiler/host/smartperf/trace_streamer/prebuilts/patch_hiperf/ |
D | unique_fd.h | 63 explicit UniqueFdAddDeletor(const int& value) : fd_(value) {} in UniqueFdAddDeletor() 64 UniqueFdAddDeletor() : fd_(-1) {} in UniqueFdAddDeletor() 73 int tmp = fd_; in Release() 74 fd_ = -1; in Release() 86 return fd_; in Get() 93 fd_ = rhsfd; in UniqueFdAddDeletor() 105 return fd_ == rhs; 110 return !(fd_ == rhs); 114 return fd_ >= rhs; 119 return fd_ > rhs; [all …]
|
/developtools/smartperf_host/trace_streamer/prebuilts/patch_hiperf/ |
D | unique_fd.h | 63 explicit UniqueFdAddDeletor(const int& value) : fd_(value) {} in UniqueFdAddDeletor() 64 UniqueFdAddDeletor() : fd_(-1) {} in UniqueFdAddDeletor() 73 int tmp = fd_; in Release() 74 fd_ = -1; in Release() 86 return fd_; in Get() 93 fd_ = rhsfd; in UniqueFdAddDeletor() 105 return fd_ == rhs; 110 return !(fd_ == rhs); 114 return fd_ >= rhs; 119 return fd_ > rhs; [all …]
|
/developtools/profiler/hiebpf/include/ |
D | hiebpf_data_file.h | 54 if (fd_ != -1) { in ~HiebpfDataFile() 56 ftruncate(fd_, curPos); in ~HiebpfDataFile() 57 close(fd_); in ~HiebpfDataFile() 58 fd_ = -1; in ~HiebpfDataFile() 99 fd_ = open(filename_.c_str(), O_RDWR | O_CREAT, FILE_MODE); in OpenFile() 100 return (fd_ < 0) ? -1 : 0; in OpenFile() 105 if (ftruncate(fd_, mapPos + mapLength) != 0) { in ExtendFile() 134 int fd_ {-1};
|
D | libbpf_logger.h | 31 if (fd_ >= 0) { in ~LIBBPFLogger() 32 close(fd_); in ~LIBBPFLogger() 49 int fd_ {-1};
|
D | elf_file.h | 158 return fd_ != -1; in IsOpened() 191 int fd_ {-1}; 200 return read(fd_, buf, count); in ReadFile()
|
D | hhlog.h | 117 int fd_ {-1};
|
/developtools/profiler/device/plugins/hiebpf_plugin/tools/src/ |
D | ebpf_converter.cpp | 61 fd_ = open(inputPath_.c_str(), O_RDONLY); in StartParsing() 62 if (fd_ == -1) { in StartParsing() 80 fileSize_ = lseek(fd_, header.headSize, SEEK_SET); in StartParsing() 90 if (read(fd_, reinterpret_cast<void*>(&type), sizeof(type)) <= 0) { in StartParsing() 120 close(fd_); in StartParsing() 121 fd_ = -1; in StartParsing() 128 close(fd_); in StartParsing() 129 fd_ = -1; in StartParsing() 144 ssize_t ret = read(fd_, buffer, size); in Read() 146 close(fd_); in Read() [all …]
|
/developtools/profiler/hiebpf/src/ |
D | hhlog.cpp | 26 if (fd_ >= 0) { in ~HHLogger() 27 close(fd_); in ~HHLogger() 49 fd_ = open("/dev/stdout", O_WRONLY); in InitLogger() 51 fd_ = STDOUT_FILENO; in InitLogger() 53 if (fd_ < 0) { in InitLogger() 62 fd_ = open(fileName.c_str(), O_WRONLY | O_CREAT, FILE_MODE); in InitLogger() 63 if (fd_ < 0) { in InitLogger() 154 ssize_t ret = buf_->Write(fd_, dataSize); in SaveLog()
|
D | libbpf_logger.cpp | 51 return vdprintf(fd_, format, args); in Printf() 61 fd_ = open("/dev/stdout", O_WRONLY); in OpenLogFile() 63 fd_ = STDOUT_FILENO; in OpenLogFile() 65 if (fd_ < 0) { in OpenLogFile() 75 fd_ = open(fileName.c_str(), O_WRONLY | O_CREAT, FILE_MODE); in OpenLogFile() 76 if (fd_ < 0) { in OpenLogFile()
|
D | elf_file.cpp | 24 fd_ = open(filename.c_str(), O_RDONLY); in ElfFile() 25 if (fd_ != -1) { in ElfFile() 27 if (fstat(fd_, &sb) == -1) { in ElfFile() 31 mmap_ = mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE, fd_, 0); in ElfFile() 49 if (fd_ != -1) { in ~ElfFile() 50 close(fd_); in ~ElfFile() 51 fd_ = -1; in ~ElfFile() 75 ssize_t ret = lseek(fd_, 0, SEEK_SET); in ParseElfHeader() 91 int64_t ret = lseek(fd_, phdrOffset, SEEK_SET); in ParsePrgHeaders() 127 int64_t ret = lseek(fd_, shdrOffset, SEEK_SET); in ParseSecNamesStr() [all …]
|
D | hiebpf_data_file.cpp | 107 fd_, mapPos_); in MapFile() 136 fd_, remapPos); in RemapFile()
|
/developtools/profiler/device/plugins/native_daemon/src/ |
D | elf_file.cpp | 27 fd_ = open(filename.c_str(), O_RDONLY | O_BINARY); in ElfFile() 29 fd_ = open(filename.c_str(), O_RDONLY); in ElfFile() 31 if (fd_ != -1) { in ElfFile() 33 if (fstat(fd_, &sb) == -1) { in ElfFile() 38 mmap_ = mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE, fd_, 0); in ElfFile() 56 if (fd_ != -1) { in ~ElfFile() 57 close(fd_); in ~ElfFile() 58 fd_ = -1; in ~ElfFile() 82 size_t ret = lseek(fd_, 0, SEEK_SET); in ParseElfHeader() 100 int64_t ret = lseek(fd_, phdrOffset, SEEK_SET); in ParsePrgHeaders() [all …]
|
D | symbols_file.cpp | 359 OHOS::UniqueFd fd_ {-1}; member in OHOS::Developtools::NativeDaemon::ElfFileSymbols 510 if (fd_ != -1) { in LoadFileToMemory() 514 fd_ = OHOS::UniqueFd(open(loadElfPath.c_str(), O_RDONLY | O_BINARY)); in LoadFileToMemory() 516 fd_ = OHOS::UniqueFd(open(loadElfPath.c_str(), O_RDONLY)); in LoadFileToMemory() 518 if (fd_ != -1) { in LoadFileToMemory() 521 if (fstat(fd_, &sb) == -1) { in LoadFileToMemory() 531 mmap_ = mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE, fd_, 0); in LoadFileToMemory()
|
/developtools/hiperf/src/ |
D | elf_file.cpp | 27 fd_ = open(resolvedPath.c_str(), O_RDONLY | O_BINARY); in ElfFile() 30 fd_ = open(resolvedPath.c_str(), O_RDONLY); in ElfFile() 32 if (fd_ != -1) { in ElfFile() 34 if (fstat(fd_, &sb) == -1) { in ElfFile() 38 mmap_ = mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE, fd_, 0); in ElfFile() 56 if (fd_ != -1) { in ~ElfFile() 57 close(fd_); in ~ElfFile() 58 fd_ = -1; in ~ElfFile() 103 ssize_t ret = lseek(fd_, 0, SEEK_SET); in ParseElfHeader() 125 int64_t ret = lseek(fd_, phdrOffset, SEEK_SET); in ParsePrgHeaders() [all …]
|
D | symbols_file.cpp | 387 OHOS::UniqueFd fd_ {-1}; member in OHOS::Developtools::HiPerf::ElfFileSymbols 535 if (fd_ != -1) { in LoadFileToMemory() 540 fd_ = OHOS::UniqueFd(open(resolvedPath.c_str(), O_RDONLY | O_BINARY)); in LoadFileToMemory() 543 fd_ = OHOS::UniqueFd(open(resolvedPath.c_str(), O_RDONLY)); in LoadFileToMemory() 545 if (fd_ != -1) { in LoadFileToMemory() 548 if (fstat(fd_, &sb) == -1) { in LoadFileToMemory() 558 mmap_ = mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE, fd_, 0); in LoadFileToMemory()
|
/developtools/profiler/hiebpf/test/unittest/ |
D | hiebpf_data_file_test.cpp | 75 close(hiebpfDataFile.fd_); 76 hiebpfDataFile.fd_ = -1;
|
/developtools/profiler/device/base/include/ |
D | event_notifier.h | 46 int fd_;
|
/developtools/hiperf/include/ |
D | elf_parser.h | 234 return fd_ != -1; in IsOpened() 267 int fd_ {-1}; 280 return read(fd_, buf, count); in ReadFile()
|
/developtools/profiler/device/plugins/hiebpf_plugin/tools/include/ |
D | ebpf_converter.h | 47 int32_t fd_ { -1 };
|
/developtools/profiler/device/plugins/native_daemon/include/ |
D | elf_parser.h | 244 return fd_ != -1; in IsOpened() 298 int fd_ {-1}; 311 return read(fd_, buf, count); in ReadFile()
|