Home
last modified time | relevance | path

Searched refs:fd_ (Results 1 – 21 of 21) sorted by relevance

/developtools/profiler/device/base/src/
Devent_notifier.cpp39 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/
Dunique_fd.h63 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/
Dunique_fd.h63 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/
Dhiebpf_data_file.h54 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};
Dlibbpf_logger.h31 if (fd_ >= 0) { in ~LIBBPFLogger()
32 close(fd_); in ~LIBBPFLogger()
49 int fd_ {-1};
Delf_file.h158 return fd_ != -1; in IsOpened()
191 int fd_ {-1};
200 return read(fd_, buf, count); in ReadFile()
Dhhlog.h117 int fd_ {-1};
/developtools/profiler/device/plugins/hiebpf_plugin/tools/src/
Debpf_converter.cpp61 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/
Dhhlog.cpp26 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()
Dlibbpf_logger.cpp51 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()
Delf_file.cpp24 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 …]
Dhiebpf_data_file.cpp107 fd_, mapPos_); in MapFile()
136 fd_, remapPos); in RemapFile()
/developtools/profiler/device/plugins/native_daemon/src/
Delf_file.cpp27 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 …]
Dsymbols_file.cpp359 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/
Delf_file.cpp27 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 …]
Dsymbols_file.cpp387 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/
Dhiebpf_data_file_test.cpp75 close(hiebpfDataFile.fd_);
76 hiebpfDataFile.fd_ = -1;
/developtools/profiler/device/base/include/
Devent_notifier.h46 int fd_;
/developtools/hiperf/include/
Delf_parser.h234 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/
Debpf_converter.h47 int32_t fd_ { -1 };
/developtools/profiler/device/plugins/native_daemon/include/
Delf_parser.h244 return fd_ != -1; in IsOpened()
298 int fd_ {-1};
311 return read(fd_, buf, count); in ReadFile()