Home
last modified time | relevance | path

Searched refs:fp (Results 1 – 25 of 83) sorted by relevance

1234

/developtools/hdc/src/common/
Ddebug.cpp28 FILE *fp = fopen(resolvedPath.c_str(), "a+"); in WriteHexToDebugFile() local
29 if (fp == nullptr) { in WriteHexToDebugFile()
37 if ((fp = fopen(resolvedPath.c_str(), "a+")) == nullptr) { in WriteHexToDebugFile()
42 fwrite(buf, 1, bufLen, fp); in WriteHexToDebugFile()
43 fflush(fp); in WriteHexToDebugFile()
44 fclose(fp); in WriteHexToDebugFile()
54 FILE *fp = fopen(pathName, "r"); in ReadHexFromDebugFile() local
55 if (fp == nullptr) { in ReadHexFromDebugFile()
57 (fp = fopen(pathName, "r")) == nullptr) { in ReadHexFromDebugFile()
58 if (fp != nullptr) { in ReadHexFromDebugFile()
[all …]
/developtools/bytrace/script/
Dbytrace_multi.py33 with codecs.open(file, 'r', encoding='utf-8') as fp:
34 for line in fp:
96 with codecs.open(file_name, 'w+', encoding='utf-8') as fp:
97 fp.write("# tracer: nop\n")
98 fp.write("#\n")
99 fp.write("# _-----=> irqs-off\n")
100 fp.write("# / _----=> need-resched\n")
101 fp.write("# | / _---=> hardirq/softirq\n")
102 fp.write("# || / _--=> preempt-depth\n")
103 fp.write("# ||| / delay\n")
[all …]
/developtools/hiperf/test/unittest/common/native/
Dperf_file_reader_test.cpp48 FILE *fp = stdout; variable
49 PerfFileReader *hiperfFileReader = new PerfFileReader(filename, fp);
61 FILE *fp = nullptr; variable
62 PerfFileReader *hiperfFileReader = new PerfFileReader(filename, fp);
74 FILE *fp = stdout; variable
75 PerfFileReader *hiperfFileReader = new PerfFileReader(filename, fp);
83 FILE *fp = nullptr; variable
84 PerfFileReader *hiperfFileReader = new PerfFileReader(filename, fp);
92 FILE *fp = stdout; variable
93 PerfFileReader *hiperfFileReader = new PerfFileReader(filename, fp);
[all …]
/developtools/profiler/device/plugins/hidump_plugin/test/unittest/
Dhidump_plugin_unittest.cpp206 FILE *fp = nullptr; variable
209 fp = plugin.CustomPopen("", "r");
210 EXPECT_NE(fp, nullptr);
212 EXPECT_NE(plugin.CustomPclose(fp), -1);
222 std::unique_ptr<FILE, int (*)(FILE*)> fp(popen(cmd.c_str(), "r"), pclose); in RecordFileExist() local
223 if (!fp) { in RecordFileExist()
229 char* pRet = fgets(buff, BUF_MAX_LEN - 1, fp.get()); in RecordFileExist()
248 FILE *fp = nullptr; variable
253 fp = plugin.CustomPopen(cmd.c_str(), "w");
254 EXPECT_NE(fp, nullptr);
[all …]
/developtools/syscap_codec/src/
Dcontext_tool.c43 FILE *fp = NULL; in GetFileContext() local
74 fp = fopen(path, "rb"); in GetFileContext()
75 if (fp == NULL) { in GetFileContext()
80 size_t retFread = fread(contextBuffer, statBuf.st_size, 1, fp); in GetFileContext()
84 (void)fclose(fp); in GetFileContext()
88 (void)fclose(fp); in GetFileContext()
98 FILE *fp = NULL; in ConvertedContextSaveAsFile() local
128 fp = fopen(path, "wb"); in ConvertedContextSaveAsFile()
129 if (fp == NULL) { in ConvertedContextSaveAsFile()
134 if (fwrite(convertedBuffer, contextBufLen, 1, fp) != 1) { in ConvertedContextSaveAsFile()
[all …]
/developtools/integration_verification/tools/startup_guard/config_parser_mgr/user_group/
Duser_group_parser.py31 with open(file_name, encoding='utf-8') as fp:
32 line = fp.readline()
35 line = fp.readline()
39 line = fp.readline()
42 line = fp.readline()
76 with open(file_name, encoding='utf-8') as fp:
77 line = fp.readline()
80 line = fp.readline()
84 line = fp.readline()
87 line = fp.readline()
/developtools/hdc/hdc_rust/src/cffi/
Dutils.cpp74 FILE *fp = fopen(bufPath, "a+"); in ProgramMutex() local
75 if (fp == nullptr) { in ProgramMutex()
81 fclose(fp); in ProgramMutex()
87 fclose(fp); in ProgramMutex()
94 int fd = fileno(fp); in ProgramMutex()
97 fclose(fp); in ProgramMutex()
100 rc = fwrite(&pidBuf, sizeof(char), strlen(pidBuf), fp); in ProgramMutex()
102 fclose(fp); in ProgramMutex()
107 fclose(fp); in ProgramMutex()
Dmount.cpp33 FILE *fp = fopen("/proc/mounts", "r"); in FindMountDeviceByPath() local
34 if (fp == nullptr) { in FindMountDeviceByPath()
39 while (fgets(buf, len, fp) != nullptr) { in FindMountDeviceByPath()
56 int rc = fclose(fp); in FindMountDeviceByPath()
/developtools/hiperf/test/fuzztest/perffile_fuzzer/
DPerfFile_fuzzer.cpp23 explicit PerfFileReaderFuzzer(const std::string &fileName, FILE *fp) in PerfFileReaderFuzzer() argument
24 : PerfFileReader(fileName, fp) {} in PerfFileReaderFuzzer()
39 FILE *fp = fopen(resolvedPath.c_str(), "rb"); in Instance() local
40 if (fp == nullptr) { in Instance()
46 std::make_unique<PerfFileReaderFuzzer>(resolvedPath, fp); in Instance()
/developtools/profiler/host/smartperf/client/client_command/
DNetwork.cpp52 FILE *fp = fopen("/proc/net/dev", "r"); in GetNetworkInfo() local
53 if (fp == nullptr) { in GetNetworkInfo()
57 while (fgets(buff, LARGE_BUFF_MAX_LEN, fp) != nullptr) { in GetNetworkInfo()
61 (void)fclose(fp); in GetNetworkInfo()
68 (void)fclose(fp); in GetNetworkInfo()
DCapture.cpp143 FILE *fp = fopen(savePath.c_str(), "wb"); in TakeScreenCap() local
144 if (fp == nullptr) { in TakeScreenCap()
150 png_init_io(pngStruct, fp); in TakeScreenCap()
161 (void)fclose(fp); in TakeScreenCap()
DFPS.cpp158 FILE *fp; in GetSurfaceFrame() local
161 fp = popen(cmd.c_str(), "r"); in GetSurfaceFrame()
162 if (fp == nullptr) { in GetSurfaceFrame()
177 while (fgets(tmp, sizeof(tmp), fp) != nullptr) { in GetSurfaceFrame()
193 pclose(fp); in GetSurfaceFrame()
/developtools/profiler/device/plugins/native_daemon/test/unittest/common/native/include/
Dcallstack_test.h117 std::unique_ptr<FILE, decltype(&fclose)> fp(fp_cin, fclose); in LoadFromFile()
118 if (fp == nullptr) { in LoadFromFile()
123 ASSERT_NE(fstat(fileno(fp.get()), &sb), -1); in LoadFromFile()
128 if ((ret = fread(data.data(), sizeof(T), data.size(), fp.get())) < 0) { in LoadFromFile()
/developtools/hiperf/test/unittest/common/native/include/
Dcallstack_test.h166 std::unique_ptr<FILE, decltype(&fclose)> fp(fp_, fclose); in LoadFromFile()
167 if (fp) { in LoadFromFile()
169 ASSERT_NE(fstat(fileno(fp.get()), &sb), -1); in LoadFromFile()
173 ASSERT_EQ(fread(data.data(), sizeof(T), data.size(), fp.get()), data.size()); in LoadFromFile()
/developtools/profiler/device/plugins/native_hook/src/
Druntime_stack_range.cpp106 static void GetAnUnlimitedLine(FILE* fp, std::string& buf) in GetAnUnlimitedLine() argument
108 if (!fp) { in GetAnUnlimitedLine()
123 retLine = fgets(&buf[0] + offset, buf.size() - offset, fp); in GetAnUnlimitedLine()
170 FILE* fp = fopen("/proc/self/maps", "re"); in GetMainThreadRuntimeStackRange() local
171 if (fp == nullptr) { in GetMainThreadRuntimeStackRange()
174 while (!feof(fp)) { in GetMainThreadRuntimeStackRange()
176 GetAnUnlimitedLine(fp, line); in GetMainThreadRuntimeStackRange()
190 if (fclose(fp) != 0) { in GetMainThreadRuntimeStackRange()
/developtools/profiler/device/plugins/native_daemon/src/
Dutilities.cpp321 FILE *fp = fopen(dataFile.c_str(), "rb"); in CompressFile() local
322 if (fp == nullptr) { in CompressFile()
331 fclose(fp); in CompressFile()
337 while ((len = fread(buf.data(), sizeof(uint8_t), buf.size(), fp))) { in CompressFile()
340 fclose(fp); in CompressFile()
344 if (!feof(fp)) { in CompressFile()
345 if (ferror(fp) != 0) { in CompressFile()
347 fclose(fp); in CompressFile()
354 UNWIND_CHECK_TRUE(fclose(fp) == 0, false, "fclose failed! errno(%d:%s)", errno, errBuf); in CompressFile()
361 FILE *fp = fopen(dataFile.c_str(), "wb"); in UncompressFile() local
[all …]
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/
DPowerDubai.ets60 …}.fontWeight(FontWeight.Bold).fontColor($r('app.color.color_333')).fontSize('12fp').textAlign(Text…
67 .fontSize('12fp')
75 .fontSize('12fp')
83 .fontSize('12fp')
98 …}.fontWeight(FontWeight.Bold).fontColor($r('app.color.color_333')).fontSize('12fp').textAlign(Text…
106 .fontSize('12fp')
114 .fontSize('12fp')
123 .fontSize('12fp')
/developtools/integration_verification/tools/startup_guard/config_parser_mgr/param/
Dsystem_parameter_parser.py86 with open(file_name, encoding='utf-8') as fp:
87 line = fp.readline()
90 line = fp.readline()
94 line = fp.readline()
97 line = fp.readline()
/developtools/profiler/device/base/src/
Dcommon.cpp138 FILE* fp = fopen(filePath, "r"); in IsProcessExist() local
139 if (fp == nullptr) { in IsProcessExist()
144 if (fgets(buf, sizeof(buf) - 1, fp) == nullptr) { in IsProcessExist()
145 fclose(fp); in IsProcessExist()
158 fclose(fp); in IsProcessExist()
161 fclose(fp); in IsProcessExist()
233 inline int CustomFdFclose(FILE** fp) in CustomFdFclose() argument
235 int ret = fclose(*fp); in CustomFdFclose()
237 *fp = nullptr; in CustomFdFclose()
314 int CustomPclose(FILE* fp, int fds[], volatile pid_t& childPid, bool needUnblock) in CustomPclose() argument
[all …]
/developtools/profiler/device/plugins/hiperf_plugin/test/unittest/
Dhiperf_plugin_unittest.cpp169 std::unique_ptr<FILE, int (*)(FILE*)> fp(fopen(fileName.c_str(), "rb"), fclose); in CheckRecordFile() local
170 ASSERT_NE(fp, nullptr); in CheckRecordFile()
173 fseek(fp.get(), 0, SEEK_END); in CheckRecordFile()
174 ASSERT_GE(ftell(fp.get()), perfDataHeaderLen) << "perf.data should have data"; in CheckRecordFile()
175 fseek(fp.get(), 0, SEEK_SET); in CheckRecordFile()
178 long rLen = fread(buff, 1, perfDataHeaderLen, fp.get()); in CheckRecordFile()
/developtools/hiperf/src/
Dutilities.cpp373 FILE *fp = fopen(resolvedPath.c_str(), "rb"); in CompressFile() local
374 if (fp == nullptr) { in CompressFile()
383 fclose(fp); in CompressFile()
389 while ((len = fread(buf.data(), sizeof(uint8_t), buf.size(), fp))) { in CompressFile()
392 fclose(fp); in CompressFile()
396 if (!feof(fp)) { in CompressFile()
397 if (ferror(fp) != 0) { in CompressFile()
399 fclose(fp); in CompressFile()
403 if (fclose(fp) < 0) { in CompressFile()
413 FILE *fp = fopen(resolvedPath.c_str(), "wb"); in UncompressFile() local
[all …]
Dperf_file_reader.cpp37 FILE *fp = fopen(resolvedPath.c_str(), "rb"); in Instance() local
38 if (fp == nullptr) { in Instance()
43 std::unique_ptr<PerfFileReader> reader = std::make_unique<PerfFileReader>(fileName, fp); in Instance()
47 fclose(fp); in Instance()
80 PerfFileReader::PerfFileReader(const std::string &fileName, FILE *fp) : fp_(fp), fileName_(fileName) in PerfFileReader() argument
84 if (fp != nullptr) { in PerfFileReader()
85 if (fstat(fileno(fp), &fileStat) != -1 and fileStat.st_size > 0) { in PerfFileReader()
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/main/
DReport.ets57 Text(`${item.name}`).fontSize('15fp')
59 Text(`${item.appName}`).fontSize('15fp').backgroundColor(0xFFFFFF)
61 Text(`${item.startTime}`).fontSize('15fp').backgroundColor(0xFFFFFF)
63 … Text(secToTime(item.testDuration).toString()).fontSize('15fp').backgroundColor(0xFFFFFF)
/developtools/profiler/device/plugins/hiperf_plugin/src/
Dhiperf_module.cpp95 FILE* fp = COMMON::CustomPopen(cmdArg, "r", pipeFds, childPid); in RunCommand() local
96 CHECK_NOTNULL(fp, false, "HiperfPlugin::RunCommand CustomPopen FAILED!r"); in RunCommand()
101 while (fgets(buffer.data(), buffer.size(), fp) != nullptr) { in RunCommand()
108 COMMON::CustomPclose(fp, pipeFds, childPid); in RunCommand()
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/pages/
DLightAdjust.ets54 Text('+').fontSize('25fp').fontWeight(FontWeight.Bold).onClick(() => {
62 Text(this.outSetValue.toFixed(0)).fontWeight(FontWeight.Bold).fontSize('25fp')
64 Text('-').fontSize('25fp').fontWeight(FontWeight.Bold).onClick(() => {

1234