Is there a simple way that I can do some introspection on an image file without loading it as the current image for the VM? Specifically, I want to query the classes, methods, packages, etc loaded into the image for documentation purposes, for example from a previous version of an image saved as a snapshot.
Is there a way I can do this with built-in functionality? It's easy on the running image, but I don't want to actually load a new VM with an image to check its contents. Would it be possible to use AST or anything like that worst case? Thanks. |
not right now.
you could open an the changes file with from another image or use rst to query objects in an image from another one. Stef On Nov 4, 2010, at 9:38 PM, YossiDM wrote: > > Is there a simple way that I can do some introspection on an image file > without loading it as the current image for the VM? Specifically, I want to > query the classes, methods, packages, etc loaded into the image for > documentation purposes, for example from a previous version of an image > saved as a snapshot. > > Is there a way I can do this with built-in functionality? It's easy on the > running image, but I don't want to actually load a new VM with an image to > check its contents. Would it be possible to use AST or anything like that > worst case? > > Thanks. > -- > View this message in context: http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027736.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > |
In reply to this post by YossiDM
On Thu, Nov 4, 2010 at 1:38 PM, YossiDM <[hidden email]> wrote:
very recently someone posted a link to a complete visualization of an image to pdf, I think on the squeak list. So yes, there are tools to do this. You can also load an image using the VMMaker and analyse it in that. Of course a really nice ay would be a mirror interface to the image so one could use standard tools to inspect it, but that's real work.
HTH Eliot
|
In reply to this post by Stéphane Ducasse
Thanks. I suspected as much. Any plans to implement anything like this?
We are currently using the .changes file, but we will perhaps instead take a custom snap shot of the data into a specific data structure and persist it before we turn off the image. As you can imagine, getting this information is useful in all kinds of project management and build tools. I'd rather get it dynamically of course. Imagine in Hudson for instance if you could take a look at what was inside the image without downloading it. Maybe not useful to everyone, but in our context it certainly would be, especially for dashboards and metrics on code. We're also doing this with mcz files, but sometimes we want the last state of the image which may not have included proper packaging on some of the code. I'll be sure to share any of the tools we create, but it's still awhile off since there's a lot of work we need to do. |
In reply to this post by Eliot Miranda-2
Thanks, I'll try to dig that up - sounds like a good starting point. I am definitely looking to do the second option you mentioned which is to mirror the image so I can just use standard tools. Our app is mainly from seaside, so that would be the ideal way for me, though I can imagine us doing some things inside the image in morphic as well. I could batch out analysis as a job of some kind, but I would rather have real-time analysis.
|
In reply to this post by Stéphane Ducasse
nick is starting to work on cross compilation toolset and remote debugger in the context of robots
but I imagine that his work should let us access remote images. Having an API would be good to be able to query the system and get some information Now orthogonally what we will start to work on and people can help is the following: - we want an object-oriented structural and semantics model of the source code to be versioned in some ways (probably a gemstone db but it could be something else) - we want to have all the code of Squeak and Pharo in that infrastructure so that we can query everything we like. - Other applications should be able to use the same infrastructure for their project. On Nov 4, 2010, at 10:17 PM, YossiDM wrote: > > Thanks. I suspected as much. Any plans to implement anything like this? > > We are currently using the .changes file, but we will perhaps instead take a > custom snap shot of the data into a specific data structure and persist it > before we turn off the image. As you can imagine, getting this information > is useful in all kinds of project management and build tools. I'd rather get > it dynamically of course. Imagine in Hudson for instance if you could take a > look at what was inside the image without downloading it. Maybe not useful > to everyone, but in our context it certainly would be, especially for > dashboards and metrics on code. We're also doing this with mcz files, but > sometimes we want the last state of the image which may not have included > proper packaging on some of the code. we want to run moose on mcz packages :) > > I'll be sure to share any of the tools we create, but it's still awhile off > since there's a lot of work we need to do. > -- > View this message in context: http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027806.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > |
In reply to this post by Eliot Miranda-2
pavel sent a graphiz image.
On Nov 4, 2010, at 11:02 PM, YossiDM wrote: > > Thanks, I'll try to dig that up - sounds like a good starting point. I am > definitely looking to do the second option you mentioned which is to mirror > the image so I can just use standard tools. Our app is mainly from seaside, > so that would be the ideal way for me, though I can imagine us doing some > things inside the image in morphic as well. I could batch out analysis as a > job of some kind, but I would rather have real-time analysis. > > > Eliot Miranda-2 wrote: >> >> >> >> very recently someone posted a link to a complete visualization of an >> image >> to pdf, I think on the squeak list. So yes, there are tools to do this. >> You can also load an image using the VMMaker and analyse it in that. Of >> course a really nice ay would be a mirror interface to the image so one >> could use standard tools to inspect it, but that's real work. >> >> HTH >> Eliot >> >> >>> >>> Thanks. >>> -- >>> View this message in context: >>> http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027736.html >>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com. >>> >>> >> >> > > -- > View this message in context: http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027872.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > |
In reply to this post by Eliot Miranda-2
Yossi did you try Moose?
Because moose is a softare analysis platform to build browser and dashboards :) We are working on making sure that Moose built on pharo can analyse pharo itself. This is working but we want to make sure that we can running Moose 4.1 in pharo 1.2 analysing pharo 1.3 unstable. Stef On Nov 4, 2010, at 11:02 PM, YossiDM wrote: > > Thanks, I'll try to dig that up - sounds like a good starting point. I am > definitely looking to do the second option you mentioned which is to mirror > the image so I can just use standard tools. Our app is mainly from seaside, > so that would be the ideal way for me, though I can imagine us doing some > things inside the image in morphic as well. I could batch out analysis as a > job of some kind, but I would rather have real-time analysis. > > > Eliot Miranda-2 wrote: >> >> >> >> very recently someone posted a link to a complete visualization of an >> image >> to pdf, I think on the squeak list. So yes, there are tools to do this. >> You can also load an image using the VMMaker and analyse it in that. Of >> course a really nice ay would be a mirror interface to the image so one >> could use standard tools to inspect it, but that's real work. >> >> HTH >> Eliot >> >> >>> >>> Thanks. >>> -- >>> View this message in context: >>> http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027736.html >>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com. >>> >>> >> >> > > -- > View this message in context: http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027872.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > |
Stéphane,
Yes, we are definitely going to use Moose at some point and I have spent some time with it, but it is lower on our list of priorities. Not because there is anything bad about Moose, but rather we are trying to be pragmatic about our development scope. Moose is really extensive which is a good thing, but our original goal has already gotten far too ambitious in that we were doing introspection for learning, but now it's developing into a huge project on its own. I'll go into this later. The other piece is that we're looking to do a lot from a web interface and I know the models are applicable from Moose, but I am not so sure about all the visualizations (perhaps the models to generate the visualizations for sure). We are also looking at Glamour in conjunction with all of this. I think it will help to explain what we're doing and why and then maybe you can make recommendations based on your experiences. I'll start a new thread so as not to go off on a huge tangent. Thanks.
|
In reply to this post by Stéphane Ducasse
Hi,
you need to run the image to get its ImageMap or ImageGraph. However in times of Squeak 3.6 there was a tool named ImageBrowser (http://www.is.titech.ac.jp/~ohshima/squeak/sm/ImageBrowser3.6.1.cs.gz). You can browse specified classes from the image file using this tool. Unfortunately it works only for Squeak 3.6. I tried it now and it really works but it is obsolete. I'm not sure how hard it would be to update it for current image format. -- Pavel On Thu, Nov 4, 2010 at 11:18 PM, Stéphane Ducasse <[hidden email]> wrote: > pavel sent a graphiz image. > > > On Nov 4, 2010, at 11:02 PM, YossiDM wrote: > >> >> Thanks, I'll try to dig that up - sounds like a good starting point. I am >> definitely looking to do the second option you mentioned which is to mirror >> the image so I can just use standard tools. Our app is mainly from seaside, >> so that would be the ideal way for me, though I can imagine us doing some >> things inside the image in morphic as well. I could batch out analysis as a >> job of some kind, but I would rather have real-time analysis. >> >> >> Eliot Miranda-2 wrote: >>> >>> >>> >>> very recently someone posted a link to a complete visualization of an >>> image >>> to pdf, I think on the squeak list. So yes, there are tools to do this. >>> You can also load an image using the VMMaker and analyse it in that. Of >>> course a really nice ay would be a mirror interface to the image so one >>> could use standard tools to inspect it, but that's real work. >>> >>> HTH >>> Eliot >>> >>> >>>> >>>> Thanks. >>>> -- >>>> View this message in context: >>>> http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027736.html >>>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com. >>>> >>>> >>> >>> >> >> -- >> View this message in context: http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027872.html >> Sent from the Pharo Smalltalk mailing list archive at Nabble.com. >> > > > |
Pavel,
Thanks! This is at least a start so it might be helpful even if we don't update it directly.
|
In reply to this post by YossiDM
Hi Yossi,
From the brief description it does look like Moose can offer several parts that might be of interest. The best way to ask for information or help regarding Moose is on the Moose mailing list: http://www.moosetechnology.org/about/contact Cheers, Doru On 5 Nov 2010, at 00:13, YossiDM wrote: > > Stéphane, > > Yes, we are definitely going to use Moose at some point and I have spent > some time with it, but it is lower on our list of priorities. Not because > there is anything bad about Moose, but rather we are trying to be pragmatic > about our development scope. Moose is really extensive which is a good > thing, but our original goal has already gotten far too ambitious in that we > were doing introspection for learning, but now it's developing into a huge > project on its own. I'll go into this later. > > The other piece is that we're looking to do a lot from a web interface and I > know the models are applicable from Moose, but I am not so sure about all > the visualizations (perhaps the models to generate the visualizations for > sure). We are also looking at Glamour in conjunction with all of this. > > I think it will help to explain what we're doing and why and then maybe you > can make recommendations based on your experiences. I'll start a new thread > so as not to go off on a huge tangent. Thanks. > > > Stéphane Ducasse wrote: >> >> Yossi did you try Moose? >> Because moose is a softare analysis platform to build browser and >> dashboards :) >> We are working on making sure that Moose built on pharo can analyse pharo >> itself. This is working >> but we want to make sure that we can running Moose 4.1 in pharo 1.2 >> analysing pharo 1.3 unstable. >> > > -- > View this message in context: http://forum.world.st/Introspection-on-saved-image-file-tp3027736p3027943.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > -- www.tudorgirba.com "To lead is not to demand things, it is to make them happen." |
In reply to this post by YossiDM
Hi Yossi-- I've done a lot of work with object memory visualization; check out http://netjam.org/spoon/viz/. I'd be happy to discuss it further. greetings, -C -- Craig Latta www.netjam.org/resume + 31 020 894 6247 + 1 415 287 3547 |
Free forum by Nabble | Edit this page |