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 2.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. #include "prof_callback.h"
  19. namespace Msprof {
  20. namespace Engine {
  21. class EngineIntf;
  22. /**
  23. * @name : RegisterEngine
  24. * @berif : API of libmsprof, register an engine with a name
  25. * @param [in]: module: the name of plugin
  26. engine: the plugin
  27. * @return: PROFILING_SUCCESS 0 (success)
  28. * PROFILING_FAILED -1 (failed)
  29. */
  30. int RegisterEngine(const std::string& module, const EngineIntf* engine) { return 0; }
  31. } // namespace Engine
  32. } // namespace Msprof
  33. /**
  34. * @name : ProfMgrStartUP
  35. * @berif : start Profiling task
  36. * @param : ProfMgrCfg cfg : config of start_up profiling
  37. * @return: NO_NULL (success)
  38. * NULL (failed)
  39. */
  40. void* ProfMgrStartUp(const ProfMgrCfg* cfg) { return const_cast<void*>(reinterpret_cast<const void*>(cfg)); }
  41. /**
  42. * @name : ProfMgrStop
  43. * @berif : stop Profiling task
  44. * @param : void * handle return by ProfMgrStartUP
  45. * @return: PROFILING_SUCCESS 0 (success)
  46. * PROFILING_FAILED -1 (failed)
  47. */
  48. int ProfMgrStop(void* handle) { return 0; }
  49. namespace Analysis::Dvvp::ProfilerSpecial {
  50. uint32_t MsprofilerInit() { return 0; }
  51. }
  52. /*
  53. * @name MsprofInit
  54. * @brief Profiling module init
  55. * @param [in] dataType: profiling type: ACL Env/ACL Json/GE Option
  56. * @param [in] data: profiling switch data
  57. * @param [in] dataLen: Length of data
  58. * @return 0:SUCCESS, >0:FAILED
  59. */
  60. int32_t MsprofInit(uint32_t dataType, void *data, uint32_t dataLen) { return 0; }
  61. /*
  62. * @name AscendCL
  63. * @brief Finishing Profiling
  64. * @param NULL
  65. * @return 0:SUCCESS, >0:FAILED
  66. */
  67. int32_t MsprofFinalize() { return 0; }