Re: Graphing classloading ?

2014-04-07 Thread Jason van Zyl
You can create an agent that will has a method that will notify you when a 
class is about to be loaded where you can analyze or mutate the class. You 
could build the graph dynamically. A decent introduction that I looked at a 
while ago:

http://blog.javabenchmark.org/2013/05/java-instrumentation-tutorial.html

On Apr 2, 2014, at 3:32 AM, Kristian Rosenvold kristian.rosenv...@gmail.com 
wrote:

 I've been wondering if there exists a java tool that would let me graph
 classloading, so that I can track stuff like this class is being used only
 through this library and that might even be able to give me what-if
 analysis of what would happen if I replaced that specific dependency with
 another alternative. I am thinking about the run-time class loading here,
 not really static analysis.
 
 I am assuming some kind of instrumentation of the linking phase of
 classloading, not even sure it's possible... ?
 
 (I know this is slightly off-topic, but it would certainly be applicable to
 making some plugins faster)
 
 Kristian

Thanks,

Jason

--
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
-

Selfish deeds are the shortest path to self destruction.

 -- The Seven Samuari, Akira Kurosawa











Re: Graphing classloading ?

2014-04-02 Thread Alexander Kriegisch
Kristian,

have you tried AspectJ? It is actually quite easy to write an aspect which can 
do that for you.
-- 
Alexander Kriegisch


Kristian Rosenvold schrieb am 02.04.2014 09:32:

 I've been wondering if there exists a java tool that would let me graph
 classloading, so that I can track stuff like this class is being used only
 through this library and that might even be able to give me what-if
 analysis of what would happen if I replaced that specific dependency with
 another alternative. I am thinking about the run-time class loading here,
 not really static analysis.
 
 I am assuming some kind of instrumentation of the linking phase of
 classloading, not even sure it's possible... ?
 
 (I know this is slightly off-topic, but it would certainly be applicable to
 making some plugins faster)


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: graphing

2006-02-08 Thread Raphaël Piéroni

That's why i do not have started yet.

We should first sort the needs, then choose the appropriate language.

Am i confused or the first thing to do is to create a in memory graph of 
the whole repository by crawling it ?

after, i don't really see what to do.

If we want to query a database with pre known queries, then we could use 
other than prolog, if the queries are to be known only after, then 
maybe, prolog is a good language.


Raphaël


Brett Porter a écrit :


That's an option, but I'd really prefer to look at other options first.
If you do something in prolog, how many other people are going to be
able to work with you on it? Is it something others are going to be able
to quickly understand and modify/improve?

And I need to emphasise again that there is already some code around
that is trying to address this: the discovery and reports components of
the repository manager, and the graphing plugin at mojo.codehaus.org.
How do these relate to the tasks?

I don't mean to discourage it - if you've got an itch, by all means
scratch it and we'll sort it out in the end. Just trying to give the
best chance of being able to reuse it later :)

- Brett

Piéroni Raphaël wrote:
 


To overcome the license issue,
maybe a tool which use a gpl prolog to the queries shown by Steve can be
created at mojo.codehaus.org ?

I don't remember the license policy.

So whatever the means and the licences issues, are we agree about the task
such a tool have to do (the needs expressed by Steve) ?

In advance, thanks for any answer.

Regards,

Raphaël

   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: graphing

2006-02-08 Thread Raphaël Piéroni

Brett,
can you explain me a bit of the repository manager ?
i have found the svn.
so i will try to create an in memory graph (and perhaps in the same time 
a prolog fact base)


In advance thanks for the answer.

Raphaël

Raphaël Piéroni a écrit :


That's why i do not have started yet.

We should first sort the needs, then choose the appropriate language.

Am i confused or the first thing to do is to create a in memory graph 
of the whole repository by crawling it ?

after, i don't really see what to do.

If we want to query a database with pre known queries, then we could 
use other than prolog, if the queries are to be known only after, then 
maybe, prolog is a good language.


Raphaël


Brett Porter a écrit :


That's an option, but I'd really prefer to look at other options first.
If you do something in prolog, how many other people are going to be
able to work with you on it? Is it something others are going to be able
to quickly understand and modify/improve?

And I need to emphasise again that there is already some code around
that is trying to address this: the discovery and reports components of
the repository manager, and the graphing plugin at mojo.codehaus.org.
How do these relate to the tasks?

I don't mean to discourage it - if you've got an itch, by all means
scratch it and we'll sort it out in the end. Just trying to give the
best chance of being able to reuse it later :)

- Brett

Piéroni Raphaël wrote:
 


To overcome the license issue,
maybe a tool which use a gpl prolog to the queries shown by Steve 
can be

created at mojo.codehaus.org ?

I don't remember the license policy.

So whatever the means and the licences issues, are we agree about 
the task

such a tool have to do (the needs expressed by Steve) ?

In advance, thanks for any answer.

Regards,

Raphaël

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: graphing

2006-02-08 Thread Brett Porter
I'll start a new thread repository manager overview

Raphaël Piéroni wrote:
 Brett,
 can you explain me a bit of the repository manager ?
 i have found the svn.
 so i will try to create an in memory graph (and perhaps in the same time
 a prolog fact base)
 
 In advance thanks for the answer.
 
 Raphaël
 
 Raphaël Piéroni a écrit :
 
 That's why i do not have started yet.

 We should first sort the needs, then choose the appropriate language.

 Am i confused or the first thing to do is to create a in memory graph
 of the whole repository by crawling it ?
 after, i don't really see what to do.

 If we want to query a database with pre known queries, then we could
 use other than prolog, if the queries are to be known only after, then
 maybe, prolog is a good language.

 Raphaël


 Brett Porter a écrit :

 That's an option, but I'd really prefer to look at other options first.
 If you do something in prolog, how many other people are going to be
 able to work with you on it? Is it something others are going to be able
 to quickly understand and modify/improve?

 And I need to emphasise again that there is already some code around
 that is trying to address this: the discovery and reports components of
 the repository manager, and the graphing plugin at mojo.codehaus.org.
 How do these relate to the tasks?

 I don't mean to discourage it - if you've got an itch, by all means
 scratch it and we'll sort it out in the end. Just trying to give the
 best chance of being able to reuse it later :)

 - Brett

 Piéroni Raphaël wrote:
  

 To overcome the license issue,
 maybe a tool which use a gpl prolog to the queries shown by Steve
 can be
 created at mojo.codehaus.org ?

 I don't remember the license policy.

 So whatever the means and the licences issues, are we agree about
 the task
 such a tool have to do (the needs expressed by Steve) ?

 In advance, thanks for any answer.

 Regards,

 Raphaël

   


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


  



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]