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 "acl_rt_impl.h"
12 :
13 : #include "runtime/rts/rts_dfx.h"
14 :
15 : #include "common/log_inner.h"
16 : #include "common/error_codes_inner.h"
17 : #include "common/prof_reporter.h"
18 : #include "common/resource_statistics.h"
19 :
20 : #ifdef __cplusplus
21 : extern "C" {
22 : #endif
23 :
24 4 : aclError aclrtProfTraceImpl(void* userdata, int32_t length, aclrtStream stream)
25 : {
26 4 : ACL_PROFILING_REG(acl::AclProfType::AclrtProfTrace);
27 4 : ACL_LOG_INFO("start to execute AclrtProfTrace, length is [%d]", length);
28 4 : ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(userdata);
29 3 : ACL_REQUIRES_RTS_OK(rtsProfTrace(userdata, length, stream));
30 2 : return ACL_SUCCESS;
31 4 : }
32 : #ifdef __cplusplus
33 : }
34 : #endif
|