instrumentation

Is there a .Net analog of the functionality provided by java.lang.instrument?

I have looked at a few of the well-known AOP-oriented frameworks for .Net such as PostSharp, bltoolkit, Castle, Cecil, and Policy Injection Block from Microsoft. Perhaps I am ignorant, but it appears that these frameworks do not provide the ability to inject code while the class is being loaded by the virtual machine, before it is visib...

Code Instrumentation on an ASP.NET Web Application

I'm fairly new to .NET development in general. I would like to do some instrumentation on my web application to tune performance, especially in relation to caching. I've written a lot of custom dynamically generated UserControls which I'd like to try caching in different ways--possibly by ASPX Page declaration or programmatically. I a...

PL/SQL Logging - How to control?

Friends, I am looking to introduce a logging framework into our existing Oracle application to replace the use of DBMS_OUTPUT. The framework will be used primarly to aid debugging and would detail such things as starting x procedure, details of parameters, ending procedure x etc. It should also have the functionality to be turned on ...

Dynamic bytecode instrumentation - issue

I have a problem I am not able to solve. Let's assume we have the following two classes and an inheritance relationship: public class A { } public class B extends A { public void foo() {} } I want to instrument additional code such that it looks as follows: public class A { public void print() { } } public class B extends A...

ASM bytecode instrumentation for method entry / exit

I've created a JVMTI agent that does the following at a high level: onClassLoadHook send the bytecodes for the loaded class to a separate Java process that will instrument the class using ASM get the bytecodes back and load them In my seperate java process that instruments the loaded Java class I do the following : .. .. cr = n...

Find names of all classes that a Java program loads using reflection

To support a static-analysis tool I want to instrument or monitor a Java program in such a way that I can determine for every reflective call (like Method.invoke(..)): 1.) which class C this method is invoked on, and 2.) which classloader loaded this class C. Ideally I am looking for a solution that does not require me to statically m...

Reading bytecode from an AnnotationProcessor

Possible Duplicate: Plugging in to Java compilers Edit - this appears to be a dupe of Plugging in to Java compilers I would like to implement an AnnotationProcessor for use with the apt tool that will be invoked after compiling a class to bytecode, that can read and modify the bytecode. The reason for doing this is that I wa...

Bytecode instrumentation generating java verifier error

Hi, I am using ASM in order to do bytecode instrumentation for Java programs. What I'm doing is simple - When instrumenting a method, if the instruction is a PUTFIELD, simply do a DUP_X1 right before the instruction, then visit the PUTFIELD and inject a function call with an argument that includes the DUP'ed stack entry. ...

First Steps on Win7 and Instrumentation

Hello as showed in the last pdc, we as developers can take advantage of SO capabilities and add instrumentation to our code (based on best practices). So in that session they introduce the new Windows PowerShell-based troubleshooting platform, and how it enables you to easily monitor multiple data sources to empower the end user and IT...

javascript profile in Firefox

(I know some people already asked questions about js profile, but that's not what I need if I understand them correctly.) I'd like to trace the execution of javascript to collect the information of 1) which function is invoked, 2) the time when the function is invoked, and 3) the execution time of the function. I want to collect the i...

Unified Error Management Solutions

I'm looking for a solution that gives me a central hub from which to view and manage errors that occur in my system, regardless of the tier in which they occur. I already have logging (log4net), perf counters, etc. But what I'm wondering is what tools I can use to collate this information into a central place. I am interested in both com...

What's a good checklist for instrumenting my .NET application

Hello all, I'm looking for a best practices checklist for instrumenting my code. Not so much what tools to use (I'm a System.Diagnostics.Trace fan myself) but just where you should put tracing statements in a "typical" application. If you have a tip (or tips) can you please provide them here. Maybe distinguish stuff that you absolutel...

ASP.Net Health Monitoring - How to check Requests Queued

I have just discovered ASP.Net Health Monitoring - it looks awesome. I have been developing ASP.Net apps for years, and have even taken the Microsoft certs and have never seen it before. I can't believe it is so hidden. It must be one of the best kept secrets of .Net... anyway, I digress. Here is my question: I would like to use ASP.Net...

Pros/Cons of Static and Dynamic Instrumentation

There are many static and dynamic instrumentation tools. Soot is a static instrumentation tool for Java bytecode. Pin and Valgrind are dynamic instrumentation tools for binaries. What are pros and cons for static and dynamic instrumentation tools? I think static instrumentation tools are better in terms of runtime performance, whereas d...

How can I use java.lang.instrument in an Eclipse RCP application?

In order to use the instrumentation features introduced in JDK 5, you can use the -javaagent flag passed to the JVM. This will inject an instance of an Instrumentation class into the static premain method. For example in a class like this: public class MyClass { public static Instrumentation inst; public static void premain(Stri...

Software to visualise instrumatation data of application navigation, screen called screen x times.

We have a set of instrumentaion data generated by our application. A table contains something like screen, called from, number of times. I'd like to load that data in to some sort of visualisation tool which will produce a map of all the screens and where they have been called from. If the links between them could give a visual repre...

"Failed to load Premain-Class manifest attribute" while trying to get the size of an object using java agent

When i try to run a java program (java -javaagent:size.jar ObjectSizeTest) i get the following error; Failed to load Premain-Class manifest attribute from D:\workspace\ObjectSizeTest\size.jar Error occurred during initialization of VM agent library failed to init: instrument public class ObjectSizeTest { public static void main(S...

How to instrument Oracle 10g to get table access metrics?

We have a legacy/production database. It has been in continuous development and use backing a website that has evolved over 10 years. The database is accessed by multiple technologies - perl cgi, php and java webapps. Lots of cruft has accumulated. I wish to undertake a major refactoring. I am sure some parts are completely legacy (the...

Instrumentation testing

I have written an instrumentation test case,When I try to run this,I got the following error java.lang.RuntimeException: Exception during suite construction at android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests.testSuiteConstructionFailed(TestSuiteBuilder.java:239) at java.lang.reflect.Method.invokeNative(Native Method) at a...

Android Instrumentaion: How do I go back to a previously launched Activity?

Hello, I'm currently running automation tests using an app that uses multiple Activity for displaying each screen. Is there anyway to go back to a previously launched Activity while running an Instrumentation test? Currently, when I use sendKeyDownUpSync( KeyEvent.KEYCODE_BACK);, this forces my test to exit, rather than go back to the ...