1

So I was reading this paper called "A Survey of Dynamic Program Analysis Techniques and Tools" and there's a listing of the different instrumentation techniques.

So according to that paper, we have source code, binary and byte-code instrumentation. The source code one is really clear, but I can't see the difference between byte-code and binary instrumentation:

"Binary instrumentation adds instrumentation code by modifying or re-writing compiled code"

and:

Bytecode instrumentation performs tracing within the compiled code. [...] Static [bytecode] instrumentation involves changing the compiled code offline before execution

There's this post: What are the differences between the three methods of code coverage analysis? speaking about "on-the-fly" instrumentation, which is really close to the "dynamic byte-code instrumentation" and "dynamic binary instrumentation".

Dynamic binary instrumentation (implemented as Just-In-Time compilers) is performed after the program has been loaded into memory

and

Dynamic [byte-code] instrumentation works when the application is already running

If anyone could explain me this difference between binary and byte-code instrumentation, that would be great.

Thank you very much.

Thibault

Community
  • 1
  • 1

1 Answers1

1

IMHO...

"Binary instrumentation adds instrumentation code by modifying or re-writing compiled code"

Compile code is made of byte code, so that is the same thing from what I see. Binary instrumentation probably just means that binaries are instrumented.

Eugene
  • 117,005
  • 15
  • 201
  • 306
  • Oh, indeed, until now I thought that byte-code and binaries were the same thing. from: http://stackoverflow.com/questions/4841083/java-is-binary-code-the-same-as-bytecode Java bytecode is a binary data format that includes loading information and execution instructions for the Java virtual machine. In that sense, Java bytecode is a special kind of binary code. When you use the term "binary code" to mean machine instructions for a real processors architecture (like IA-32 or Sparc) then it is different. Java bytecode is not a binary code in that sense. It is not processor-specific. – Thibault Beziers la fosse Apr 10 '17 at 11:22
  • Thank you very much for your answer, I get it now. – Thibault Beziers la fosse Apr 10 '17 at 11:23