LCOV - code coverage report
Current view: top level - legacy/ascend950/unified_platform/ccu/dfx - ccu_dfx.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 33.3 % 6 2
Test Date: 2026-08-18 17:47:01 Functions: 50.0 % 4 2

            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              : 
      11              : #include "ccu_dfx.h"
      12              : 
      13              : #include "hccl_common_v2.h"
      14              : #include "exception_util.h"
      15              : #include "ccu_error_handler.h"
      16              : 
      17              : namespace Hccl {
      18              : using namespace std;
      19              : 
      20            2 : HcclResult GetCcuErrorMsg(
      21              :     s32 deviceId, uint16_t status, const ParaCcu& ccuTaskParam, const std::string& groupRankContent,
      22              :     std::vector<CcuErrorInfo>& errorInfo)
      23              : {
      24           74 :     TRY_CATCH_RETURN(
      25              :         HCCL_RUN_INFO(
      26              :             "[CcuDfx]GetCcuErrorMsg: deviceId[%d], dieId[%u], missionId[%u], execMissionId[%u], executeId[%llu].",
      27              :             deviceId, static_cast<u32>(ccuTaskParam.dieId), static_cast<u32>(ccuTaskParam.missionId),
      28              :             static_cast<u32>(ccuTaskParam.execMissionId), ccuTaskParam.executeId);
      29              : 
      30              :         // 入参校验
      31              :         CHK_PRT_RET(
      32              :             (deviceId < 0 || static_cast<u32>(deviceId) >= MAX_MODULE_DEVICE_NUM),
      33              :             HCCL_ERROR(
      34              :                 "[CcuDfx][GetCcuErrorMsg]deviceId[%d] error, MAX_MODULE_DEVICE_NUM[%u].", deviceId,
      35              :                 MAX_MODULE_DEVICE_NUM),
      36              :             HcclResult::HCCL_E_PARA);
      37              : 
      38              :         CcuErrorHandler::GetCcuErrorMsg(deviceId, status, ccuTaskParam, groupRankContent, errorInfo););
      39            0 :     return HcclResult::HCCL_SUCCESS;
      40              : }
      41              : 
      42            0 : HcclResult GetCcuJettys(s32 deviceLogicId, const ParaCcu& ccuTaskParam, std::vector<CcuJetty*>& ccuJettys)
      43              : {
      44            0 :     TRY_CATCH_RETURN(CcuErrorHandler::GetCcuJettys(deviceLogicId, ccuTaskParam, ccuJettys););
      45            0 :     return HcclResult::HCCL_SUCCESS;
      46              : }
      47              : 
      48              : } // namespace Hccl
        

Generated by: LCOV version 2.0-1