Home
last modified time | relevance | path

Searched refs:GetInstance (Results 1 – 25 of 116) sorted by relevance

12345

/developtools/profiler/device/services/shared_memory/test/unittest/
Dshared_memory_allocator_test.cpp71 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/device/plugins/native_daemon/test/unittest/common/native/
Ddebug_logger_test.cpp56 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/hiperf/test/unittest/common/native/
Ddebug_logger_test.cpp44 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 …]
Doption_debug_test.cpp44 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/host/smartperf/client/client_command/
Dsp_profiler_factory.cpp38 profiler = &CPU::GetInstance(); in GetProfilerItem()
41 profiler = &FPS::GetInstance(); in GetProfilerItem()
45 profiler = &GPU::GetInstance(); in GetProfilerItem()
48 profiler = &DDR::GetInstance(); in GetProfilerItem()
51 profiler = &RAM::GetInstance(); in GetProfilerItem()
54 profiler = &Temperature::GetInstance(); in GetProfilerItem()
57 profiler = &Power::GetInstance(); in GetProfilerItem()
60 FPS::GetInstance().SetTraceCatch(); in GetProfilerItem()
63 profiler = &Capture::GetInstance(); in GetProfilerItem()
78 FPS &fps = FPS::GetInstance(); in SetProfilerPkg()
[all …]
/developtools/profiler/device/plugins/ftrace_plugin/test/unittest/
Dsub_event_parser_test.cpp66 SubEventParser::GetInstance().idToFunctions_.clear(); in SetUp()
71 SubEventParser::GetInstance().idToFunctions_.clear(); in TearDown()
82 EXPECT_FALSE(SubEventParser::GetInstance().IsSupport("xxx"));
83 EXPECT_TRUE(SubEventParser::GetInstance().IsSupport("sched_switch"));
99 EXPECT_TRUE(nullptr == SubEventParser::GetInstance().GetParseEventCtx(format.eventId));
100 EXPECT_TRUE(SubEventParser::GetInstance().SetupEvent(format));
101 EXPECT_TRUE(nullptr != SubEventParser::GetInstance().GetParseEventCtx(format.eventId));
117 SubEventParser::GetInstance().schedSwitchCtx = nullptr;
118 EXPECT_TRUE(nullptr == SubEventParser::GetInstance().GetParseEventCtx(format.eventId));
119 EXPECT_TRUE(SubEventParser::GetInstance().SetupEvent(format));
[all …]
Dftrace_fs_ops_test.cpp98 std::string path = FtraceFsOps::GetInstance().GetFtraceRoot();
110 std::string content = FtraceFsOps::GetInstance().GetKernelSymbols();
121 std::string content = FtraceFsOps::GetInstance().GetPrintkFormats();
150 std::string content = FtraceFsOps::GetInstance().GetProcessComm(pid);
161 std::string content = FtraceFsOps::GetInstance().GetProcessComm(-1);
173 std::string content = FtraceFsOps::GetInstance().GetThreadComm(pid, pid);
203 std::string content = FtraceFsOps::GetInstance().GetSavedCmdLines();
231 std::string content = FtraceFsOps::GetInstance().GetSavedTgids();
259 std::string content = FtraceFsOps::GetInstance().GetPerCpuStats(0);
290 std::string content = FtraceFsOps::GetInstance().GetRawTracePath(0);
[all …]
Dprintk_formats_parser_test.cpp101 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 …]
Dftrace_parser_test.cpp129 EXPECT_TRUE(parser.ParseSavedTgid(FtraceFsOps::GetInstance().GetSavedTgids()));
140 EXPECT_TRUE(parser.ParseSavedCmdlines(FtraceFsOps::GetInstance().GetSavedCmdLines()));
154 std::string perCpuStatsStr = FtraceFsOps::GetInstance().GetPerCpuStats(0);
167 if (FtraceFsOps::GetInstance().hmTraceDir_ != "") {
168 traceRaw = FtraceFsOps::GetInstance().GetHmRawTracePath();
170 traceRaw = FtraceFsOps::GetInstance().GetRawTracePath(0);
175 EXPECT_TRUE(FtraceFsOps::GetInstance().ClearTraceBuffer());
176 EXPECT_TRUE(FtraceFsOps::GetInstance().EnableEvent("sched", "sched_switch"));
177 EXPECT_TRUE(FtraceFsOps::GetInstance().EnableTracing());
180 EXPECT_TRUE(FtraceFsOps::GetInstance().DisableTracing());
/developtools/profiler/device/services/ipc/test/unittest/
Dclient_map_test.cpp43 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/
Dprofiler_capability_manager_test.cpp36 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/
Doption_debug.cpp27 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 …]
Ddebug_logger.cpp37 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/smartperf_host/trace_streamer/test/unittest/rawtrace/
Drawtrace_cpu_detail_parse_test.cpp58 …EXPECT_TRUE(FtraceEventProcessor::GetInstance().SchedSwitch(*ftraceEvent_, data_.data(), data_.siz…
71 …FtraceEventProcessor::GetInstance().SchedBlockedReason(*ftraceEvent_, data_.data(), data_.size(), …
83 …EXPECT_TRUE(FtraceEventProcessor::GetInstance().SchedWakeup(*ftraceEvent_, data_.data(), data_.siz…
95 …EXPECT_TRUE(FtraceEventProcessor::GetInstance().SchedWaking(*ftraceEvent_, data_.data(), data_.siz…
107 …EXPECT_TRUE(FtraceEventProcessor::GetInstance().SchedWakeupNew(*ftraceEvent_, data_.data(), data_.…
120 …FtraceEventProcessor::GetInstance().SchedProcessExit(*ftraceEvent_, data_.data(), data_.size(), fo…
133 …FtraceEventProcessor::GetInstance().SchedProcessFree(*ftraceEvent_, data_.data(), data_.size(), fo…
146 …FtraceEventProcessor::GetInstance().BinderTransaction(*ftraceEvent_, data_.data(), data_.size(), f…
158 …EXPECT_TRUE(FtraceEventProcessor::GetInstance().BinderTransactionReceived(*ftraceEvent_, data_.dat…
171 …EXPECT_TRUE(FtraceEventProcessor::GetInstance().BinderTransactionAllocBuf(*ftraceEvent_, data_.dat…
[all …]
Drawtrace_parser_test.cpp155 EXPECT_TRUE(PrintkFormatsProcessor::GetInstance().HandlePrintkSyms(chunckStr_));
159 std::string sym = PrintkFormatsProcessor::GetInstance().GetSymbol(PRINTK_VALID_ADDR);
161 PrintkFormatsProcessor::GetInstance().Clear();
166 EXPECT_FALSE(PrintkFormatsProcessor::GetInstance().HandlePrintkSyms(errPrintkFormats));
/developtools/profiler/hiebpf/test/unittest/
Dhhlog_test.cpp44 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/
Dflow_controller.cpp61 ftraceSupported_ = FtraceFsOps::GetInstance().GetFtraceRoot().size() > 0; in FlowController()
89 ksymsParser_->Parse(FtraceFsOps::GetInstance().GetKernelSymbols()); in SetWriter()
103 if (FtraceFsOps::GetInstance().GetHmTraceDir() != "") { in CreateRawDataReaders()
104 … auto reader = std::make_unique<FtraceDataReader>(FtraceFsOps::GetInstance().GetHmRawTracePath()); in CreateRawDataReaders()
111 auto rawPath = FtraceFsOps::GetInstance().GetRawTracePath(i); in CreateRawDataReaders()
137 if (FtraceFsOps::GetInstance().GetHmTraceDir() != "") { in CreatePagedMemoryPool()
149 if (FtraceFsOps::GetInstance().GetHmTraceDir() != "") { in CreateRawDataBuffers()
270 FtraceFsOps::GetInstance().ClearTraceBuffer(); in StartCapture()
273 if (!FtraceFsOps::GetInstance().SetSavedCmdLinesSize(savedCmdlinesSize)) { in StartCapture()
278 FtraceFsOps::GetInstance().SetRecordCmdOption(true); in StartCapture()
[all …]
Dftrace_parser.cpp69 std::string printkFormats = FtraceFsOps::GetInstance().GetPrintkFormats(); in Init()
71 …CHECK_TRUE(PrintkFormatsParser::GetInstance().Parse(printkFormats), false, "parse printk_formats f… in Init()
73 std::string formatDesc = FtraceFsOps::GetInstance().GetPageHeaderFormat(); in Init()
85 if (!SubEventParser<FtraceEvent>::GetInstance().IsSupport(name)) { in SetupEvent()
93 std::string desc = FtraceFsOps::GetInstance().GetEventDataFormat(type, name); in SetupEvent()
97 CHECK_TRUE(SubEventParser<FtraceEvent>::GetInstance().SetupEvent(format), in SetupEvent()
99 CHECK_TRUE(SubEventParser<ProtoEncoder::FtraceEvent>::GetInstance().SetupEvent(format), in SetupEvent()
107 desc = FtraceFsOps::GetInstance().HmGetEventDataFormat(type, name); in SetupEvent()
120 CHECK_TRUE(SubEventParser<FtraceEvent>::GetInstance().SetupEvent(hmformat), in SetupEvent()
122 CHECK_TRUE(SubEventParser<ProtoEncoder::FtraceEvent>::GetInstance().SetupEvent(hmformat), in SetupEvent()
/developtools/profiler/device/plugins/ftrace_plugin/test/app/
Dbusy_workers.cpp74 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/ftrace_plugin/include/
Dsub_event_parser.h47 static SubEventParser<T>& GetInstance() in GetInstance() function
138 SubEventParser<FtraceEvent>::GetInstance().RegisterParseFunction(name, std::move(func)); in SubEventParserRegisterar()
143 SubEventParser<FtraceEvent>::GetInstance().UnregisterParseFunction(name_); in ~SubEventParserRegisterar()
156 …SubEventParser<Developtools::Profiler::ProtoEncoder::FtraceEvent>::GetInstance().RegisterParseFunc… in SubEventParserOptimizeRegisterar()
162 …SubEventParser<Developtools::Profiler::ProtoEncoder::FtraceEvent>::GetInstance().UnregisterParseFu… in ~SubEventParserOptimizeRegisterar()
Dftrace_parser.h132 auto* parseEventCtx = SubEventParser<E>::GetInstance().GetParseEventCtx(eventId); in ParseDataRecord()
158 ParseSavedTgid(FtraceFsOps::GetInstance().GetSavedTgids()); in ParseFtraceEvent()
170 comm = FtraceFsOps::GetInstance().GetThreadComm(tgid, pid); in ParseFtraceEvent()
172 comm = FtraceFsOps::GetInstance().GetProcessComm(pid); in ParseFtraceEvent()
184 SubEventParser<T>::GetInstance().ParseEvent(ftraceEvent, data, dataSize, parseEventCtx); in ParseFtraceEvent()
/developtools/profiler/device/plugins/native_daemon/src/
Ddebug_logger.cpp38 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()
153 DebugLevel lastLevel = DebugLogger::GetInstance()->debugLevel_; in SetLogLevel()
261 DebugLogger *DebugLogger::GetInstance() in GetInstance() function in OHOS::Developtools::NativeDaemon::DebugLogger
/developtools/profiler/device/plugins/native_daemon/include/
Ddebug_logger.h80 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/
Dhhlog.h50 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/
Dftrace_ftrace_event_formatter.cpp33 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anond619508a0302()
86 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anond619508a0902()
111 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anond619508a0b02()
138 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anond619508a0d02()
163 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anond619508a0f02()
245 auto& kernelSymbols = EventFormatter::GetInstance().kernelSymbols_; in __anond619508a1702()

12345