Skip to content

Improvements and fix to the dineroIV plugin #3

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

guillon
Copy link
Contributor

@guillon guillon commented Mar 31, 2016

A set of changes covering:

  • fixes in build system for plugins
  • rework of cost computation in dineroIV plugin
  • add several output kinds to dineroIV plugin
  • add README.dineroIV file for the plugin
  • remove changes to dinero source code, no more necessary with new cost computation scheme

guillon added 16 commits March 31, 2016 12:47
Misaligned accesses are currently ignored as it requires more
processing for cost computation with dinero.
Work around costs greater than the cach hierarchy depth as
returned by the library. It is unclear why we get costs > 2 for
instance on a 3 level cache hierarchy.
Added computation of cycles estimate by using the
DINAROIV_LATENCIES env var (default: 2,40).
These latencies are used to compute an estimated cost of
data cache/memory reads.
This variable defines the memory latency at each
cache level (2 cycles for fetch from L1, and 40 cycles for
fetch from RAM as the default).

For instance on a 2 level cache + RAM confighuration:
DINAROIV_LATENCIES=2,5,40
means 2 cycles for L1, 5 cycles for L2 and 40 cycles for RAM read
accesses.
Add -O2 to compile flags for dineroIV library objects.
Change initialisation of memory levels to be fully dynamic, and
removed the previous limit of three mem levels.
Reimplement caches cost computation from actual number of fetches
at each cache level.

Add DINEROIV_OUTPUTS envvar for selecting outputs kinds.
Fix computation of address on 32 bits targets.
Remove output of ld/st value which is not useful for cache
statistics.and requires more caution as the register value may
be killed after the operation.
…s depth."

This reverts commit b1ff9c9.

Change no more required with new cost computation.
…mary on exit."

This reverts commit 93fc533.

Revert change to dineroIV, no more needed with new cost computation.
Fix compilation after rebase on top of QEMU 1.7.0.
Fix installation path for plugins.
Compute instruction count in helper directly.
Remove inlining of instruction count computation at translation
time. This is unecessary as the overhead is the same as soon as
the helper is called after each instruction.
Do not expect unecessary parameters (cmd, latencies) when not
required.
Compute cycles and stats only when requests.
In particular when trace mode is requested, dinero is not used
at all, nor initialised.
The dyncount plugin counts dynamic instructions per
mnemonics and per groups as available in capstone
library.
The plugin support for now x86_64 and i386 guests and
relied on libcapstone >= 3.0.

Add --enable/--disable-casptone option at configure time.
Defaults to disabled when --enable-tcg-plugin is not set.
When --enable-tcg-plugin is set and the capstone library
is not found or of incompatible version, the dyncount
plugin is a no-op and it emits aa warning at runtime.
The dyntrace plugin outputs a disassembled execution trace.
The current implementation requires capstone >= 3.0.
When confiured with --debug, some plugins were not compiling
correctly due to some TCGV args mismatches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant