instrumentation

Code Instrumentation on an ASP.NET Web Application

▼魔方 西西 提交于 2019-12-24 07:07:41
问题 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 also have a lot of Oracle queries that depend on each other and I'd like to look into caching results of those to see what will offer the best performance gains.

Visual Studio 2010 Professional - Problem Unit-Testing Web Services

这一生的挚爱 提交于 2019-12-24 02:33:32
问题 Have created a very simple Web Service (asmx) in Visual Studio 2010 Professional, and am trying to use the auto-generated unit test cases. I get something that seems quite familiar on this site: The web site could not be configured correctly; getting ASP.NET process information failed. Requesting http://localhost:81/zfp/VSEnterpriseHelper.axd return an error: The remote server returned an error: (500) Internal Server Error. 500 Error Running Visual Studio ASP.NET Unit Test I have tried: 1.

Dynamic Bytecode Instrumentation fails without any error

北慕城南 提交于 2019-12-24 01:07:17
问题 Objective I'm doing dynamic bytecode instrumentation using a JVMTI agent. I have to instrument those methods which are "hot", that is, the methods which invoke JIT compiler. To do so I listen to a CompiledLoadEvent and inside its call back function, call RetransformClasses . This in turn invokes ClassFileLoadHook on the class containing "hot" function and actual instrumentation begins. Problem Premises Currently I'm instrumenting my class to spawn some threads. I also listen to thread starts

Why doesn't ASM call my ``visitCode``?

混江龙づ霸主 提交于 2019-12-24 00:58:54
问题 I'll add my code to the end of this post. I'm using byteBuddy 1.7.9 and whatever ASM version comes with that. In a nutshell I have byte[] rawClass = ...; ClassReader cr = new ClassReader(rawClass); ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES); MethodAdder ma = new MethodAdder(Opcodes.ASM5,cw); cr.accept(ma,ClassReader.EXPAND_FRAMES); Where in MethodAdder , I want to add a static initialiser: @Override public MethodVisitor visitMethod(int access, String name, String desc,

Interacting with the controls of a JavaFX application from a foreign language (Prolog) by means of JNI

大憨熊 提交于 2019-12-24 00:33:56
问题 I would like to interact (as transparently as possible from the Java point of view) with the controls of a JavaFX application from an application in a foreign language (Prolog). Java and Prolog are connected by means of JNI and I have already resolved the JNI interaction issues. My question is: What is the best way to instrument an arbitrary JavaFX application so I could inject code somewhere to invoke a routine in Prolog immediately after the primary Stage has been instantiated ? (so Prolog

Testing that an Activity returns the expected result

大兔子大兔子 提交于 2019-12-23 09:58:43
问题 I have the following Activity: package codeguru.startactivityforresult; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class ChildActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.child); this.resultButton = (Button) this.findViewById(R.id.result_button); this.resultButton.setOnClickListener

How to define string type in getOrInsertFunction() llvm?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 02:36:23
问题 I'm new to llvm and was trying to do instrument. But I found LLVM API only has primitive types, like: getInt32Ty(Ctx).. What i want to do use getOrInsertFunction(),the function argument type is string type.As is known, when argument type is int, we can do it like is : LLVMContext &Ctx = F.getContext(); Constant *logFunc = F.getParent()->getOrInsertFunction( "logop", Type::getVoidTy(Ctx), Type::getInt32Ty(Ctx), NULL ); Type::getInt32Ty(Ctx) is the function argument type (int), what i want to

How do I make the web browser log all activity, including requests, responses, cookie activity, to a log file that I can inspect?

核能气质少年 提交于 2019-12-22 09:56:22
问题 I am debugging a session mismatch problem in a web application. There are several servers involved, and the user is passed between them while holding session tokens and cookies. The coordinating point is the browser. I want to know in detail what actions the browser is taking, basically a client equivalent to the server log. It would be useful to know the details of the HTTP request including what headers were sent, the details of the response, and any actions the browser takes to affect the

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

余生长醉 提交于 2019-12-22 01:57:33
问题 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 Here is ObjectSizeTest's code: public class ObjectSizeTest { public static void main(String[] args) { String s = new String("sai"); System.out.println(ObjectSizeFetcher.getObjectSize(s)); } } MANIFEST.MF (for size.jar):

native java bytecode instrumentation

我是研究僧i 提交于 2019-12-21 05:13:23
问题 for bytecode instrumentation in java, there is the asm framework and the bcel and javaassist libraries. However I need to do instrumentation in native code, since some java classes are already loaded by the time the javaagent runs, eg java.lang.Thread, java.lang.Class, etc is there any library for instrumenting java classes in native code? Edit: Seems there is a bit of confusion. What I want is: Create a native java agent, which uses JVMTI apis to change the bytecode of a class while its