LCOV - code coverage report
Current view: top level - aicpu_cust_schedule/stub - adc_prof.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 38 38
Test Date: 2026-07-28 10:54:05 Functions: 85.7 % 21 18

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2025 Huawei Technologies Co., Ltd.
       3              :  * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       4              :  * CANN Open Software License Agreement Version 2.0 (the "License").
       5              :  * Please refer to the License for details. You may not use this file except in compliance with the License.
       6              :  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       7              :  * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       8              :  * See LICENSE in the root of the software repository for the full text of the License.
       9              :  */
      10              : #include "profiling_adp.h"
      11              : #include "aicpusd_status.h"
      12              : 
      13              : namespace aicpu {
      14              : #ifdef __cplusplus
      15              : extern "C" {
      16              : #endif
      17            1 : bool IsProfOpen()
      18              : {
      19            1 :     return false;
      20              : }
      21              : 
      22            1 : bool IsModelProfOpen() //
      23              : {
      24            1 :     return false;
      25              : }
      26              : 
      27            1 : void UpdateMode(const bool mode)
      28              : {
      29              :     UNUSED(mode);
      30            1 : }
      31              : 
      32            1 : void UpdateModelMode(const bool mode) //
      33              : {
      34              :     UNUSED(mode);
      35            1 :     return;
      36              : }
      37              : 
      38            1 : uint64_t GetSystemTick()
      39              : {
      40            1 :     uint64_t cnt = 0UL;
      41              : #ifndef RUN_TEST
      42              :     asm volatile("mrs %0, CNTVCT_EL0" : "=r"(cnt) :);
      43              : #endif
      44            1 :     return cnt;
      45              : }
      46              : 
      47            1 : uint64_t GetSystemTickFreq()
      48              : {
      49            1 :     uint64_t freq = 1UL;
      50              : #ifndef RUN_TEST
      51              :     asm volatile("mrs %0, CNTFRQ_EL0" : "=r"(freq) :);
      52              : #endif
      53            1 :     return freq;
      54              : }
      55              : 
      56            1 : void SendToProfiling(const std::string &sendData, const std::string &mark)
      57              : {
      58              :     UNUSED(sendData);
      59              :     UNUSED(mark);
      60            1 : }
      61              : 
      62            1 : int32_t SetProfHandle(const std::shared_ptr<ProfMessage> profMsg)
      63              : {
      64              :     UNUSED(profMsg);
      65            1 :     return 0;
      66              : }
      67              : 
      68            1 : uint64_t NowMicros() //
      69              : {
      70            1 :     return 1UL;
      71              : }
      72              : 
      73            1 : void ReleaseProfiling()
      74              : {
      75            1 : }
      76              : 
      77            1 : void InitProfiling(const uint32_t deviceId, const pid_t hostPid, const uint32_t channelId)
      78              : {
      79              :     UNUSED(deviceId);
      80              :     UNUSED(hostPid);
      81              :     UNUSED(channelId);
      82            1 : }
      83              : 
      84            1 : void InitProfilingDataInfo(const uint32_t deviceId, const pid_t hostPid, const uint32_t channelId)
      85              : {
      86              :     UNUSED(deviceId);
      87              :     UNUSED(hostPid);
      88              :     UNUSED(channelId);
      89            1 : }
      90              : 
      91            1 : void SetProfilingFlagForKFC(const uint32_t flag)
      92              : {
      93              :     UNUSED(flag);
      94            1 : }
      95            1 : void LoadProfilingLib()
      96              : {
      97            1 : }
      98              : 
      99            1 : int32_t SetMsprofReporterCallback(MsprofReporterCallback reportCallback)
     100              : {
     101              :     UNUSED(reportCallback);
     102            1 :     return static_cast<int32_t>(ProfStatusCode::PROFILINE_SUCCESS);
     103              : }
     104              : 
     105            1 : bool IsSupportedProfData()
     106              : {
     107            1 :     return false;
     108              : }
     109              : 
     110              : #ifdef __cplusplus
     111              : }
     112              : #endif
     113              : 
     114            1 : ProfMessage::ProfMessage(const char_t *tag) : std::basic_ostringstream<char_t>(), tag_(tag), sendData_()
     115              : {
     116            1 : }
     117              : 
     118            1 : ProfMessage::~ProfMessage()
     119              : {
     120            1 : }
     121              : }
        

Generated by: LCOV version 2.0-1