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

Log Module name and filter specs for each loaded module once #21

Open
sweisgerber-dev opened this issue Jul 24, 2018 · 3 comments
Open

Comments

@sweisgerber-dev
Copy link
Member

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
@partipan-dot
Copy link
Collaborator

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

@sweisgerber-dev
Copy link
Member Author

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?

@partipan-dot
Copy link
Collaborator

Yes that sound good! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants