已合并
[Profiling]修复runtime仓编译告警 #1405
zhengkai创建于 4月3日
[Profiling]修复runtime仓编译告警 #1405
已合并
共 6 个文件变更+9-8
| @@ -23,10 +23,10 @@ | |||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | namespace ge { | 25 | namespace ge { |
| 26 | - using Status = uint32_t; | 26 | +using Status = uint32_t; |
| 27 | 27 | ||
| 28 | static const uint32_t GE_PROF_SUCCESS = 0U; | 28 | static const uint32_t GE_PROF_SUCCESS = 0U; |
| 29 | -static const uint32_t GE_PROF_FAILED = 4700059007U; | 29 | +static const uint32_t GE_PROF_FAILED = 405091711U; |
| 30 | 30 | ||
| 31 | enum ProfDataTypeConfig { | 31 | enum ProfDataTypeConfig { |
| 32 | kProfTaskTime = 0x0002, | 32 | kProfTaskTime = 0x0002, |
| @@ -33,7 +33,7 @@ struct CollectionTimeInfo : BaseInfo { | |||
| 33 | SET_VALUE(object, clockMonotonicRaw); | 33 | SET_VALUE(object, clockMonotonicRaw); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | - void FromObject(NanoJson::Json &object) override {} | 36 | + void FromObject(NanoJson::Json &object) override { (void)object; } |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | } // namespace message | 39 | } // namespace message |
| @@ -2457,7 +2457,7 @@ int32_t ProfAclMgr::ProfStopCommon(const MsprofConfig *config) | |||
| 2457 | MSPROF_EVENT("Received ProfAclStop request from acl"); | 2457 | MSPROF_EVENT("Received ProfAclStop request from acl"); |
| 2458 | UploaderMgr::instance()->SetAllUploaderTransportStopped(); | 2458 | UploaderMgr::instance()->SetAllUploaderTransportStopped(); |
| 2459 | std::lock_guard<std::mutex> lk(mtx_); | 2459 | std::lock_guard<std::mutex> lk(mtx_); |
| 2460 | - for (auto i = 0; i < devIds.size(); i++) { | 2460 | + for (size_t i = 0; i < devIds.size(); i++) { |
| 2461 | uint32_t devId = devIds[i]; | 2461 | uint32_t devId = devIds[i]; |
| 2462 | auto iter = devTasks_.find(devId); | 2462 | auto iter = devTasks_.find(devId); |
| 2463 | if (iter != devTasks_.end()) { | 2463 | if (iter != devTasks_.end()) { |
| @@ -69,7 +69,7 @@ target_compile_options(msprofiler_fwk_share PRIVATE | |||
| 69 | -fno-strict-aliasing | 69 | -fno-strict-aliasing |
| 70 | -fno-common | 70 | -fno-common |
| 71 | -fvisibility=hidden | 71 | -fvisibility=hidden |
| 72 | - -fvisibility-inlines-hidden | 72 | + $<$<COMPILE_LANGUAGE:CXX>:-fvisibility-inlines-hidden> |
| 73 | -Wall | 73 | -Wall |
| 74 | -Wextra | 74 | -Wextra |
| 75 | -Wfloat-equal | 75 | -Wfloat-equal |
| @@ -177,7 +177,7 @@ target_compile_options(msprofiler_fwk_lite_share PRIVATE | |||
| 177 | -fno-strict-aliasing | 177 | -fno-strict-aliasing |
| 178 | -fno-common | 178 | -fno-common |
| 179 | -fvisibility=hidden | 179 | -fvisibility=hidden |
| 180 | - -fvisibility-inlines-hidden | 180 | + $<$<COMPILE_LANGUAGE:CXX>:-fvisibility-inlines-hidden> |
| 181 | -Wall | 181 | -Wall |
| 182 | -Wextra | 182 | -Wextra |
| 183 | -Wfloat-equal | 183 | -Wfloat-equal |
| @@ -125,7 +125,7 @@ set_target_properties(profapi_share | |||
| 125 | target_compile_options(profapi_share PRIVATE | 125 | target_compile_options(profapi_share PRIVATE |
| 126 | -fstack-protector-all | 126 | -fstack-protector-all |
| 127 | -fvisibility=hidden | 127 | -fvisibility=hidden |
| 128 | - -fvisibility-inlines-hidden | 128 | + $<$<COMPILE_LANGUAGE:CXX>:-fvisibility-inlines-hidden> |
| 129 | -fno-common | 129 | -fno-common |
| 130 | -Wall | 130 | -Wall |
| 131 | $<$<COMPILE_LANGUAGE:CXX>:-std=c++11> | 131 | $<$<COMPILE_LANGUAGE:CXX>:-std=c++11> |
| @@ -861,8 +861,9 @@ NetDevStatsHandler::NetDevStatsHandler(size_t bufSize, uint64_t sampleIntervalNs | |||
| 861 | : TimerHandler(PROF_NETDEV_STATS), | 861 | : TimerHandler(PROF_NETDEV_STATS), |
| 862 | isInited_(false), | 862 | isInited_(false), |
| 863 | prevTimeStamp_(0), | 863 | prevTimeStamp_(0), |
| 864 | - bufSize_(bufSize), | ||
| 865 | sampleIntervalNs_(sampleIntervalNs), | 864 | sampleIntervalNs_(sampleIntervalNs), |
| 865 | + isDcmiV2Supported_(false), | ||
| 866 | + bufSize_(bufSize), | ||
| 866 | retFileName_("data/netdev_stats.data"), | 867 | retFileName_("data/netdev_stats.data"), |
| 867 | jobId_(jobId), | 868 | jobId_(jobId), |
| 868 | jobCtx_(jobCtx) {} | 869 | jobCtx_(jobCtx) {} |