ARTist
ARTist copied to clipboard
Log Module name and filter specs for each loaded module once
I think it could be really helpful if we would log loaded ARTist module names and their filter spec once, when ARTist loads a module.
Example
HArtist() Version: 00112 Module: `<MODULE-NAME>`
# Filters:
- `com.android.server.AppOpsService`
- `com.android.server.`
- `...`
# Injections:
- Method: `Lsaarland/cispa/artist/codelib/CodeLib;traceLog()V`
- Targets:
- METHOD_START: "GENERIC_TARGET"
- METHOD_CALL_BEFORE: "onTransact("
- Method: `Lsaarland/cispa/artist/codelib/CodeLib;traceLog2()V`
- Targets:
- METHOD_CALL_BEFORE: "onCreate("
Helpful files/methods
-
compiler/optimizing/artist/artist.cc
-
void HArtist::LogVersionOnce(const string& VERSION)
-
-
Module::getMethodFilter()
-
HUniversalArtist::ProvideInjections
The current version does log "Loaded ARTist module <package_name>" if a module loaded sucessfully. https://github.com/Project-ARTist/art/blob/4ccd3debc7e96c4c6c676295804eecfdab2f8be2/dex2oat/dex2oat.cc#L1214
Thanks @parthipanramesh
That means I would vote for:
- Adding the additional information, as well as
- adding some statistics after the instrumentation finished, which could be pretty useful, especially for wildcard target definitions
- how many different unique injection-targets matched (perhaps listing the matched functions)
- How many non-unique calls to the method were injected.
What you think?
Yes that sound good! 👍