You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

profiling_stub.cc 1.7 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * Copyright 2020 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include <string>
  17. #include "prof_mgr_core.h"
  18. namespace Msprof {
  19. namespace Engine {
  20. class EngineIntf;
  21. /**
  22. * @name : RegisterEngine
  23. * @berif : API of libmsprof, register an engine with a name
  24. * @param [in]: module: the name of plugin
  25. engine: the plugin
  26. * @return: PROFILING_SUCCESS 0 (success)
  27. * PROFILING_FAILED -1 (failed)
  28. */
  29. int RegisterEngine(const std::string& module, const EngineIntf* engine) { return 0; }
  30. } // namespace Engine
  31. } // namespace Msprof
  32. /**
  33. * @name : ProfMgrStartUP
  34. * @berif : start Profiling task
  35. * @param : ProfMgrCfg cfg : config of start_up profiling
  36. * @return: NO_NULL (success)
  37. * NULL (failed)
  38. */
  39. void* ProfMgrStartUp(const ProfMgrCfg* cfg) { return const_cast<void*>(reinterpret_cast<const void*>(cfg)); }
  40. /**
  41. * @name : ProfMgrStop
  42. * @berif : stop Profiling task
  43. * @param : void * handle return by ProfMgrStartUP
  44. * @return: PROFILING_SUCCESS 0 (success)
  45. * PROFILING_FAILED -1 (failed)
  46. */
  47. int ProfMgrStop(void* handle) { return 0; }
  48. namespace Analysis::Dvvp::ProfilerSpecial {
  49. uint32_t MsprofilerInit() { return 0; }
  50. }