Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

[QEUSTION]How does granary core work from a high-level insight? #23

@renzhengeek

Description

@renzhengeek

Hi all,
With pgoodman's help 👍 , I get much more clear about wrappers, watchpoints.

But I still know little details about granary core.
So, I start from granary's entry to follow how granary going on.

In init_granary (https://github.com/Granary/granary/blob/master/module.c#L601):

how granary work after this is even more harder for me(i.e. how to control and instrument target module's executions.).for example:

  1. do we split module code into bb based on direct cti only or both indirect and direct cti?
  2. what will be stored in code cache?
  3. when/where do we actually instruments module, only in visit_app/host_instructions?
  4. the last parameter ls in visit_app_instructions actually refer to what?
    does it refer to instructions of a basic block in code cache?
granary::instrumentation_policy null_policy::visit_app_instructions(
        granary::cpu_state_handle,
        granary::basic_block_state &,
        granary::instruction_list &
    ) throw() {
        return granary::policy_for<null_policy>();
    }

Thank you very much ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions