• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #include "perf_collector_empty_impl.h"
16 
17 namespace OHOS {
18 namespace HiviewDFX {
19 namespace UCollectUtil {
SetSelectPids(const std::vector<pid_t> & selectPids)20 void PerfCollectorEmptyImpl::SetSelectPids(const std::vector<pid_t> &selectPids)
21 {}
22 
SetTargetSystemWide(bool enable)23 void PerfCollectorEmptyImpl::SetTargetSystemWide(bool enable)
24 {}
25 
SetTimeStopSec(int timeStopSec)26 void PerfCollectorEmptyImpl::SetTimeStopSec(int timeStopSec)
27 {}
28 
SetFrequency(int frequency)29 void PerfCollectorEmptyImpl::SetFrequency(int frequency)
30 {}
31 
SetOffCPU(bool offCPU)32 void PerfCollectorEmptyImpl::SetOffCPU(bool offCPU)
33 {}
34 
SetOutputFilename(const std::string & outputFilename)35 void PerfCollectorEmptyImpl::SetOutputFilename(const std::string &outputFilename)
36 {}
37 
SetCallGraph(const std::string & sampleTypes)38 void PerfCollectorEmptyImpl::SetCallGraph(const std::string &sampleTypes)
39 {}
40 
SetSelectEvents(const std::vector<std::string> & selectEvents)41 void PerfCollectorEmptyImpl::SetSelectEvents(const std::vector<std::string> &selectEvents)
42 {}
43 
SetCpuPercent(int cpuPercent)44 void PerfCollectorEmptyImpl::SetCpuPercent(int cpuPercent)
45 {}
46 
SetReport(bool enable)47 void PerfCollectorEmptyImpl::SetReport(bool enable)
48 {}
49 
Create(PerfCaller)50 std::shared_ptr<PerfCollector> PerfCollector::Create(PerfCaller /* perfCaller */)
51 {
52     return std::make_shared<PerfCollectorEmptyImpl>();
53 }
54 
StartPerf(const std::string & logDir)55 CollectResult<bool> PerfCollectorEmptyImpl::StartPerf(const std::string &logDir)
56 {
57     return CollectResult<bool>(UCollect::UcError::FEATURE_CLOSED);
58 }
59 
Prepare(const std::string & logDir)60 CollectResult<bool> PerfCollectorEmptyImpl::Prepare(const std::string &logDir)
61 {
62     return CollectResult<bool>(UCollect::UcError::FEATURE_CLOSED);
63 }
64 
StartRun()65 CollectResult<bool> PerfCollectorEmptyImpl::StartRun()
66 {
67     return CollectResult<bool>(UCollect::UcError::FEATURE_CLOSED);
68 }
69 
Pause()70 CollectResult<bool> PerfCollectorEmptyImpl::Pause()
71 {
72     return CollectResult<bool>(UCollect::UcError::FEATURE_CLOSED);
73 }
74 
Resume()75 CollectResult<bool> PerfCollectorEmptyImpl::Resume()
76 {
77     return CollectResult<bool>(UCollect::UcError::FEATURE_CLOSED);
78 }
79 
Stop()80 CollectResult<bool> PerfCollectorEmptyImpl::Stop()
81 {
82     return CollectResult<bool>(UCollect::UcError::FEATURE_CLOSED);
83 }
84 } // UCollectUtil
85 } // HivewDFX
86 } // OHOS
87