Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Instrumentation Vs Profiling  RSS feed

 
raj vin
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How Instrumentation tools are different from the profiling tools ?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, welcome to the ranch!

I'm not sure I've heard the distinction - they often go together - but I guess it makes sense. Where did you run across it?

Profiling is observing an application in operation and analyzing where it spends its resources - how often methods are called, how much time and memory they take, etc. Instrumenting is adding code or observers to make that easier, maybe code to start and stop timers and call counters. You can do a certain amount of profiling with no instrumentation just by observing the JVM via some management APIs, but you can do a lot more with instrumentation.

I've used Wily Introscope which adds instrumentation byte code at class load time so developers don't have to modify source code at all. I think this "aspect oriented programming" style approach is becomming more common in commercial tools.

See JAMon for a very cool open source instrumentation and profiling tool. The author, Steve Souza, is often around this forum.
[ March 21, 2007: Message edited by: Stan James ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With other words, instrumentation is one technique for adding the hooks that you need to, for example, profile a system.
 
M Easter
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my mind, instrumentation is indeed a post-compilation step that modifies the binary/bytecode files with various hooks.

Though it is certainly common with respect to profiling, another example is code coverage. Emma, for example, can instrument files offline or "on the fly".

check out: http://emma.sourceforge.net/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!