Loading...
Loading...
Use when adding new resource tracking types to memory profiling in developtools_profiler and third_party_musl repositories. Triggered by requests to add trace tags, resource labels, or memory tracking types.
npx skill4agent add openharmonyinsight/openharmony-skills add-memory-trace-tags| Component | Number of Modified Files | Key Changes |
|---|---|---|
| third_party_musl | 2 files | TAG and MASK definitions |
| developtools_profiler | 9 files | Protocols, logic, tests |
Please add a new resource tracking tag <tag name>Use add-res-trace-tag to add <tag name>COMMON_<type name>COMMON_PIXELMAPCREATE_NATIVE_WINDOW_FROM_SURFACEsrc/hook/linux/memory_trace.hporting/linux/user/src/hook/memory_trace.hprotos/types/plugins/native_hook/native_hook_result.protodevice/plugins/native_daemon/include/hook_common.hdevice/plugins/native_hook/src/hook_guard.cppdevice/plugins/native_daemon/src/hook_manager.cppdevice/plugins/native_daemon/src/stack_preprocess.cppdevice/plugins/native_daemon/src/hook_record.cppdevice/plugins/native_hook/src/hook_client.cppdevice/plugins/native_daemon/test/unittest/common/native/hook_record_test.cppdevice/plugins/native_daemon/test/unittest/common/native/stack_preprocess_test.cpp// ✅ Correct: Define both macros
#define RES_COMMON_WINDOW (1ULL << 33)
#define RES_COMMON_WINDOW_MASK (1ULL << 33)
// ❌ Error: Missing _MASK suffix
#define RES_COMMON_WINDOW (1ULL << 33)
// Missing RES_COMMON_WINDOW_MASK!RES_<NAME>RES_<NAME>_MASKError 1: Forgot to add _MASK suffix
#define RES_COMMON_SURFACE (1ULL << 34) // ✅ Exists
// ❌ Missing: #define RES_COMMON_SURFACE_MASK (1ULL << 34)
Error 2: Only copied the first line
#define RES_COMMON_TEXTURE (1ULL << 35) // ✅ Exists
#define RES_COMMON_TEXTURE // ❌ This line is wrong! Should be (1ULL << 35)d:\Code\tools_develop\hook_client.cpp| Error | Solution |
|---|---|
| Tag already exists | Use a different tag name |
| File not found | Verify the repository path |
| Permission denied | Check file write permissions |
| Invalid format | Tag name must consist of uppercase letters and underscores |
| Missing MASK | Skill automatically adds the RES_*_MASK definition |
| Mismatched definitions | RES_* and RES_*_MASK must have the same value |