I got interested in knowing assembly, so I have started reading "Assembly Language Step By Step: Programming With Linux by Jeff Duntemann".
Its too good book and as I never done assemblly this book gave me the path to go unknown world (which I should have been mastered by now, but at-least I have started on it now) and I have written my first "Hello World!" programming that prints "Hello World!" for 10 times :) ya sounds simple...but for me its a great step :)
I started looking into openJDK last year some where around Jan-11, but I am not able to give time for it and I am still struggling with debugging the code and still getting to know the code flows, its like I am still a kid wondering in the forest, I hope I will reach top of the mountain in that forest.
I got so much to learn which are pending :(.....,like still need to be good in algo's, concurrency, Lambda's in java (1.8), NIO (this I never touched, not even theory of it), NLP (using java and phyton).
I hope I will be mastering this all...one day....but ya soon...
Monday, June 4, 2012
Sunday, April 15, 2012
New build system of openJDK (jdk8 master forest) rocks!
Just tried with new build system in OpenJDK (jdk8 master forest) on Windows, now there is no pain as it was with the old build. Just start the build and relax....
If any one interested to try out just check this link "http://openjdk.java.net/projects/build-infra/guide.html"
PS: if you end up with "Defs-utils.gmk: No such file or directory", just go and create a dummy file named "Defs-utils.gmk" in "jdk/makefiles/common/shared"
If any one interested to try out just check this link "http://openjdk.java.net/projects/build-infra/guide.html"
PS: if you end up with "Defs-utils.gmk: No such file or directory", just go and create a dummy file named "Defs-utils.gmk" in "jdk/makefiles/common/shared"
Monday, January 23, 2012
Lesson learnt during writing Java Agent
"Never Use Class Object reference which you want to transform in the 'agent classes' itself".
To understand above sentence, lets take an example if I want to instrument class "com.my.target.Klass1" and some where in agent jar file itself we made a reference to Klass1 object by saying
then this class will not be called for transformation by registered ClassFileTransformer in the agent.
In my case I wanted "Klass1" name so I added code in ClassFileTransformer implementation as below:
and when I made agent jar and wanted to use it for instrumentation, this class (Klass1.class) was no where to be seen. I struggle for hours and noticed that all other classes were called in by ClassFileTransformer implementation and only "Klass1" class was not. I had to change above code not to refer to class object directly. So I removed "Klass1.class" statement and replaced it with complete class name as below
Now it worked like a charm...
To understand above sentence, lets take an example if I want to instrument class "com.my.target.Klass1" and some where in agent jar file itself we made a reference to Klass1 object by saying
"Klass1.class"
then this class will not be called for transformation by registered ClassFileTransformer in the agent.
In my case I wanted "Klass1" name so I added code in ClassFileTransformer implementation as below:
String klassObject = Klass1.class.getName();
and when I made agent jar and wanted to use it for instrumentation, this class (Klass1.class) was no where to be seen. I struggle for hours and noticed that all other classes were called in by ClassFileTransformer implementation and only "Klass1" class was not. I had to change above code not to refer to class object directly. So I removed "Klass1.class" statement and replaced it with complete class name as below
String klassObject = "com.my.target.Klass1";
Now it worked like a charm...
Labels:
agent,
class not called by transform,
java agent
Subscribe to:
Posts (Atom)