diff --git a/LICENSE b/LICENSE index 29f81d8..75b5248 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/OAT.xml b/OAT.xml old mode 100755 new mode 100644 diff --git a/README_zh.md b/README_zh.md old mode 100755 new mode 100644 diff --git a/clang_format_all.bat b/clang_format_all.bat index 90a871d..bba497c 100755 --- a/clang_format_all.bat +++ b/clang_format_all.bat @@ -17,4 +17,4 @@ for /r %%i in (*.h *.cpp) do ( clang-format.exe -style="file" -fallback-style="LLVM" -i --verbose %%i ) -pause \ No newline at end of file +pause diff --git a/demo/cpp/hiperf_example_cmd.cpp b/demo/cpp/hiperf_example_cmd.cpp old mode 100755 new mode 100644 index 03e9e97..bc77ea0 --- a/demo/cpp/hiperf_example_cmd.cpp +++ b/demo/cpp/hiperf_example_cmd.cpp @@ -490,4 +490,4 @@ USED_FUNCTION int main(int argc, char *argv[]) RunSampleThread(option); return 0; -} \ No newline at end of file +} diff --git a/demo/cpp/hiperf_malloc_demo.cpp b/demo/cpp/hiperf_malloc_demo.cpp old mode 100755 new mode 100644 diff --git a/demo/js/entry/package.json b/demo/js/entry/package.json old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/app.js b/demo/js/entry/src/main/js/MainAbility/app.js old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/i18n/en-US.json b/demo/js/entry/src/main/js/MainAbility/i18n/en-US.json old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/i18n/zh-CN.json b/demo/js/entry/src/main/js/MainAbility/i18n/zh-CN.json old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/pages/index/index.css b/demo/js/entry/src/main/js/MainAbility/pages/index/index.css old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/pages/index/index.hml b/demo/js/entry/src/main/js/MainAbility/pages/index/index.hml old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/pages/index/index.js b/demo/js/entry/src/main/js/MainAbility/pages/index/index.js old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/pages/second/second.css b/demo/js/entry/src/main/js/MainAbility/pages/second/second.css old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/pages/second/second.hml b/demo/js/entry/src/main/js/MainAbility/pages/second/second.hml old mode 100755 new mode 100644 diff --git a/demo/js/entry/src/main/js/MainAbility/pages/second/second.js b/demo/js/entry/src/main/js/MainAbility/pages/second/second.js old mode 100755 new mode 100644 diff --git a/demo/js/package.json b/demo/js/package.json old mode 100755 new mode 100644 diff --git a/include/callstack.h b/include/callstack.h old mode 100755 new mode 100644 index c87d818..edc036c --- a/include/callstack.h +++ b/include/callstack.h @@ -136,4 +136,4 @@ struct UnwindInfo { } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_CALLSTACK_H diff --git a/include/command.h b/include/command.h old mode 100755 new mode 100644 index 985aca9..a9a66b5 --- a/include/command.h +++ b/include/command.h @@ -29,4 +29,4 @@ public: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_COMMAND_H diff --git a/include/debug_logger.h b/include/debug_logger.h old mode 100755 new mode 100644 index 28553fa..b10c355 --- a/include/debug_logger.h +++ b/include/debug_logger.h @@ -329,10 +329,10 @@ private: class ScopeDebugLevel { public: - ScopeDebugLevel(DebugLevel level, bool mix = false) {}; + ScopeDebugLevel(DebugLevel level, bool mix = false) {} }; #endif } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif // _HIPERF_DEBUG_H_ \ No newline at end of file +#endif // _HIPERF_DEBUG_H_ diff --git a/include/dwarf_encoding.h b/include/dwarf_encoding.h old mode 100755 new mode 100644 index 0e96228..0417890 --- a/include/dwarf_encoding.h +++ b/include/dwarf_encoding.h @@ -190,4 +190,4 @@ struct eh_frame_hdr { } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif +#endif // DWARF_ENCODING_H diff --git a/include/elf_parser.h b/include/elf_parser.h old mode 100755 new mode 100644 index a63b124..109c6dd --- a/include/elf_parser.h +++ b/include/elf_parser.h @@ -254,7 +254,7 @@ public: } } } - HLOGE("string not found sh_link %u st_name %d, mmap_ is %p", sh_link, st_name, mmap_); + HLOGE("string not found sh_link %u st_name %d", sh_link, st_name); return nullptr; } @@ -307,4 +307,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // ELF_PARSER_H_ diff --git a/include/hashlist.h b/include/hashlist.h old mode 100755 new mode 100644 index a4019d4..da8b6cf --- a/include/hashlist.h +++ b/include/hashlist.h @@ -222,4 +222,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif +#endif // HIPERF_HASHLIST_H diff --git a/include/hashlist.hpp b/include/hashlist.hpp old mode 100755 new mode 100644 index 9934a61..5893c6d --- a/include/hashlist.hpp +++ b/include/hashlist.hpp @@ -112,12 +112,12 @@ HashList::Iterator::Iterator(const LinkNode *pnode, const Ha template HashList::Iterator::Iterator(const Iterator& itr) - : pnode_ {itr.pnode_}, phashList_ {itr.phashList_} + : pnode_ {itr.pnode_}, phashList_ {itr.phashList_} {} template HashList::Iterator::Iterator(Iterator&& itr) - : pnode_ {itr.pnode_}, phashList_ {itr.phashList_} + : pnode_ {itr.pnode_}, phashList_ {itr.phashList_} { itr.pnode_ = nullptr; itr.phashList_ = nullptr; @@ -218,7 +218,7 @@ auto HashList::Iterator::operator--(int) noexcept pnode_ = nullptr; phashList_ = nullptr; return res; - } + } pnode_ = LinkNode::GetLinkNode(plink); return res; } @@ -312,7 +312,7 @@ HashList::ReverseIterator::ReverseIterator(const LinkNode *p template HashList::ReverseIterator::ReverseIterator(const ReverseIterator &itr) - : pnode_ {itr.pnode_}, phashList_ {itr.phashList_} + : pnode_ {itr.pnode_}, phashList_ {itr.phashList_} {} template @@ -841,7 +841,7 @@ bool HashList::MoveNode(const Iterator& pos, LinkNode *&pnod Link* nextLink = pnode->link_.next_; if (prevLink and nextLink) { prevLink->next_ = nextLink; - nextLink->prev_ = prevLink; + nextLink->prev_ = prevLink; } Link *currLink = &curNode->link_; prevLink = currLink->prev_; diff --git a/include/hiperf_libreport.h b/include/hiperf_libreport.h index 0980662..7c1cca8 100644 --- a/include/hiperf_libreport.h +++ b/include/hiperf_libreport.h @@ -94,5 +94,4 @@ DLL_EXPORT const char *CDECL ReportGetBuildId(const char *elfPath); // return "unknown" when failed happend DLL_EXPORT const char *CDECL ReportGetElfArch(const char *elfPath); } - -#endif \ No newline at end of file +#endif // HIPERF_LIBREPORT_H diff --git a/include/mem_map_item.h b/include/mem_map_item.h old mode 100755 new mode 100644 index a942ef1..c0501a1 --- a/include/mem_map_item.h +++ b/include/mem_map_item.h @@ -98,4 +98,4 @@ public: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif +#endif // MEMMAPITEM_H diff --git a/include/noncopyable.h b/include/noncopyable.h index b1a0a5e..846fbd8 100644 --- a/include/noncopyable.h +++ b/include/noncopyable.h @@ -23,4 +23,4 @@ private: Noncopyable(const Noncopyable &); const Noncopyable &operator=(const Noncopyable &); }; -#endif \ No newline at end of file +#endif // NONCOPYABLE_H_ diff --git a/include/nonlinux/MingW64Fix.h b/include/nonlinux/MingW64Fix.h index 6d5e02f..bb2db77 100644 --- a/include/nonlinux/MingW64Fix.h +++ b/include/nonlinux/MingW64Fix.h @@ -22,4 +22,4 @@ using _pid_t = int; using pid_t = _pid_t; #endif -#endif \ No newline at end of file +#endif diff --git a/include/nonlinux/asm/byteorder.h b/include/nonlinux/asm/byteorder.h index 067b346..df990b4 100644 --- a/include/nonlinux/asm/byteorder.h +++ b/include/nonlinux/asm/byteorder.h @@ -14,4 +14,4 @@ */ #ifndef BYTE_ORDER_H #define BYTE_ORDER_H -#endif \ No newline at end of file +#endif diff --git a/include/nonlinux/linux/ioctl.h b/include/nonlinux/linux/ioctl.h index 6fbbc32..d9e37cc 100644 --- a/include/nonlinux/linux/ioctl.h +++ b/include/nonlinux/linux/ioctl.h @@ -14,4 +14,4 @@ */ #ifndef NONLINUX_LINUX_IOCTL_H #define NONLINUX_LINUX_IOCTL_H -#endif \ No newline at end of file +#endif diff --git a/include/nonlinux/linux/types.h b/include/nonlinux/linux/types.h index d764487..5bfcecd 100644 --- a/include/nonlinux/linux/types.h +++ b/include/nonlinux/linux/types.h @@ -30,4 +30,4 @@ using __s32 = int; using __u32 = unsigned int; using __s64 = long long; using __u64 = unsigned long long; -#endif \ No newline at end of file +#endif diff --git a/include/option.h b/include/option.h old mode 100755 new mode 100644 index 384984e..ad67aec --- a/include/option.h +++ b/include/option.h @@ -137,4 +137,4 @@ const std::map> &GetMainOptions(); } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_OPTION_H_ diff --git a/include/option_debug.h b/include/option_debug.h old mode 100755 new mode 100644 index 945a7c2..cf93c71 --- a/include/option_debug.h +++ b/include/option_debug.h @@ -27,4 +27,4 @@ void RegisterMainCommandDebug(void); } } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_OPTION_DEBUG_H diff --git a/include/perf_event_record.h b/include/perf_event_record.h old mode 100755 new mode 100644 index 85bf61d..19de63b --- a/include/perf_event_record.h +++ b/include/perf_event_record.h @@ -110,7 +110,7 @@ public: PerfEventRecord(uint8_t *p, const std::string &name); - virtual ~PerfEventRecord() {}; + virtual ~PerfEventRecord() {} virtual size_t GetSize() const { @@ -170,21 +170,21 @@ class PerfRecordMmap : public PerfEventRecord { public: PerfRecordMmapData data_; - PerfRecordMmap(uint8_t *p); + explicit PerfRecordMmap(uint8_t *p); PerfRecordMmap(bool inKernel, u32 pid, u32 tid, u64 addr, u64 len, u64 pgoff, const std::string &filename); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; - virtual void DumpLog(const std::string &prefix) const override; + void DumpData(int indent) const override; + void DumpLog(const std::string &prefix) const override; }; class PerfRecordMmap2 : public PerfEventRecord { public: PerfRecordMmap2Data data_; - PerfRecordMmap2(uint8_t *p); + explicit PerfRecordMmap2(uint8_t *p); PerfRecordMmap2(bool inKernel, u32 pid, u32 tid, u64 addr, u64 len, u64 pgoff, u32 maj, u32 min, u64 ino, u32 prot, u32 flags, const std::string &filename); @@ -192,18 +192,18 @@ public: PerfRecordMmap2(bool inKernel, u32 pid, u32 tid, const MemMapItem &item); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; - virtual void DumpLog(const std::string &prefix) const override; + void DumpData(int indent) const override; + void DumpLog(const std::string &prefix) const override; }; class PerfRecordLost : public PerfEventRecord { public: PerfRecordLostData data_; - PerfRecordLost(uint8_t *p); + explicit PerfRecordLost(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; // only for UT PerfRecordLost(bool inKernel, u64 id, u64 lost) @@ -219,12 +219,12 @@ class PerfRecordComm : public PerfEventRecord { public: PerfRecordCommData data_; - PerfRecordComm(uint8_t *p); + explicit PerfRecordComm(uint8_t *p); PerfRecordComm(bool inKernel, u32 pid, u32 tid, const std::string &comm); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; void DumpLog(const std::string &prefix) const override; }; @@ -242,8 +242,8 @@ public: // referenced input(p) in PerfRecordSample, require caller keep input(p) together PerfRecordSample(uint8_t *p, const perf_event_attr &attr); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent = 0) const override; - virtual void DumpLog(const std::string &prefix) const override; + void DumpData(int indent = 0) const override; + void DumpLog(const std::string &prefix) const override; // originalSize is use for expand callstack void ReplaceWithCallStack(size_t originalSize = 0); @@ -266,10 +266,10 @@ class PerfRecordExit : public PerfEventRecord { public: PerfRecordExitData data_; - PerfRecordExit(uint8_t *p); + explicit PerfRecordExit(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; class PerfRecordThrottle : public PerfEventRecord { @@ -279,27 +279,27 @@ public: PerfRecordThrottle(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; class PerfRecordUnthrottle : public PerfEventRecord { public: PerfRecordThrottleData data_; - PerfRecordUnthrottle(uint8_t *p); + explicit PerfRecordUnthrottle(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; class PerfRecordFork : public PerfEventRecord { public: PerfRecordForkData data_; - PerfRecordFork(uint8_t *p); + explicit PerfRecordFork(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; /* @@ -309,9 +309,9 @@ class PerfRecordRead : public PerfEventRecord { public: PerfRecordReadData data_; - PerfRecordRead(uint8_t *p); + explicit PerfRecordRead(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; /* @@ -337,9 +337,9 @@ class PerfRecordAux : public PerfEventRecord { public: PerfRecordAuxData data_; - PerfRecordAux(uint8_t *p); + explicit PerfRecordAux(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; /* @@ -357,9 +357,9 @@ class PerfRecordItraceStart : public PerfEventRecord { public: PerfRecordItraceStartData data_; - PerfRecordItraceStart(uint8_t *p); + explicit PerfRecordItraceStart(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; /* @@ -371,9 +371,9 @@ class PerfRecordLostSamples : public PerfEventRecord { public: PerfRecordLostSamplesData data_; - PerfRecordLostSamples(uint8_t *p); + explicit PerfRecordLostSamples(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; /* @@ -385,9 +385,9 @@ public: class PerfRecordSwitch : public PerfEventRecord { public: PerfRecordSwitchData data_; - PerfRecordSwitch(uint8_t *p); + explicit PerfRecordSwitch(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData([[maybe_unused]] int indent) const override {}; + void DumpData([[maybe_unused]] int indent) const override {}; }; /* @@ -411,9 +411,9 @@ public: class PerfRecordSwitchCpuWide : public PerfEventRecord { public: PerfRecordSwitchCpuWideData data_; - PerfRecordSwitchCpuWide(uint8_t *p); + explicit PerfRecordSwitchCpuWide(uint8_t *p); bool GetBinary(std::vector &buf) const override; - virtual void DumpData(int indent) const override; + void DumpData(int indent) const override; }; std::unique_ptr GetPerfEventRecord(const int type, uint8_t *data, @@ -433,4 +433,4 @@ void PopFromBinary2(bool condition, uint8_t *&p, T1 &v1, T2 &v2); } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_PERF_EVENT_RECORD_H diff --git a/include/perf_events.h b/include/perf_events.h old mode 100755 new mode 100644 index 549a712..e85c311 --- a/include/perf_events.h +++ b/include/perf_events.h @@ -517,4 +517,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_PERF_EVENTS_H diff --git a/include/perf_file_format.h b/include/perf_file_format.h old mode 100755 new mode 100644 index 480e7a0..e7016fc --- a/include/perf_file_format.h +++ b/include/perf_file_format.h @@ -127,7 +127,7 @@ public: virtual bool GetBinary(char *buf, size_t size) = 0; virtual size_t GetSize() = 0; - virtual ~PerfFileSection() {}; + virtual ~PerfFileSection() {} explicit PerfFileSection(const FEATURE featureId) : featureId_(featureId) { header.size = 0; @@ -180,7 +180,7 @@ struct SymbolStruct { uint64_t vaddr_ = 0; uint32_t len_ = 0; std::string symbolName_ = EMPTY_STRING; - SymbolStruct() {}; + SymbolStruct() {} SymbolStruct(uint64_t vaddr, uint32_t len, const std::string &symbolName) : vaddr_(vaddr), len_(len), symbolName_(symbolName) { @@ -257,4 +257,4 @@ public: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_PERF_FILE_FORMAT_H diff --git a/include/perf_file_reader.h b/include/perf_file_reader.h old mode 100755 new mode 100644 index 6d9c181..cec2a29 --- a/include/perf_file_reader.h +++ b/include/perf_file_reader.h @@ -98,4 +98,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_FILE_READER diff --git a/include/perf_file_writer.h b/include/perf_file_writer.h old mode 100755 new mode 100644 index ff9e618..1bb32b9 --- a/include/perf_file_writer.h +++ b/include/perf_file_writer.h @@ -39,7 +39,7 @@ public: attrSection_.size = 0; defaultEventAttr_.branch_sample_type = 0; defaultEventAttr_.namespaces = 0; - }; + } ~PerfFileWriter(); bool Open(const std::string &fileName, bool compressData = false); @@ -89,4 +89,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_PERF_FILE_WRITER_H diff --git a/include/perf_record_format.h b/include/perf_record_format.h old mode 100755 new mode 100644 index c0ea066..089ab90 --- a/include/perf_record_format.h +++ b/include/perf_record_format.h @@ -357,4 +357,4 @@ struct PerfRecordNamespacesData { } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_PERF_RECORD_FORMAT_H diff --git a/include/register.h b/include/register.h old mode 100755 new mode 100644 index 43abdb2..1fda7b3 --- a/include/register.h +++ b/include/register.h @@ -190,4 +190,4 @@ void UpdateRegForABI(ArchType arch, u64 registers[]); } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_REGISTER_H diff --git a/include/report.h b/include/report.h old mode 100755 new mode 100644 index b3a8d9c..9442419 --- a/include/report.h +++ b/include/report.h @@ -500,7 +500,7 @@ public: } }; std::vector configs_; - virtual ~Report() {}; + virtual ~Report() {} std::map configIdIndexMaps_; // index of configNames_ std::string GetConfigName(uint64_t id) @@ -566,4 +566,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // REPORT_H diff --git a/include/report_json_file.h b/include/report_json_file.h old mode 100755 new mode 100644 index ed2ab8d..2b82837 --- a/include/report_json_file.h +++ b/include/report_json_file.h @@ -206,7 +206,7 @@ struct ReportFuncItem { uint64_t sampleCount_ = 0; uint64_t eventCount_ = 0; uint64_t subTreeEventCount_ = 0; - ReportFuncItem(int functionId) : functionId_(functionId) {} + explicit ReportFuncItem(int functionId) : functionId_(functionId) {} void OutputJson(FILE *output) const { if (fprintf(output, "{") < 0) { @@ -266,7 +266,7 @@ struct ReportCallNodeItem { return (a.functionId_ == functionId); } - ReportCallNodeItem(int functionId) : functionId_(functionId) {} + explicit ReportCallNodeItem(int functionId) : functionId_(functionId) {} }; struct ReportLibItem { @@ -328,7 +328,7 @@ struct ReportProcessItem { return; } } - ReportProcessItem(pid_t pid) : pid_(pid) {} + explicit ReportProcessItem(pid_t pid) : pid_(pid) {} }; struct ReportConfigItem { @@ -415,4 +415,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // REPORT_JSON_FILE_H diff --git a/include/report_protobuf_file.h b/include/report_protobuf_file.h old mode 100755 new mode 100644 index e627153..4f7fd51 --- a/include/report_protobuf_file.h +++ b/include/report_protobuf_file.h @@ -97,4 +97,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_REPORT_PROTOBUF_FILE diff --git a/include/ring_buffer.h b/include/ring_buffer.h old mode 100755 new mode 100644 index f6a183e..14f2e40 --- a/include/ring_buffer.h +++ b/include/ring_buffer.h @@ -25,7 +25,7 @@ public: // little endian, perf_event_header.type is less than 0xff, so set it static constexpr uint8_t MARGIN_BYTE = 0xFF; - RingBuffer(size_t size); + explicit RingBuffer(size_t size); ~RingBuffer(); // get size of the writable space size_t GetFreeSize() const; @@ -50,4 +50,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_RING_BUFFER_H diff --git a/include/subcommand.h b/include/subcommand.h old mode 100755 new mode 100644 index 43470f6..5f5a683 --- a/include/subcommand.h +++ b/include/subcommand.h @@ -57,7 +57,7 @@ public: return false; }; - virtual void DumpOptions() const {}; + virtual void DumpOptions() const {} // args should be empty after all the args processed virtual bool ParseOption(std::vector &args) @@ -95,4 +95,4 @@ protected: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_SUBCOMMAND_H_ diff --git a/include/subcommand_dump.h b/include/subcommand_dump.h index cf3dcad..e2cf826 100644 --- a/include/subcommand_dump.h +++ b/include/subcommand_dump.h @@ -116,4 +116,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // SUBCOMMAND_DUMP_H diff --git a/include/subcommand_help.h b/include/subcommand_help.h index ace26af..18a6eb2 100644 --- a/include/subcommand_help.h +++ b/include/subcommand_help.h @@ -42,4 +42,4 @@ public: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_SUBCOMMAND_HELP_H_ diff --git a/include/subcommand_list.h b/include/subcommand_list.h index 5a65c59..7449d0e 100644 --- a/include/subcommand_list.h +++ b/include/subcommand_list.h @@ -64,4 +64,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // SUBCOMMAND_LIST_H_ diff --git a/include/subcommand_record.h b/include/subcommand_record.h index aec0914..fc24469 100644 --- a/include/subcommand_record.h +++ b/include/subcommand_record.h @@ -290,4 +290,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif +#endif // SUBCOMMAND_RECORD_H diff --git a/include/subcommand_report.h b/include/subcommand_report.h index 6bf374c..bf97bc6 100644 --- a/include/subcommand_report.h +++ b/include/subcommand_report.h @@ -188,4 +188,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // SUBCOMMAND_REPORT_H diff --git a/include/subcommand_stat.h b/include/subcommand_stat.h index ce971a6..1c24a67 100644 --- a/include/subcommand_stat.h +++ b/include/subcommand_stat.h @@ -118,4 +118,4 @@ bool RegisterSubCommandStat(void); } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif +#endif // SUBCOMMAND_STAT_H_ diff --git a/include/symbols_file.h b/include/symbols_file.h old mode 100755 new mode 100644 index ed88071..aa54b48 --- a/include/symbols_file.h +++ b/include/symbols_file.h @@ -82,19 +82,19 @@ struct Symbol { len_(len), name_(MemoryHold::Get().HoldStringView(name)), demangle_(MemoryHold::Get().HoldStringView(demangle)), - module_(MemoryHold::Get().HoldStringView(module)) {}; + module_(MemoryHold::Get().HoldStringView(module)) {} Symbol(uint64_t vaddr, uint64_t len, const std::string &name, const std::string &module) - : Symbol(vaddr, len, name, name, module) {}; + : Symbol(vaddr, len, name, name, module) {} // kernel use this Symbol(uint64_t vaddr, const std::string &name, const std::string &module) - : Symbol(vaddr, 0, name, name, module) {}; + : Symbol(vaddr, 0, name, name, module) {} // Symbolic use this Symbol(uint64_t taskVaddr = 0, const std::string &comm = "") : taskVaddr_(taskVaddr), comm_(comm) { - }; + } // copy Symbol(const Symbol &other) = default; @@ -353,4 +353,4 @@ protected: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_SYMBOLS_H diff --git a/include/tracked_command.h b/include/tracked_command.h old mode 100755 new mode 100644 index b8a350b..628128b --- a/include/tracked_command.h +++ b/include/tracked_command.h @@ -73,4 +73,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_TRACKED_COMMAND_H_ diff --git a/include/utilities.h b/include/utilities.h old mode 100755 new mode 100644 index 86f2180..bf1c1e0 --- a/include/utilities.h +++ b/include/utilities.h @@ -320,4 +320,4 @@ int munmap(void *addr, size_t); #endif #endif -#endif +#endif // HIPERF_UTILITIES_H_ diff --git a/include/virtual_runtime.h b/include/virtual_runtime.h old mode 100755 new mode 100644 index 4f813a5..fda5cd7 --- a/include/virtual_runtime.h +++ b/include/virtual_runtime.h @@ -176,4 +176,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_VIRTUAL_RUNTIME_H diff --git a/include/virtual_thread.h b/include/virtual_thread.h old mode 100755 new mode 100644 index 3c495ed..4243a66 --- a/include/virtual_thread.h +++ b/include/virtual_thread.h @@ -48,7 +48,7 @@ public: symbolsFiles_(symbolsFiles), processMemMaps_(), memMaps_(processMemMaps_), - parent_(*this) {}; + parent_(*this) {} VirtualThread(pid_t pid, pid_t tid, VirtualThread &thread, const std::vector> &symbolsFiles) @@ -110,4 +110,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_VIRTUAL_THREAD_H diff --git a/interfaces/innerkits/native/include/hiperf_client.h b/interfaces/innerkits/native/include/hiperf_client.h index b02b28e..52158a9 100644 --- a/interfaces/innerkits/native/include/hiperf_client.h +++ b/interfaces/innerkits/native/include/hiperf_client.h @@ -322,4 +322,4 @@ private: } // namespace HiPerf } // namespace Developtools } // namespace OHOS -#endif \ No newline at end of file +#endif // HIPERF_CLIENT_H_ diff --git a/interfaces/kits/js/napi/hiperf_client_napi.h b/interfaces/kits/js/napi/hiperf_client_napi.h old mode 100755 new mode 100644 index d199823..88eefa8 --- a/interfaces/kits/js/napi/hiperf_client_napi.h +++ b/interfaces/kits/js/napi/hiperf_client_napi.h @@ -15,4 +15,4 @@ #ifndef HIPERF_CLIENT_NAPI_H #define HIPERF_CLIENT_NAPI_H -#endif +#endif // HIPERF_CLIENT_NAPI_H diff --git a/proto/report_sample.proto b/proto/report_sample.proto index 2b8b0db..d5d7f6c 100644 --- a/proto/report_sample.proto +++ b/proto/report_sample.proto @@ -88,4 +88,4 @@ message HiperfRecord { VirtualThreadInfo thread = 4; ReportInfo info= 5; } -} \ No newline at end of file +} diff --git a/script/loadlib_test.py b/script/loadlib_test.py old mode 100755 new mode 100644 diff --git a/script/make_diff.py b/script/make_diff.py old mode 100755 new mode 100644 diff --git a/script/make_report_sample.py b/script/make_report_sample.py old mode 100755 new mode 100644 diff --git a/script/package.sh b/script/package.sh index 78e26f1..c3f1912 100755 --- a/script/package.sh +++ b/script/package.sh @@ -51,4 +51,4 @@ cp -vf $OHOS_ARM_PATH/hiperf $OHOS_ARM_OUT_PATH cd $HOST_OUT/../ rm -f hiperf.tar.gz tar czvf hiperf.tar.gz hiperf -cd - \ No newline at end of file +cd - diff --git a/script/record_control.py b/script/record_control.py old mode 100755 new mode 100644 diff --git a/script/recv_binary_cache.py b/script/recv_binary_cache.py old mode 100755 new mode 100644 diff --git a/script/report-diff.html b/script/report-diff.html old mode 100755 new mode 100644 diff --git a/script/report.html b/script/report.html old mode 100755 new mode 100644 index 2bf535d..7b4a6b7 --- a/script/report.html +++ b/script/report.html @@ -5406,4 +5406,4 @@ input{ -