Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ManifestParser.java #872

Open
wants to merge 894 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
894 commits
Select commit Hold shift + click to select a range
d6d3411
rename module matrix-jectl -> matrix-mallctl
Yves0 Jul 26, 2022
c029184
mallctl: remove useless code
Yves0 Jul 26, 2022
a2abe1f
mallctl: add mallopt
Yves0 Jul 26, 2022
46fb951
mallctl: fix pkg name
Yves0 Jul 26, 2022
d6aa3aa
mallctl: fix module name
Yves0 Jul 26, 2022
4e06799
Update power_profile.xml reading
kaedea Jul 26, 2022
1d0d58b
mallctl: move setRetain back
Yves0 Jul 27, 2022
cc188a7
mallctl: rename je setRetain api
Yves0 Jul 27, 2022
6493a10
Update power profile logging
kaedea Jul 27, 2022
8bf4c4e
Update battery capacity
kaedea Jul 27, 2022
f86184f
memory-canary: fix smaps entry pattern with no name entries
Yves0 Jul 28, 2022
c16db55
memory-canary: dump brief smaps info - break when pss < 1M
Yves0 Jul 28, 2022
9a4d581
Merge branch 'feature/dev-fix-merged-smaps' into 'feature/dev' (merge…
gryamy Jul 28, 2022
b3b6fd0
Update composite monitors fork
kaedea Jul 28, 2022
8c22e7b
mallctl: add madvise api
Yves0 Jul 29, 2022
bd2033a
Merge branch 'feature/dev' of https://git.woa.com/matrix/matrix into …
Yves0 Jul 29, 2022
1cd6721
Update battery power profile compat
kaedea Aug 1, 2022
f189233
lifecycle: add getMemInfo api for subordinate proceesses
Yves0 Jun 7, 2022
bbc0c39
Merge branch 'feature/dev-mallopt' into 'feature/dev' (merge request …
gryamy Aug 2, 2022
0b399c3
memory-canary: merge dumps of AppBgSumPssMonitor
Yves0 Jun 7, 2022
a9be8ed
Update battery cpu power calc
kaedea Aug 3, 2022
0383e2e
Fix ams running procs null-check errs
kaedea Aug 3, 2022
2a36049
Update comments
kaedea Aug 3, 2022
07cfe4c
Update comments
kaedea Aug 3, 2022
32d0154
Update cpuCalculator tests
kaedea Aug 3, 2022
4c5c27c
Merge branch 'feature/dev-ipc-pss' into 'feature/dev' (merge request …
gryamy Aug 4, 2022
660f0f6
Update battery sampler invalid value
kaedea Aug 4, 2022
6885c4d
memory-canary: add protection for getting mem info with ipc
Yves0 Aug 4, 2022
6494812
Merge branch 'feature/dev-ipc-pss' into 'feature/dev' (merge request …
gryamy Aug 4, 2022
ad47c93
Update cpu power calculators
kaedea Aug 4, 2022
a23777b
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
gryamy Aug 5, 2022
118e436
sample: fix compile error
Yves0 Aug 10, 2022
84f9783
Merge branch 'feature/dev-fix-sample' into 'feature/dev' (merge reque…
gryamy Aug 10, 2022
68d1833
memory-canary: add triggerTrim api
Yves0 Aug 11, 2022
84be67d
Fix battery util casting issue
kaedea Aug 11, 2022
b72ee61
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
Aug 11, 2022
753181f
Merge branch 'feature/dev-manual-trim' into 'feature/dev' (merge requ…
Aug 11, 2022
691c599
Update battery power calc for compare
kaedea Aug 15, 2022
6bbc01f
Update battery power calculator
kaedea Aug 16, 2022
abc89e0
Power must not be negative
kaedea Aug 16, 2022
760a5a8
ActivityLeakFixer: remove contentView only for devices that is split-…
Yves0 Aug 16, 2022
0b8f978
Merge branch 'feature/dev-12L-compat' into 'feature/dev' (merge reque…
gryamy Aug 16, 2022
21144c1
Fix battery power profile paring for custom path
kaedea Aug 18, 2022
7e179f2
Update powerprofile parsing
kaedea Aug 19, 2022
b4d5477
Merge branch 'feature/dev' of git.code.oa.com:matrix/matrix into feat…
kaedea Aug 22, 2022
25697c0
Fix battery lifecycle listener
kaedea Aug 22, 2022
353fed4
memory-canary: fix NPE
Yves0 Aug 22, 2022
b2b3cca
Merge branch 'feature/dev-fix-meminfo-npe' into 'feature/dev' (merge …
gryamy Aug 22, 2022
2c008b8
Add battery cpufreq sampler
kaedea Aug 22, 2022
cc19ed8
Update cpuPower calc
kaedea Aug 23, 2022
dae47c8
Add battery cpuState uid snapshot
kaedea Aug 24, 2022
fc3a0e0
Fix import compile issues
kaedea Aug 24, 2022
a619bb3
Update powerProfile with dsp audio/video
kaedea Aug 24, 2022
7a25bd9
Update uid cpustate cfg
kaedea Aug 24, 2022
c1ea513
Update power tuning with mobile & wifi
kaedea Aug 25, 2022
c2aad28
MatrixTraceTransform: fix NoSuchMethodError with com.android.tools:co…
Yves0 Aug 26, 2022
7ae6688
Merge branch 'feature/dev-agp-compat-issue' into 'feature/dev' (merge…
gryamy Aug 26, 2022
d3f39f3
MatrixTraceTransform: fix NoSuchMethodError with com.android.tools:co…
Yves0 Aug 26, 2022
eb3d41f
Merge branch 'feature/dev-agp-compat-issue' into 'feature/dev' (merge…
gryamy Aug 26, 2022
063407a
Update battery power calc with bps
kaedea Aug 26, 2022
439dc60
Update top indicator
kaedea Aug 23, 2022
06b45cc
Update top power
kaedea Aug 24, 2022
2fc70bd
Update top power
kaedea Aug 25, 2022
c1f7390
Update top power indicator
kaedea Aug 26, 2022
82c076b
Update top power indicator
kaedea Aug 26, 2022
037b464
Update mobile power cfg
kaedea Aug 26, 2022
f70d380
Update battery mobile/wifi power cfg
kaedea Aug 29, 2022
dc90a84
sample: fix dependency
Yves0 Aug 30, 2022
1622baf
Merge branch 'feature/dev-sample-fix' into 'feature/dev' (merge reque…
gryamy Aug 30, 2022
3c0232f
Update battery power top indicator
kaedea Aug 30, 2022
0cd3b66
Update battery healthstats cfg
kaedea Aug 30, 2022
d142b26
Update battery canary config with tunning
kaedea Aug 31, 2022
68a2093
Update battery sample cfgs
kaedea Sep 1, 2022
23e9b71
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
gryamy Sep 1, 2022
58ae7c9
Update time breaker for test
kaedea Sep 5, 2022
a4b7ec0
Add connectivity manager hook
kaedea Sep 6, 2022
0441188
Fix health stats npe issue
kaedea Sep 7, 2022
67aca90
Merge branch 'feature/dev' of git.code.oa.com:matrix/matrix into feat…
kaedea Sep 7, 2022
7bd65c2
Revert tests codes
kaedea Sep 7, 2022
107feb4
Revert "Revert tests codes"
kaedea Sep 7, 2022
434adec
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
gryamy Sep 7, 2022
a79c28d
Fix battery canary handler
kaedea Sep 7, 2022
c1fdb81
binder 添加异常保护
Sep 8, 2022
70e0b42
Merge branch 'dev_opengl_09alpha' into 'feature/dev' (merge request !…
gryamy Sep 8, 2022
5177796
Update battery handler thread cfg
kaedea Sep 8, 2022
be931c5
Add battery currency inspector
kaedea Sep 9, 2022
ae848f2
Update battery currency inspect
kaedea Sep 9, 2022
89fd8d5
fix: Support ZIP with directory entries.
AoraMD Aug 30, 2022
2d9fed3
Update canary thread cfg
kaedea Sep 14, 2022
5c4db7a
Merge branch 'feature/dev-battery-canary-handler' into feature/dev-ba…
kaedea Sep 14, 2022
4b6d8e7
Update canary thread cfg
kaedea Sep 14, 2022
f2fd0ac
feat: Add several property-override methods.
AoraMD Sep 15, 2022
af3e89a
Merge branch 'feature/dev-apk-checker-useless-res' into fix/rur_custo…
AoraMD Sep 15, 2022
65d50fe
matrix-res-plugin: append hashcode of leaked Activity to ref_key
Yves0 Sep 26, 2022
5afb556
matrix-res-plugin: fix check expired logic
Yves0 Sep 26, 2022
3980cf8
Merge branch 'feature/dev-activity-leak-key' into 'feature/dev' (merg…
gryamy Sep 27, 2022
e66ac91
matrix-res-plugin: add hprof expired log
Yves0 Sep 27, 2022
fc16e9e
Merge branch 'feature/dev-activity-leak-key' into 'feature/dev' (merg…
gryamy Sep 27, 2022
3cb80eb
fix: Do not hardcode resource directory path prefix.
AoraMD Sep 23, 2022
bae2084
fix: OK, now RUR should compatible with resguard, right? 🤔
AoraMD Sep 23, 2022
776676b
fix: WHY RESOURCE ID FORMAT FROM AAPT AND ARSC IS DIFFERENT???
AoraMD Sep 26, 2022
08a402a
Update healthstats with acc collector support
kaedea Oct 19, 2022
e37b6d6
Merge branch 'fix/unused_res_compatibility' into 'feature/dev' (merge…
gryamy Oct 20, 2022
796f5bd
AppBgSumPssMonitor: add extra pss factory
Yves0 Oct 20, 2022
b8f8a11
Merge branch 'feature/dev' of https://git.woa.com/matrix/matrix into …
Yves0 Oct 20, 2022
225489a
AppBgSumPssMonitor: filter log
Yves0 Oct 20, 2022
afbc57b
Update battery stats thread cfg
kaedea Oct 20, 2022
43b8dfa
Merge branch 'feature/dev-extra-memory' into 'feature/dev' (merge req…
gryamy Oct 20, 2022
699b5a5
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
gryamy Oct 20, 2022
713d4c0
Fix multi-thread hashset modification exception
Oct 21, 2022
2782998
Merge branch 'feature/dev_leafjia_fix_mod_je' into 'feature/dev' (mer…
Oct 21, 2022
7a19c50
Merge branch 'feature/dev' of https://git.woa.com/matrix/matrix into …
Yves0 Oct 21, 2022
5abdbd6
fix: Fix unused resources finding issue of apk canary by analyzing r8…
AoraMD Oct 25, 2022
8ebddfc
Merge branch 'fix/apk-canary-find-unused-res' into 'feature/dev' (mer…
gryamy Oct 26, 2022
81dd439
res-plugin: fix manual dump api
Yves0 Oct 26, 2022
4608c63
Merge branch 'feature/dev-res-plugin-manual-dump-api' into 'feature/d…
gryamy Oct 26, 2022
9bd76bf
修改 tid 获取方式
Oct 29, 2022
8552139
egl leak check
Oct 31, 2022
3305e90
egl 泄漏监控
Oct 31, 2022
c1e7282
Merge branch 'feature/dev-egl-leak' into 'feature/dev' (merge request…
gryamy Oct 31, 2022
700e0d5
delete log
Oct 31, 2022
6cbe31f
删除 log
Oct 31, 2022
2833e59
Merge branch 'feature/dev-egl-leak' into 'feature/dev' (merge request…
Oct 31, 2022
290ed5a
暂时屏蔽 egl
Oct 31, 2022
6657364
Merge branch 'feature/dev-egl-leak' into 'feature/dev' (merge request…
Oct 31, 2022
359fc70
crash fix
Oct 31, 2022
324bbeb
打开
Oct 31, 2022
25a0dd4
Merge branch 'feature/dev-egl-leak' into 'feature/dev' (merge request…
Oct 31, 2022
c13b9d7
disable isEglContextReleased
Nov 1, 2022
fedde1d
Merge branch 'feature/dev-egl-leak' into 'feature/dev' (merge request…
Nov 1, 2022
777f317
feat: Remove unnecessary log printing from remove unused resources task.
AoraMD Nov 1, 2022
2992750
Merge branch 'fix/remove-rur-logs' into 'feature/dev' (merge request …
gryamy Nov 3, 2022
e56faf6
opengl-hook: change gettid api
Yves0 Nov 3, 2022
38d2953
opengl-hook: fix compile error
Yves0 Nov 3, 2022
512ad38
Merge branch 'feature/dev-opengl-hook-tid' into 'feature/dev' (merge …
gryamy Nov 3, 2022
f49a30a
MemInfo: add Process Pid to Log
Yves0 Nov 4, 2022
c2cacd0
Merge branch 'feature/dev-meminfo' into 'feature/dev' (merge request …
gryamy Nov 4, 2022
52fc2ac
Fix battery full charged event overheat bug
kaedea Nov 4, 2022
ee54ea0
时序问题修复
Nov 9, 2022
974c08c
Merge branch 'feature/dev-egl-leak' into 'feature/dev' (merge request…
Nov 9, 2022
646e8db
fix: Fix remove unused resources resguard-mapping parsing error.
AoraMD Nov 15, 2022
30f4d7f
[runtime_verify_mute] Add first version.
Nov 16, 2022
eecc1c1
fix: Fix attribute type omitted.
AoraMD Nov 16, 2022
c86f237
add log
Nov 17, 2022
17c8b9b
Merge branch 'feature/dev-egl-leak' into 'feature/dev' (merge request…
gryamy Nov 18, 2022
d6c4754
ManualDumpProcessor: fix api-31 compatibility issue
Yves0 Nov 18, 2022
815a705
Merge branch 'feature/dev-target-31' into 'feature/dev' (merge reques…
gryamy Nov 19, 2022
b7334ee
[runtime_verify_mute] Adjust min support version to P.
tys282000 Nov 19, 2022
134ceb6
[runtime_verify_mute] Remove version suffix.
tys282000 Nov 19, 2022
0559e10
[runtime_verify_mute] Fix log typo.
tys282000 Nov 19, 2022
1e6b9ce
[RUR] change sevenZip level -mx9 to -mx5
Nalecy Nov 20, 2022
a8e4b0a
Merge branch 'fix/rur-map-error' into 'feature/dev' (merge request !292)
gryamy Nov 21, 2022
2ff43cc
Merge branch 'fix/rur_zip_level_nalecyxu' into 'feature/dev' (merge r…
gryamy Nov 24, 2022
958a814
Merge branch 'feature/tomys_art_rt_verify_mute' into 'feature/dev' (m…
gryamy Nov 24, 2022
35d29b7
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
gryamy Nov 24, 2022
1b8e522
fix matrix-android build err on AGP 7.x.x
Bilue404 Nov 25, 2022
0dfc9f7
matrix-hooks: weird NPE protection -- Thread.currentThread() is NULL
Yves0 Nov 28, 2022
b7cac0e
Merge branch 'feature/dev-fix-thread-npe' into 'feature/dev' (merge r…
gryamy Nov 28, 2022
ec1ea8a
MemInfoFactory: fix NumberFormatException
Yves0 Nov 30, 2022
ac659c4
sample: fix compile error
Yves0 Nov 30, 2022
52357f0
Merge branch 'feature/dev-fix-thread-npe' into 'feature/dev' (merge r…
gryamy Nov 30, 2022
fa7b17f
matrix-hooks: fix linker deadlock caused by hook
Yves0 Dec 1, 2022
e1c7aaf
Merge branch 'feature/dev-mem-hook-deadlock' into 'feature/dev' (merg…
gryamy Dec 2, 2022
6cf6c90
memory-canary: fix NPE crash
Yves0 Dec 2, 2022
7b59694
Merge branch 'feature/dev-fix-mem-monitor-npe' into 'feature/dev' (me…
gryamy Dec 2, 2022
1a15578
Fix battery get bps compat issue
kaedea Dec 2, 2022
e6dbef4
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
gryamy Dec 2, 2022
1e1ef67
matrix-hooks: fix NPE - fetch origin function pointer before register…
Yves0 Dec 3, 2022
9bd9014
matrix-hooks: remove log
Yves0 Dec 3, 2022
a9135a0
Merge branch 'feature/dev-mem-hook-deadlock' into 'feature/dev' (merg…
gryamy Dec 3, 2022
5de41b3
Skip new added tid & pid
kaedea Dec 4, 2022
fadebd5
opengl-hook: add @keep for reflection
Yves0 Dec 9, 2022
60edc46
opengl-hook: support for share context
Yves0 Dec 9, 2022
ee0fcc7
opengl-hook: fix removing record failed
Yves0 Dec 13, 2022
5d773c6
Merge branch 'feature/dev' of git.code.oa.com:matrix/matrix into feat…
kaedea Dec 13, 2022
2d25735
Update new added pid tid cfg
kaedea Dec 13, 2022
389a23c
opengl-hook: fix egl context hook
Yves0 Dec 13, 2022
828dc35
Update health stats with wakelocks
kaedea Dec 22, 2022
c1676d4
HookManager: remove log when NPE happens
Yves0 Dec 16, 2022
f61acd1
OpenGL: fix EglContext state checker
Yves0 Dec 22, 2022
6c0bef9
Merge branch 'feature/dev-opengl-shared-context' into 'feature/dev' (…
Dec 22, 2022
249c132
OpenGL: change Java stacktrace format
Yves0 Dec 23, 2022
5096a4c
OpenGL: change native stacktrace format
Yves0 Dec 23, 2022
b13a1c3
Merge branch 'feature/dev-opengl-shared-context' into 'feature/dev' (…
Dec 23, 2022
36a62ba
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
Dec 25, 2022
bf73184
OpenGL: fix deleting info in different threads
Yves0 Jan 6, 2023
9f1fe33
OpenGL: fix deleting info in different threads
Yves0 Jan 6, 2023
deb50ea
OpenGL: don't remove eglContext records when error occurred
Yves0 Jan 9, 2023
7721d9a
OpenGL: fix wrong tid
Yves0 Jan 9, 2023
abfc112
OpenGL: fix wrong tid
Yves0 Jan 9, 2023
3e051d3
Merge branch 'feature/dev-opengl-bugfix-230106' into 'feature/dev' (m…
gryamy Jan 9, 2023
9bdbffc
Update healthstats feat with proc stats count
kaedea Jan 10, 2023
8f775fd
resource-plugin: add api for disabling notification
Yves0 Jan 12, 2023
f2f1bf7
Merge branch 'feature/dev-opengl-bugfix-230106' into 'feature/dev' (m…
gryamy Jan 12, 2023
a929693
matrix-lifecycle: remove API guard for "unsupported" apis declared in…
Yves0 Jan 12, 2023
bc7583b
Merge branch 'feature/dev-opengl-bugfix-230106' into 'feature/dev' (m…
gryamy Jan 12, 2023
fc1bc83
根据anr trace检测死锁,同时针对主线程nativePollOnce的情况进行全堆栈(java+native)上报。
Jan 12, 2023
75d4b2d
Merge remote-tracking branch 'origin/feature/dev' into feature/dev-de…
Jan 12, 2023
7798c07
opengl-hook: fix egl context released state
Yves0 Jan 16, 2023
b6add5b
Merge branch 'feature/dev-opengl-bugfix-230106' into 'feature/dev' (m…
gryamy Jan 16, 2023
f61c0cc
lifecycle: fix binding SupervisorService failed
Yves0 Jan 17, 2023
f847a35
retrieve class(or type) of lock object from waiting circle.
Jan 31, 2023
af9631a
Separate looper monitor and frame monitor.
Feb 2, 2023
bebce86
fix deadlock detection bug
Feb 2, 2023
795778e
Merge branch 'feature/dev-lifecycle-bugfix' into 'feature/dev' (merge…
gryamy Feb 3, 2023
80ea337
FrameTracer compatible with old versions.
Feb 7, 2023
0e959a9
modify calculation of avgFPS
Feb 8, 2023
017c42a
fix bug, skip invalid frame metrics.
Feb 9, 2023
0cf4496
Merge branch 'feature/dev-deadlock_anr_detect' into 'feature/dev' (me…
gryamy Feb 9, 2023
c9eb3ac
Merge branch 'feature/dev-battery-canary' into 'feature/dev' (merge r…
gryamy Feb 9, 2023
f4e9412
Merge remote-tracking branch 'origin/feature/dev' into feature/dev-fr…
Feb 9, 2023
a0749a7
verify TOTAL_DURATION of frame metrics.
Feb 10, 2023
d9c187d
Merge branch 'feature/dev-frameTracer_refactor' into 'feature/dev' (m…
gryamy Feb 10, 2023
75d3e5a
fix bug of time calculation in EvilMethodTracer.
Feb 13, 2023
72da9ed
Unify ANR report stack and jank report stack.
Feb 13, 2023
0c2d8e8
Merge branch 'feature/dev-frameTracer_refactor' into 'feature/dev' (m…
Feb 13, 2023
121a6ec
add stack dump style
Feb 15, 2023
60ca251
fix activity leak.
Feb 15, 2023
23319e2
Merge branch 'feature/dev-frameTracer_refactor' into 'feature/dev' (m…
gryamy Feb 16, 2023
222d2fa
opengl-hook: fix sof
Yves0 Feb 17, 2023
7872609
Merge branch 'feature/dev-fix-sof' into 'feature/dev' (merge request …
Feb 17, 2023
3a7a65c
trim-mem: fix deadlock
Yves0 Feb 20, 2023
1866e8a
Merge branch 'feature/dev-fix-deadlock' into 'feature/dev' (merge req…
Feb 20, 2023
b40d0a3
lifecycle: add threadPool delegate
Yves0 Feb 20, 2023
bdbb345
add continuable callback in ISceneFrameListener.
Feb 28, 2023
a8a2f87
change continuable to isCallbackRestAfterUnregister in ISceneFrameLis…
Mar 1, 2023
006b31b
update interface of ISceneFrameListener.
Mar 1, 2023
ae45599
Merge pull request #796 from Bilue404/fix_build_err
Yves0 Mar 2, 2023
48d3c1c
Merge branch 'feature/dev-lifecycle-executor-old' into 'feature/dev' …
gryamy Mar 2, 2023
27c629d
Merge remote-tracking branch 'origin/feature/dev' into feature/dev-fr…
Mar 8, 2023
5cf2b83
Merge branch 'feature/dev-frameTracer_refactor' into 'feature/dev' (m…
gryamy Mar 8, 2023
a1a8c7d
opengl-hook: add brief stacktrace dumping api
Yves0 Mar 9, 2023
3889f82
Merge branch 'feature/dev-opengl-hook-brief-stack' into 'feature/dev'…
gryamy Mar 9, 2023
df84894
add reset method in FrameTracer
Mar 9, 2023
bee0fdd
Merge remote-tracking branch 'origin/feature/dev' into feature/dev-fr…
Mar 13, 2023
15332fd
Merge branch 'feature/dev-frameTracer_refactor' into 'feature/dev' (m…
gryamy Mar 14, 2023
fd1324d
upgrade: com.google.code.gson:gson:2.8.9
Yves0 Mar 14, 2023
a6a63c8
Merge branch 'feature/dev-gson-fix' into 'feature/dev' (merge request…
gryamy Mar 15, 2023
fe5f6f2
Merge branch 'master' of https://github.com/Tencent/matrix into featu…
gryamy Mar 21, 2023
67394c9
v2.1.0
gryamy Mar 21, 2023
2e93817
Update README & Sample
gryamy Mar 21, 2023
1ef5730
Merge pull request #824 from Tencent/feature/dev
gryamy Mar 21, 2023
4efbe49
Comment test projects
gryamy Mar 21, 2023
6abb4be
Add publishRepo
gryamy Mar 21, 2023
548f033
Suppress lint
gryamy Mar 21, 2023
5e08f2c
Remove build from buildAndPublishRepo
gryamy Mar 21, 2023
b5d09fa
Fix sample build break
gryamy Mar 21, 2023
4cf6d55
Merge pull request #825 from Tencent/feature/dev
gryamy Mar 21, 2023
3b8293b
Update README
tendahuang Jul 31, 2023
a223023
Update ManifestParser.java
BelongsH Nov 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
81 changes: 41 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
![Matrix-icon](assets/img/readme/header.png)
[![license](http://img.shields.io/badge/license-BSD3-brightgreen.svg?style=flat)](https://github.com/Tencent/matrix/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/matrix/pulls)
[![WeChat Approved](https://img.shields.io/badge/Wechat%20Approved-2.0.5-red.svg)](https://github.com/Tencent/matrix/wiki)
[![WeChat Approved](https://img.shields.io/badge/Wechat%20Approved-2.1.0-red.svg)](https://github.com/Tencent/matrix/wiki)
[![CircleCI](https://circleci.com/gh/Tencent/matrix.svg?style=shield)](https://app.circleci.com/pipelines/github/Tencent/matrix)

(中文版本请参看[这里](#matrix_cn))

[Matrix for iOS/macOS 中文版](#matrix_ios_cn)
[Matrix for android 中文版](#matrix_android_cn)
[Matrix for iOS/macOS](#matrix_ios_en)
[Matrix for android ](#matrix_android_en)
[Matrix for android](#matrix_android_en)

**Matrix** is an APM (Application Performance Manage) used in Wechat to monitor, locate and analyse performance problems. It is a **plugin style**, **non-invasive** solution and is currently available on iOS, macOS and Android.

# <a name='matrix_ios_en'> Matrix for iOS/macOS </a>

The monitoring scope of the current tool includes: crash, lag, and out-of-memory, which includes the following two plugins:
The monitoring scope of the current tool includes: crash, lag, and memory, which includes the following three plugins:

* **WCCrashBlockMonitorPlugin:** Based on [KSCrash](https://github.com/kstenerud/KSCrash) framework, it features cutting-edge lag stack capture capabilities with crash capture.

* **WCMemoryStatPlugin:** A performance-optimized out-of-memory monitoring tool that captures memory allocation and the callstack of an application's out-of-memory event.
* **WCMemoryStatPlugin:** A memory monitoring tool that captures memory allocation and the callstack of an application's memory event.

* **WCFPSMonitorPlugin:** A fps monitoring tool that captures main thread's callstack while user scrolling.

## Features

Expand All @@ -32,18 +34,10 @@ The monitoring scope of the current tool includes: crash, lag, and out-of-memory
#### WCMemoryStatPlugin

* Live recording every object's creating and the corresponding callstack of its creation, and report it when the application out-of-memory is detected.
* Use a balanced binary tree to store living objects and a hash table to store the callstack to optimize performance to the extreme

## Getting Started
#### Install

* **Install via Cocoapods**
1. Install [CocoaPods](https://guides.cocoapods.org/using/getting-started.html);
2. Run `pod repo update` to make CocoaPods aware of the latest available `matrix` versions;
3. In your Podfile, add `pod 'matrix-wechat'` to your app target, from the command line, run `pod install`;
4. Use the .xcworkspace file generated by CocoaPods to work on your project;
5. Add `#import <Matrix/Matrix.h>` , then you can use the performance probe tool of WeChat.

* **Install with static framework**
1. Get source code of Matrix;
2. Open terminal, execute `make` in the `matrix/matrix-iOS` directory to compile and generate static library. After compiling, the iOS platform library is in the `matrix/matrix-iOS/build_ios` directory, and the macOS platform library is in the `matrix/matrix-iOS/build_macos` directory.
Expand Down Expand Up @@ -73,15 +67,16 @@ WCCrashBlockMonitorPlugin *crashBlockPlugin = [[WCCrashBlockMonitorPlugin alloc]
[curBuilder addPlugin:crashBlockPlugin]; // add lag and crash monitor.

WCMemoryStatPlugin *memoryStatPlugin = [[WCMemoryStatPlugin alloc] init];
[curBuilder addPlugin:memoryStatPlugin]; // add out-of-memory monitor.
[curBuilder addPlugin:memoryStatPlugin]; // add memory monitor.

WCFPSMonitorPlugin *fpsMonitorPlugin = [[WCFPSMonitorPlugin alloc] init];
[curBuilder addPlugin:fpsMonitorPlugin]; // add fps monitor.

[matrix addMatrixBuilder:curBuilder];

[crashBlockPlugin start]; // start the lag and crash monitor.
// [memoryStatPlugin start];
// start out-of-memory monitor
// Be careful, WCMemoryStatPlugin has a large performance loss after it is turned on. It is recommended to turn it on as needed.

[memoryStatPlugin start]; // start memory monitor
[fpsMonitorPlugin start]; // start fps monitor
```

#### Receive callbacks to obtain monitoring data
Expand Down Expand Up @@ -109,7 +104,7 @@ Each plugin added to `MatrixBuilder` will call back the corresponding event via

## Tutorials

At this point, Matrix has been integrated into the app and is beginning to collect crash, lag, and out-of-memory data. If you still have questions, check out the example: `samples/sample-apple/MatrixDemo`.
At this point, Matrix has been integrated into the app and is beginning to collect crash, lag, and memory data. If you still have questions, check out the example: `samples/sample-iOS/MatrixDemo`.



Expand Down Expand Up @@ -220,7 +215,7 @@ At this point, Matrix has been integrated into the app and is beginning to colle

1. Configure `MATRIX_VERSION` in gradle.properties.
``` gradle
MATRIX_VERSION=2.0.5
MATRIX_VERSION=2.1.0
```

2. Add `matrix-gradle-plugin` in your build.gradle:
Expand Down Expand Up @@ -369,11 +364,11 @@ Then other components in Matrix could use Quikcen Backtrace to unwind stacktrace

#### APK Checker Usage

APK Checker can run independently in Jar ([matrix-apk-canary-2.0.5.jar](https://repo.maven.apache.org/maven2/com/tencent/matrix/matrix-apk-canary/2.0.5/matrix-apk-canary-2.0.5.jar)) mode, usage:
APK Checker can run independently in Jar ([matrix-apk-canary-2.1.0.jar](https://repo.maven.apache.org/maven2/com/tencent/matrix/matrix-apk-canary/2.1.0/matrix-apk-canary-2.1.0.jar)) mode, usage:


```shell
java -jar matrix-apk-canary-2.0.5.jar
java -jar matrix-apk-canary-2.1.0.jar
Usages:
--config CONFIG-FILE-PATH
or
Expand Down Expand Up @@ -432,18 +427,20 @@ Matrix is under the BSD license. See the [LICENSE](https://github.com/Tencent/Ma

# <a name="matrix_cn">Matrix</a>
![Matrix-icon](assets/img/readme/header.png)
[![license](http://img.shields.io/badge/license-BSD3-brightgreen.svg?style=flat)](https://github.com/Tencent/matrix/blob/master/LICENSE)[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/matrix/pulls) [![WeChat Approved](https://img.shields.io/badge/Wechat%20Approved-2.0.5-red.svg)](https://github.com/Tencent/matrix/wiki)
[![license](http://img.shields.io/badge/license-BSD3-brightgreen.svg?style=flat)](https://github.com/Tencent/matrix/blob/master/LICENSE)[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/matrix/pulls) [![WeChat Approved](https://img.shields.io/badge/Wechat%20Approved-2.1.0-red.svg)](https://github.com/Tencent/matrix/wiki)

**Matrix** 是一款微信研发并日常使用的应用性能接入框架,支持iOS, macOS和Android。
Matrix 通过接入各种性能监控方案,对性能监控项的异常数据进行采集和分析,输出相应的问题分析、定位与优化建议,从而帮助开发者开发出更高质量的应用。

# <a name='matrix_ios_cn'>Matrix for iOS/macOS </a>

当前工具监控范围包括:崩溃、卡顿和爆内存,包含以下两款插件:
Matrix-iOS 当前工具监控范围包括:崩溃、卡顿和内存,包含以下三款插件:

* **WCCrashBlockMonitorPlugin:** 基于 [KSCrash](https://github.com/kstenerud/KSCrash) 框架开发,具有业界领先的卡顿堆栈捕获能力,同时兼备崩溃捕获能力

* **WCCrashBlockMonitorPlugin:** 基于 [KSCrash](https://github.com/kstenerud/KSCrash) 框架开发,具有业界领先的卡顿堆栈捕获能力,同时兼备崩溃捕获能力。
* **WCMemoryStatPlugin:** 一款性能极致的内存监控工具,能够全面捕获应用 OOM 时的内存分配以及调用堆栈情况

* **WCMemoryStatPlugin:** 一款性能优化到极致的爆内存监控工具,能够全面捕获应用爆内存时的内存分配以及调用堆栈情况。
* **WCFPSMonitorPlugin:** 一款 FPS 监控工具,当用户滑动界面时,记录主线程调用栈

## 特性

Expand All @@ -455,18 +452,11 @@ Matrix 通过接入各种性能监控方案,对性能监控项的异常数据

#### WCMemoryStatPlugin

* 在应用运行期间获取对象存活以及相应的堆栈信息,在检测到应用爆内存时进行上报
* 使用平衡二叉树存储存活对象,使用 Hash Table 存储堆栈,将性能优化到极致
* 在应用运行期间获取对象存活以及相应的堆栈信息,在检测到应用 OOM 时进行上报

## 使用方法

#### 安装
* **通过 Cocoapods 安装**
1. 先安装 [CocoaPods](https://guides.cocoapods.org/using/getting-started.html);
2. 通过 pod repo update 更新 matrix 的 Cocoapods 版本;
3. 在 Podfile 对应的 target 中,添加 pod 'matrix-wechat',并执行 pod install;
4. 在项目中使用 Cocoapods 生成的 .xcworkspace运行工程;
5. 在你的代码文件头引入头文件 #import <Matrix/Matrix.h>,就可以接入微信的性能探针工具了!

* **通过静态库安装**
1. 获取 Matrix 源码;
Expand Down Expand Up @@ -499,13 +489,15 @@ WCCrashBlockMonitorPlugin *crashBlockPlugin = [[WCCrashBlockMonitorPlugin alloc]

WCMemoryStatPlugin *memoryStatPlugin = [[WCMemoryStatPlugin alloc] init];
[curBuilder addPlugin:memoryStatPlugin]; // 添加内存监控功能

WCFPSMonitorPlugin *fpsMonitorPlugin = [[WCFPSMonitorPlugin alloc] init];
[curBuilder addPlugin:fpsMonitorPlugin]; // 添加 fps 监控功能

[matrix addMatrixBuilder:curBuilder];

[crashBlockPlugin start]; // 开启卡顿和崩溃监控
// [memoryStatPlugin start];
// 开启内存监控,注意 memoryStatPlugin 开启之后对性能损耗较大,建议按需开启

[memoryStatPlugin start]; // 开启内存监控
[fpsMonitorPlugin start]; // 开启 fps 监控
```

#### 接收回调获得监控数据
Expand Down Expand Up @@ -533,7 +525,7 @@ curBuilder.pluginListener = <一个遵循 MatrixPluginListenerDelegate 的对象

## Demo

至此,Matrix 已经集成到应用中并且开始收集崩溃、ANR、卡顿和爆内存数据,如仍有疑问,请查看示例:`samples/sample-apple/MatrixDemo`
至此,Matrix 已经集成到应用中并且开始收集崩溃、卡顿和爆内存数据,如仍有疑问,请查看示例:`samples/sample-iOS/MatrixDemo`


# <a name='matrix_android_cn'>Matrix for Android </a>
Expand Down Expand Up @@ -636,7 +628,7 @@ Matrix-android 当前监控范围包括:应用安装包大小,帧率变化

1. 在你项目根目录下的 gradle.properties 中配置要依赖的 Matrix 版本号,如:
``` gradle
MATRIX_VERSION=2.0.5
MATRIX_VERSION=2.1.0
```

2. 在你项目根目录下的 build.gradle 文件添加 Matrix 依赖,如:
Expand Down Expand Up @@ -782,10 +774,10 @@ WeChatBacktrace.instance().configure(getApplicationContext()).commit();

#### APK Checker

APK Check 以独立的 jar 包提供 ([matrix-apk-canary-2.0.5.jar](https://repo.maven.apache.org/maven2/com/tencent/matrix/matrix-apk-canary/2.0.5/matrix-apk-canary-2.0.5.jar)),你可以运行:
APK Check 以独立的 jar 包提供 ([matrix-apk-canary-2.1.0.jar](https://repo.maven.apache.org/maven2/com/tencent/matrix/matrix-apk-canary/2.1.0/matrix-apk-canary-2.1.0.jar)),你可以运行:

```cmd
java -jar matrix-apk-canary-2.0.5.jar
java -jar matrix-apk-canary-2.1.0.jar
```

查看 Usages 来使用它。
Expand Down Expand Up @@ -846,3 +838,12 @@ Options:
# License

Matrix is under the BSD license. See the [LICENSE](https://github.com/Tencent/Matrix/blob/master/LICENSE) file for details

# 信息公示

- SDK名称:Matrix
- 版本号:2.1.0
- 开发者:深圳市腾讯计算机系统有限公司
- 主要功能:Matrix是微信研发并日常使用的应用性能监控工具,支持iOS、macOS和Android。Matrix通过接入闪退、卡顿、耗电、内存等方面的监控方案,对性能监控项的异常数据进行采集和分析,输出相应的问题分析、定位与优化建议,从而帮助开发者开发出更高质量的应用。
- [Matrix SDK使用说明](https://github.com/Tencent/matrix)
- [Matrix SDK个人信息保护规则](https://support.weixin.qq.com/cgi-bin/mmsupportacctnodeweb-bin/pages/yTezupX6yF028Mpf)
3 changes: 2 additions & 1 deletion matrix/matrix-android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
.idea/
**/.*
**/bin/
/gradle/oss-android-template.gradle
/gradle/oss-android-template.gradle
local.gradle
6 changes: 4 additions & 2 deletions matrix/matrix-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {

}

gradle.ext.KOTLIN_VERSION = "1.3.72"
gradle.ext.KOTLIN_VERSION = "1.4.32"

dependencies {
// classpath
Expand Down Expand Up @@ -52,7 +52,7 @@ ext {
// For android sub-projects
minSdkVersion = 19
targetSdkVersion = 29
compileSdkVersion = 29
compileSdkVersion = 31
buildToolsVersion = '29.0.2'

MIN_SDK_VERSION_FOR_HOOK = 21
Expand Down Expand Up @@ -86,6 +86,8 @@ ext {

ABI_FILTERS = ['armeabi-v7a', 'arm64-v8a']
LOGGER_VERSION = 1.1 // fixme logger

LIFECYCLE_VERSION = '2.3.1'
}

// Build sample project
Expand Down
2 changes: 1 addition & 1 deletion matrix/matrix-android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
# org.gradle.parallel=true
#Tue Jun 20 10:24:33 CST 2017

VERSION_NAME_PREFIX=2.0.5
VERSION_NAME_PREFIX=2.1.0
VERSION_NAME_SUFFIX=
## two options: Internal (for wechat), External (for public repo)
PUBLISH_CHANNEL=Internal
Expand Down
15 changes: 15 additions & 0 deletions matrix/matrix-android/gradle/android-publish-private.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,19 @@ task buildAndPublishRepo(type: Copy, dependsOn: ['build', 'publish']) {
}
}

task publishRepo(type: Copy, dependsOn: ['publish']) {
group = "publishing"

// save artifacts files to artifacts folder
from configurations.archives.allArtifacts.files
into "${rootProject.buildDir}/outputs/artifacts/"
rename { String fileName ->
fileName.replace("release.aar", "${version}.aar")
}

doLast {
println "* published to repo: ${project.group}:${project.name}:${project.version}"
}
}

apply from: rootProject.file('gradle/check.gradle')
15 changes: 15 additions & 0 deletions matrix/matrix-android/gradle/java-publish-private.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,19 @@ task buildAndPublishRepo(type: Copy, dependsOn: ['build', 'publish']) {
}
}

task publishRepo(type: Copy, dependsOn: ['publish']) {
group = "publishing"

// save artifacts files to artifacts folder
from configurations.archives.allArtifacts.files
into "${rootProject.buildDir}/outputs/artifacts/"
rename { String fileName ->
fileName.replace("release.aar", "${version}.aar")
}

doLast {
println "* published to repo: ${project.group}:${project.name}:${project.version}"
}
}

apply from: rootProject.file('gradle/check.gradle')
2 changes: 1 addition & 1 deletion matrix/matrix-android/gradle/java-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ task buildAndPublishToLocalMaven(type: Copy, dependsOn: ['build', 'publishToMave
}
}

task buildAndPublishRepo(type: Copy, dependsOn: ['build', 'publish']) {
task buildAndPublishRepo(type: Copy, dependsOn: ['publish']) {
group = "publishing"

// save artifacts files to artifacts folder
Expand Down
9 changes: 7 additions & 2 deletions matrix/matrix-android/matrix-android-commons/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 3.4.1)
project(android-commons C)
project(android-commons)

option(EnableLOG "Enable Logs" ON)
if(EnableLOG)
add_definitions(-DEnableLOG)
endif()

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/libsemi_dlfcn)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/libenhance_dlsym)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/libsemi_dlfcn)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/libxhook)
1 change: 1 addition & 0 deletions matrix/matrix-android/matrix-android-commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ android {
externalNativeBuild {
cmake {
targets = ['xhook', 'semi_dlfcn', 'enhance_dlsym']
arguments = ["-DEnableLOG=${gradle.enableLog() ? "ON" : "OFF"}" as String]
}
exportHeaders {
from('src/main/cpp/libxhook') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tencent.matrix.android.commoms"
package="com.tencent.matrix.android.commons"
>

<application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ project(libenhance_dlsym CXX)

set(enhance_dlsym_source_dir ${CMAKE_CURRENT_SOURCE_DIR})

set(enhance_dlsym_source
${enhance_dlsym_source_dir}/EnhanceDlsym.cpp)
set(
enhance_dlsym_source
${enhance_dlsym_source_dir}/EnhanceDlsym.cpp
)

add_library(enhance_dlsym STATIC ${enhance_dlsym_source})

find_library(log-lib log)

target_include_directories(
enhance_dlsym
PUBLIC ${enhance_dlsym_source_dir}
enhance_dlsym
PUBLIC ${enhance_dlsym_source_dir}
)

target_link_libraries(
enhance_dlsym
PUBLIC ${log-lib}
enhance_dlsym
PUBLIC ${log-lib}
)
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@
#include <dlfcn.h>
#include <set>
#include "EnhanceDlsym.h"
#include "../../../../../matrix-jectl/src/main/cpp/jectl/JeLog.h"

#define TAG "Matrix.EnhanceDl"

#include <android/log.h>

#define LOGD(TAG, FMT, args...) //__android_log_print(ANDROID_LOG_DEBUG, TAG, FMT, ##args)
#define LOGI(TAG, FMT, args...) //__android_log_print(ANDROID_LOG_INFO, TAG, FMT, ##args)
#define LOGE(TAG, FMT, args...) //__android_log_print(ANDROID_LOG_ERROR, TAG, FMT, ##args)

namespace enhance {

static std::set<DlInfo *> m_opened_info;
Expand Down
Loading