| /developtools/profiler/device/services/shared_memory/test/unittest/ |
| D | shared_memory_allocator_test.cpp | 71 ASSERT_TRUE(ShareMemoryAllocator::GetInstance().CreateMemoryBlockLocal("testname", 0) == 73 ASSERT_FALSE(ShareMemoryAllocator::GetInstance().ReleaseMemoryBlockLocal("testname")); 74 ASSERT_TRUE(ShareMemoryAllocator::GetInstance().CreateMemoryBlockLocal("testname", 1) == 76 ASSERT_FALSE(ShareMemoryAllocator::GetInstance().ReleaseMemoryBlockLocal("testname")); 77 …ASSERT_TRUE(ShareMemoryAllocator::GetInstance().CreateMemoryBlockLocal("testname", 4096) != nullpt… 78 ASSERT_TRUE(ShareMemoryAllocator::GetInstance().CreateMemoryBlockLocal("testname", 4096) == 80 ASSERT_TRUE(ShareMemoryAllocator::GetInstance().ReleaseMemoryBlockLocal("testname")); 81 ASSERT_FALSE(ShareMemoryAllocator::GetInstance().ReleaseMemoryBlockLocal("testname")); 91 …ASSERT_TRUE(ShareMemoryAllocator::GetInstance().FindMemoryBlockByName("err") == nullptr); // 查找不存在… 101 ASSERT_TRUE(ShareMemoryAllocator::GetInstance().CreateMemoryBlockRemote("err", 4096, 99) == [all …]
|
| /developtools/profiler/host/smartperf/client/client_command/ |
| D | sp_profiler_factory.cpp | 36 profiler = &CPU::GetInstance(); in GetProfilerItem() 39 profiler = &FPS::GetInstance(); in GetProfilerItem() 43 profiler = &GPU::GetInstance(); in GetProfilerItem() 46 profiler = &DDR::GetInstance(); in GetProfilerItem() 49 profiler = &RAM::GetInstance(); in GetProfilerItem() 52 profiler = &Temperature::GetInstance(); in GetProfilerItem() 55 profiler = &Power::GetInstance(); in GetProfilerItem() 58 ByTrace::GetInstance().ThreadGetTrace(); in GetProfilerItem() 61 ByTrace::GetInstance().ThreadEndTrace(); in GetProfilerItem() 63 ByTrace::GetInstance().ThreadFinishTrace(curTime); in GetProfilerItem() [all …]
|
| /developtools/hiperf/test/unittest/common/native/ |
| D | debug_logger_test.cpp | 44 DebugLogger::GetInstance()->Reset(); in SetUpTestCase() 49 DebugLogger::GetInstance()->Reset(); in TearDownTestCase() 61 DebugLogger::GetInstance()->exitOnFatal_ = false; in LogLevelTest() 62 DebugLevel oldLevel = DebugLogger::GetInstance()->GetLogLevel(); in LogLevelTest() 63 DebugLogger::GetInstance()->SetLogLevel(testlevel); in LogLevelTest() 83 fflush(DebugLogger::GetInstance()->file_); in LogLevelTest() 84 log = ReadFileToString(DebugLogger::GetInstance()->logPath_); in LogLevelTest() 89 if (testlevel > LEVEL_FATAL or DebugLogger::GetInstance()->enableHilog_ or in LogLevelTest() 90 DebugLogger::GetInstance()->logDisabled_) { in LogLevelTest() 104 DebugLogger::GetInstance()->SetLogLevel(oldLevel); in LogLevelTest() [all …]
|
| D | option_debug_test.cpp | 44 DebugLogger::GetInstance()->Reset(); in SetUpTestCase() 49 DebugLogger::GetInstance()->Reset(); in TearDownTestCase() 69 DebugLevel oldLevel = DebugLogger::GetInstance()->GetLogLevel(); in LogLevelTest() 81 if (fflush(DebugLogger::GetInstance()->file_) != 0) { in LogLevelTest() 84 std::string log = ReadFileToString(DebugLogger::GetInstance()->logPath_); in LogLevelTest() 94 DebugLogger::GetInstance()->SetLogLevel(oldLevel); in LogLevelTest() 159 DebugLogger::GetInstance()->SetMixLogOutput(false); 181 LogLevelTest({"--logtag", "123", TEST_CMD_NOTHING}, DebugLogger::GetInstance()->GetLogLevel()); 193 DebugLogger::GetInstance()->Disable(false); 207 DebugLogger::GetInstance()->EnableHiLog(false);
|
| /developtools/profiler/device/plugins/native_daemon/test/unittest/common/native/ |
| D | debug_logger_test.cpp | 56 DebugLogger::GetInstance()->exitOnFatal_ = false; in LogLevelTest() 57 DebugLevel oldLevel = DebugLogger::GetInstance()->GetLogLevel(); in LogLevelTest() 58 DebugLogger::GetInstance()->SetLogLevel(testlevel); in LogLevelTest() 78 fflush(DebugLogger::GetInstance()->file_); in LogLevelTest() 79 log = ReadFileToString(DebugLogger::GetInstance()->logPath_); in LogLevelTest() 84 if (testlevel > LEVEL_FATAL or DebugLogger::GetInstance()->enableHilog_ or in LogLevelTest() 85 DebugLogger::GetInstance()->logDisabled_) { in LogLevelTest() 99 DebugLogger::GetInstance()->SetLogLevel(oldLevel); in LogLevelTest() 100 DebugLogger::GetInstance()->exitOnFatal_ = true; in LogLevelTest() 110 DebugLogger::GetInstance()->SetMixLogOutput(true); [all …]
|
| /developtools/profiler/device/plugins/ftrace_plugin/test/unittest/ |
| D | sub_event_parser_test.cpp | 64 SubEventParser::GetInstance().idToFunctions_.clear(); in SetUp() 69 SubEventParser::GetInstance().idToFunctions_.clear(); in TearDown() 80 EXPECT_FALSE(SubEventParser::GetInstance().IsSupport("xxx")); 81 EXPECT_TRUE(SubEventParser::GetInstance().IsSupport("sched_switch")); 97 EXPECT_TRUE(nullptr == SubEventParser::GetInstance().GetParseEventCtx(format.eventId)); 98 EXPECT_TRUE(SubEventParser::GetInstance().SetupEvent(format)); 99 EXPECT_TRUE(nullptr != SubEventParser::GetInstance().GetParseEventCtx(format.eventId)); 114 SubEventParser::GetInstance().schedSwitchCtx = nullptr; 115 EXPECT_TRUE(nullptr == SubEventParser::GetInstance().GetParseEventCtx(format.eventId)); 116 EXPECT_TRUE(SubEventParser::GetInstance().SetupEvent(format)); [all …]
|
| D | ftrace_fs_ops_test.cpp | 95 std::string path = FtraceFsOps::GetInstance().GetFtraceRoot(); 107 std::string content = FtraceFsOps::GetInstance().GetKernelSymbols(); 118 std::string content = FtraceFsOps::GetInstance().GetPrintkFormats(); 147 std::string content = FtraceFsOps::GetInstance().GetProcessComm(pid); 158 std::string content = FtraceFsOps::GetInstance().GetProcessComm(-1); 170 std::string content = FtraceFsOps::GetInstance().GetThreadComm(pid, pid); 200 std::string content = FtraceFsOps::GetInstance().GetSavedCmdLines(); 228 std::string content = FtraceFsOps::GetInstance().GetSavedTgids(); 256 std::string content = FtraceFsOps::GetInstance().GetPerCpuStats(0); 287 std::string content = FtraceFsOps::GetInstance().GetRawTracePath(0); [all …]
|
| D | printk_formats_parser_test.cpp | 101 PrintkFormatsParser::GetInstance().printkFormats_.clear(); in SetUp() 106 PrintkFormatsParser::GetInstance().printkFormats_.clear(); in TearDown() 160 EXPECT_FALSE(PrintkFormatsParser::GetInstance().Parse(input)); 162 std::string symbol = PrintkFormatsParser::GetInstance().GetSymbol(0); 173 EXPECT_TRUE(PrintkFormatsParser::GetInstance().Parse(NORMAL_PRINTK_FORMATS)); 175 for (auto& entry : PrintkFormatsParser::GetInstance().printkFormats_) { 180 std::string symbol = PrintkFormatsParser::GetInstance().GetSymbol(CPU_ON_ADDR); 194 EXPECT_TRUE(PrintkFormatsParser::GetInstance().Parse(input)); 196 std::string symbol = PrintkFormatsParser::GetInstance().GetSymbol(1); 212 EXPECT_TRUE(PrintkFormatsParser::GetInstance().Parse(line)); [all …]
|
| D | ftrace_parser_test.cpp | 126 EXPECT_TRUE(parser.ParseSavedTgid(FtraceFsOps::GetInstance().GetSavedTgids())); 137 EXPECT_TRUE(parser.ParseSavedCmdlines(FtraceFsOps::GetInstance().GetSavedCmdLines())); 151 std::string perCpuStatsStr = FtraceFsOps::GetInstance().GetPerCpuStats(0); 163 std::string traceRaw = FtraceFsOps::GetInstance().GetRawTracePath(0); 167 EXPECT_TRUE(FtraceFsOps::GetInstance().ClearTraceBuffer()); 168 EXPECT_TRUE(FtraceFsOps::GetInstance().EnableEvent("sched", "sched_switch")); 169 EXPECT_TRUE(FtraceFsOps::GetInstance().EnableTracing()); 172 EXPECT_TRUE(FtraceFsOps::GetInstance().DisableTracing());
|
| /developtools/profiler/device/services/ipc/test/unittest/ |
| D | client_map_test.cpp | 43 ASSERT_EQ(ClientMap::GetInstance().PutClientSocket(1, serviceEntry), 1); 44 ClientMap::GetInstance().PutClientSocket(2, serviceTest); 45 ASSERT_EQ(ClientMap::GetInstance().PutClientSocket(2, serviceTest), -1); 46 ASSERT_EQ(ClientMap::GetInstance().AutoRelease(), 1); 47 ClientMap::GetInstance().socketClients_[2]->clientState_ = CLIENT_STAT_THREAD_EXITED; 48 ASSERT_EQ(ClientMap::GetInstance().AutoRelease(), 1); 49 ASSERT_EQ(ClientMap::GetInstance().ClearClientSocket(), 0); 50 ASSERT_EQ(ClientMap::GetInstance().AutoRelease(), 1);
|
| /developtools/profiler/device/services/profiler_service/test/unittest/ |
| D | profiler_capability_manager_test.cpp | 36 ProfilerCapabilityManager::GetInstance().pluginCapabilities_.clear(); in TearDown() 51 EXPECT_TRUE(ProfilerCapabilityManager::GetInstance().AddCapability(cap1)); 61 EXPECT_EQ(ProfilerCapabilityManager::GetInstance().GetCapabilities().size(), 0); 63 …std::vector<ProfilerPluginCapability> caps = ProfilerCapabilityManager::GetInstance().GetCapabilit… 71 EXPECT_TRUE(ProfilerCapabilityManager::GetInstance().AddCapability(cap)); 72 caps = ProfilerCapabilityManager::GetInstance().GetCapabilities(); 84 EXPECT_EQ(ProfilerCapabilityManager::GetInstance().GetCapability("xxx"), nullptr); 91 EXPECT_TRUE(ProfilerCapabilityManager::GetInstance().AddCapability(cap)); 97 auto capPtr = ProfilerCapabilityManager::GetInstance().GetCapability(cap.name()); 113 EXPECT_TRUE(ProfilerCapabilityManager::GetInstance().AddCapability(cap1)); [all …]
|
| /developtools/hiperf/src/ |
| D | option_debug.cpp | 27 DebugLogger::GetInstance()->SetLogLevel(LEVEL_VERBOSE); in OnVerboseLevel() 28 DebugLogger::GetInstance()->Disable(false); in OnVerboseLevel() 37 DebugLogger::GetInstance()->SetLogLevel(LEVEL_MUCH); in OnMuchLevel() 38 DebugLogger::GetInstance()->Disable(false); in OnMuchLevel() 47 DebugLogger::GetInstance()->SetLogLevel(LEVEL_DEBUG); in OnDebugLevel() 48 DebugLogger::GetInstance()->Disable(false); in OnDebugLevel() 57 DebugLogger::GetInstance()->Disable(); in OnNoDebug() 66 DebugLogger::GetInstance()->SetMixLogOutput(true); in OnMixLogOutput() 73 DebugLogger::GetInstance()->SetLogPath(args[0]); in OnLogPath() 84 DebugLogger::GetInstance()->SetLogTags(args[0]); in OnLogTag() [all …]
|
| D | debug_logger.cpp | 37 savedDebugLevel_ = DebugLogger::GetInstance()->SetLogLevel(level); in ScopeDebugLevel() 38 savedMixOutput_ = DebugLogger::GetInstance()->SetMixLogOutput(mix); in ScopeDebugLevel() 43 DebugLogger::GetInstance()->SetLogLevel(savedDebugLevel_); in ~ScopeDebugLevel() 44 DebugLogger::GetInstance()->SetMixLogOutput(savedMixOutput_); in ~ScopeDebugLevel() 155 DebugLevel lastLevel = DebugLogger::GetInstance()->debugLevel_; in SetLogLevel() 283 DebugLogger *DebugLogger::GetInstance() in GetInstance() function in OHOS::Developtools::HiPerf::DebugLogger
|
| /developtools/profiler/hiebpf/test/unittest/ |
| D | hhlog_test.cpp | 44 std::string fileName = HHLogger::GetInstance().GetLogFileName(); 55 std::string formatTime = HHLogger::GetInstance().GetFormatTime(); 66 int ret = HHLogger::GetInstance().UpdateTimer(); 77 auto ret = HHLogger::GetInstance().InitLogger(HHLOG_DEBUG, ""); 80 ret = HHLogger::GetInstance().InitLogger(HHLOG_DEBUG, "stdout"); 84 ret = HHLogger::GetInstance().InitLogger(HHLOG_DEBUG, fileName);
|
| /developtools/profiler/device/plugins/ftrace_plugin/src/ |
| D | flow_controller.cpp | 74 ftraceSupported_ = FtraceFsOps::GetInstance().GetFtraceRoot().size() > 0; in FlowController() 105 ksymsParser_->Parse(FtraceFsOps::GetInstance().GetKernelSymbols()); in SetWriter() 120 … auto reader = std::make_unique<FtraceDataReader>(FtraceFsOps::GetInstance().GetRawTracePath(i)); in CreateRawDataReaders() 198 FtraceFsOps::GetInstance().ClearTraceBuffer(); in StartCapture() 201 if (!FtraceFsOps::GetInstance().SetSavedCmdLinesSize(savedCmdlinesSize)) { in StartCapture() 206 FtraceFsOps::GetInstance().SetRecordCmdOption(true); in StartCapture() 207 FtraceFsOps::GetInstance().SetRecordTgidOption(true); in StartCapture() 230 FtraceFsOps::GetInstance().SetBufferSizeKb(bufferSizeKb_); in StartCapture() 257 ftraceParser_->ParseSavedCmdlines(FtraceFsOps::GetInstance().GetSavedCmdLines()); in CaptureWorkOnNomalMode() 305 ftraceParser_->ParseSavedCmdlines(FtraceFsOps::GetInstance().GetSavedCmdLines()); in CaptureWorkOnDelayMode() [all …]
|
| D | sub_event_parser.cpp | 73 SubEventParser::GetInstance().RegisterParseFunction(name, std::move(func)); in SubEventParserRegisterar() 78 SubEventParser::GetInstance().UnregisterParseFunction(name_); in ~SubEventParserRegisterar()
|
| D | ftrace_parser.cpp | 86 std::string printkFormats = FtraceFsOps::GetInstance().GetPrintkFormats(); in Init() 88 …CHECK_TRUE(PrintkFormatsParser::GetInstance().Parse(printkFormats), false, "parse printk_formats f… in Init() 90 std::string formatDesc = FtraceFsOps::GetInstance().GetPageHeaderFormat(); in Init() 102 if (!SubEventParser::GetInstance().IsSupport(name)) { in SetupEvent() 110 std::string desc = FtraceFsOps::GetInstance().GetEventDataFormat(type, name); in SetupEvent() 112 …CHECK_TRUE(SubEventParser::GetInstance().SetupEvent(format), false, "setup %s/%s failed!", type.c_… in SetupEvent() 640 …SubEventParser::ParseEventCtx* parseEventCtx = SubEventParser::GetInstance().GetParseEventCtx(even… in ParseDataRecord() 741 ParseSavedTgid(FtraceFsOps::GetInstance().GetSavedTgids()); in ParseFtraceEvent() 753 comm = FtraceFsOps::GetInstance().GetThreadComm(tgid, pid); in ParseFtraceEvent() 755 comm = FtraceFsOps::GetInstance().GetProcessComm(pid); in ParseFtraceEvent() [all …]
|
| /developtools/profiler/device/plugins/ftrace_plugin/test/app/ |
| D | busy_workers.cpp | 74 static Controller& GetInstance() in GetInstance() function 181 Controller::GetInstance().SetSwitchCount(m); in main() 182 Controller::GetInstance().StartWorkers(n); in main() 185 Controller::GetInstance().WaitForDone(); in main() 187 Controller::GetInstance().StopWorkers(n); in main()
|
| /developtools/profiler/device/plugins/native_daemon/src/ |
| D | debug_logger.cpp | 38 savedDebugLevel_ = DebugLogger::GetInstance()->SetLogLevel(level); in ScopeDebugLevel() 39 savedMixOutput_ = DebugLogger::GetInstance()->SetMixLogOutput(mix); in ScopeDebugLevel() 44 DebugLogger::GetInstance()->SetLogLevel(savedDebugLevel_); in ~ScopeDebugLevel() 45 DebugLogger::GetInstance()->SetMixLogOutput(savedMixOutput_); in ~ScopeDebugLevel() 154 DebugLevel lastLevel = DebugLogger::GetInstance()->debugLevel_; in SetLogLevel() 262 DebugLogger *DebugLogger::GetInstance() in GetInstance() function in OHOS::Developtools::NativeDaemon::DebugLogger
|
| /developtools/profiler/device/plugins/native_daemon/include/ |
| D | debug_logger.h | 80 static DebugLogger *GetInstance(); 139 DebugLogger::GetInstance()->Log(LEVEL_STDOUT, HILOG_TAG, format, ##__VA_ARGS__); \ 147 DebugLogger::GetInstance()->Log(LEVEL_STDOUT, HILOG_TAG, format "<%d:%s>\n", \ 177 DebugLogger::GetInstance()->Log( \ 285 DebugLogger::GetInstance()->Log(level_, HILOG_TAG, "%s\n", buffer_.str().c_str()); in ~LogMessage() 287 DebugLogger::GetInstance()->Log(level_, HILOG_TAG, "%s (errno %d:%s)\n", in ~LogMessage()
|
| /developtools/profiler/hiebpf/include/ |
| D | hhlog.h | 50 static inline HHLogger& GetInstance() in GetInstance() function 127 (!HHLogger::GetInstance().IsStopped()) and \ 128 (HHLogger::GetInstance().GetLogLevel() <= HHLOG_##level)) { \ 133 HHLogger::GetInstance().PutLog(buffer, ##__VA_ARGS__); \
|
| /developtools/profiler/device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_formatters/ |
| D | ftrace_ftrace_event_formatter.cpp | 33 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anonf3518d280302() 86 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anonf3518d280902() 111 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anonf3518d280b02() 138 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anonf3518d280d02() 163 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anonf3518d280f02() 245 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anonf3518d281702()
|
| /developtools/profiler/device/plugins/native_hook/src/ |
| D | stack_writer.cpp | 30 …shareMemoryBlock_ = ShareMemoryAllocator::GetInstance().CreateMemoryBlockRemote(name, size, smbFd); in StackWriter() 42 ShareMemoryAllocator::GetInstance().ReleaseMemoryBlockRemote(pluginName_); in ~StackWriter()
|
| /developtools/hiperf/include/ |
| D | debug_logger.h | 92 static DebugLogger *GetInstance(); 154 DebugLogger::GetInstance()->Log(LEVEL_STDOUT, HILOG_TAG, format, ##__VA_ARGS__); \ 162 DebugLogger::GetInstance()->Log(LEVEL_STDOUT, HILOG_TAG, format "<%d>\n", \ 192 DebugLogger::GetInstance()->Log( \
|
| /developtools/profiler/host/smartperf/client/client_command/include/ |
| D | sp_thread_socket.h | 82 ErrCode code = SPTask::GetInstance().InitTask(SplitMsg(recvStr)); in DealMsg() 90 ErrCode code = SPTask::GetInstance().StartTask(lambdaTask); in DealMsg() 97 SPTask::GetInstance().StopTask(); in DealMsg()
|