Hi , I am a student trying to work on some open source project. I recently visited the foss.in and found DTrace very interesting. I have few questions on that. Could anybody help me out please ? 1) I have red hat linux box. Where can I get the source code of DTrace alone, for that Linux? 2) Can I compile on Linux box and run it using BrandZ, Is there any instruction to compile the code ? 3) Should I have to download the code of BrandZ and compile that too for running it on Linux ? Please, quick answer would be good as I can proceed further ? Thanks and Regards, Gracy.
Hi Gracy, Gracy F wrote:> Hi , > I am a student trying to work on some open source project. I > recently visited the foss.in and found DTrace very interesting. > I have few questions on that. Could anybody help me out please ? > > 1) I have red hat linux box. Where can I get the source code of > DTrace alone, for that Linux?I don''t think DTrace has been, nor will be, ported to Linux. Does your project require the use of Linux? Why not use OpenSolaris?> 2) Can I compile on Linux box and run it using BrandZ, Is there any > instruction to compile the code ?Have a look around http://opensolaris.org. I''m sure build instructions are available there. BrandZ is meant to allow Linux apps on Solaris, not the other way around.> 3) Should I have to download the code of BrandZ and compile that > too for running it on Linux ? >See above.> Please, quick answer would be good as I can proceed further ? > > > Thanks and Regards, > Gracy. > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Zoram Thanga, Sun Cluster Development Tell me, O Octopus, I begs, Is those things arms, or is they legs? I marvel at thee, Octopus; If I were thou, I''d call me us. -- Ogden Nash
>1) I have red hat linux box. Where can I get the source code of >DTrace alone, for that Linux? > >DTrace has not been ported to Linux. /jim>2) Can I compile on Linux box and run it using BrandZ, Is there any >instruction to compile the code ? >3) Should I have to download the code of BrandZ and compile that >too for running it on Linux ? > > Please, quick answer would be good as I can proceed further ? > > >Thanks and Regards, >Gracy. >_______________________________________________ >dtrace-discuss mailing list >dtrace-discuss at opensolaris.org > >
Hi , Thanks for the information. I have downloaded the opensolaris-gcc-support-20050614.i386.tar.bz2 from open solaris site and went through that. 1) How is the code base organised in Solaris ? 2) Does the opensolaris-gcc-support-20050614.i386.tar.bz2 contains the complete source code of the Solaris kernel and Dtrace ? 3) Which is the source code path for these in opensolaris-gcc-support-20050614.i386.tar.bz2 ? 4) Where can I know about the archietecture and internals of solaris kernel ? Which documents gives me those information . Can anybody provide me the links I am interested to know about DTrace source code. 5) Where do I begin, to understand the DTrace source ? 6) Which path of the source tree has DTrace code ? 7) I read about Dlanguage and Dcomplier what are these ? Is DTrace written in such unique language or it is C language only. Does it involve a deep kernel interaction and kernel level coding ? Does it involves lex and yacc ? 8) I found few .c files in /usr/src/uts/comm/dtrace in opensolaris-gcc-support-20050614.i386.tar.bz2, is that the only files of Dtrace. 9) If no, where can I find the remaining files and does opensolaris-gcc-support-20050614.i386.tar.bz2 contains complete source code of DTrace ? 10 ) How many libraries are invloved and where can I get those informations from ? Thanks and Regards, Gracy. On 12/19/05, Nils Nieuwejaar <nils.nieuwejaar at sun.com> wrote:> On Mon 12/19/05 at 14:52 PM, gracy.f at gmail.com wrote: > > Hi , > > I am a student trying to work on some open source project. I > > recently visited the foss.in and found DTrace very interesting. > > I have few questions on that. Could anybody help me out please ? > > > > 1) I have red hat linux box. Where can I get the source code of > > DTrace alone, for that Linux? > > DTrace is intimately integrated with Solaris. There is no way to extract > just DTrace and try to apply it to a Linux system - even assuming the > licenses allowed it. > > > 2) Can I compile on Linux box and run it using BrandZ, Is there any > > instruction to compile the code ? > > No. BrandZ allows you to run Linux applications on Solaris. It does not > allow you to do anything with your Linux system. (except reinstall it with > Solaris :) > > BrandZ does allow you to use DTrace to probe your Linux applications, but > you have to be running on a Solaris system. > > > 3) Should I have to download the code of BrandZ and compile that > > too for running it on Linux ? > > No. See 1 and 2. > >
On Tue, Dec 20, 2005 at 12:55:11PM +0530, Gracy F wrote:> Thanks for the information. I have downloaded the > opensolaris-gcc-support-20050614.i386.tar.bz2 from open solaris site > and went through that.This tarball contains a limited number of tools required only to build old OpenSolaris ON sources with gcc on Solaris 10. It is not required (and will not work) to build on more recent installations; recent sources require at least build 22 to build with gcc. See http://opensolaris.org/os/community/tools/gcc/build_instr/ if you want to do this.> 1) How is the code base organised in Solaris ?See the developer''s reference, section 3 at http://opensolaris.org/os/community/onnv/devref_toc/devref_3a/ and the source browser at http://cvs.opensolaris.org/source/ for starters.> 2) Does the opensolaris-gcc-support-20050614.i386.tar.bz2 contains the > complete source code of the Solaris kernel and Dtrace ?No. It contains no source code at all. As documented at the location above, this file should no longer be used for any purpose.> 3) Which is the source code path for these in > opensolaris-gcc-support-20050614.i386.tar.bz2 ?There is none. You need the source tarball if you want the source.> 4) Where can I know about the archietecture and internals of solaris > kernel ? Which documents gives me those information . Can anybody > provide me the links > I am interested to know about DTrace source code.For DTrace, check out the DTrace community pages at http://opensolaris.org/os/community/dtrace/. The DTrace Guide includes some of this information, such as you would need to implement a new provider. Of course the source is the best guide; look at http://cvs.opensolaris.org/source/xref/on/usr/src/uts/common/dtrace/ and http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libdtrace/. The consumer program is in http://cvs.opensolaris.org/source/xref/on/usr/src/cmd/dtrace/.> 5) Where do I begin, to understand the DTrace source ?See (4).> 6) Which path of the source tree has DTrace code ?See (4).> 7) I read about Dlanguage and Dcomplier what are these ? Is DTrace > written in such unique language or it is C language only. Does it > involve a deep kernel interaction and kernel level coding ? Does it > involves lex and yacc ?DTrace itself is written in C (with a yacc grammar; see dt_grammar.y and dt_lex.l). The D language is used to specify which probes to enable and the actions you want taken when one fires. DTrace is intimately integrated into the kernel; it needs knowledge of kernel implementation details to manipulate probe points, among other things.> 8) I found few .c files in /usr/src/uts/comm/dtrace in > opensolaris-gcc-support-20050614.i386.tar.bz2, is that the only files > of Dtrace.No, you didn''t. That tar file contains no DTrace code nor a usr/src directory. Perhaps you mean the opensolaris-src-XXX.tar.bz2 file?> 9) If no, where can I find the remaining files and does > opensolaris-gcc-support-20050614.i386.tar.bz2 contains complete source > code of DTrace ?See (4). The files can also be found under usr/src in the opensolaris-src-XXX.tar.bz2 archive.> 10 ) How many libraries are invloved and where can I get those > informations from ?See (4). The makefiles include appropriate linker arguments for the required library dependencies. The source for these libraries can also be found in the OpenSolaris ON source tarballs and in the source browser linked above. To download the correct source files, see http://opensolaris.org/os/downloads/. The 20050614 files are obsolete; you should almost certainly be looking at the most recent release, which is now 20051219, corresponding to build 29. -- Keith M Wesolowski "Sir, we''re surrounded!" Solaris Kernel Team "Excellent; we can attack in any direction!"
On Tue, Dec 20, 2005 at 12:55:11PM +0530, Gracy F wrote:> Hi , > Thanks for the information. I have downloaded the > opensolaris-gcc-support-20050614.i386.tar.bz2 from open solaris site > and went through that.That''s the "gcc support" tarball. You really want opensolaris-src-*.tar.bz2.> 1) How is the code base organised in Solaris ?Doing a Google search for ''dtrace source'' had, as it''s fifth result: http://blogs.sun.com/bmc/20050125 which has a nice description of the structure. I''d recommend browsing using http://cvs.opensolaris.org/. - jonathan -- Jonathan Adams, Solaris Kernel Development
Wow - Lots of question with potentially very long answers here! :^) http://cvs.opensolaris.org/source/ - this is a good place to start to understand the directory structure and layout of the source tree. The internals of Solaris are described in "Solaris Internals" (Prentice Hall, 0-13-022496-0). The current edition is somewhat dated, and does not cover Solaris 10 (it stops at Solaris 7). It is still applicable to some extent. The updated second edition for Solaris 10 should be out in a couple months (Feb/Mar 2006). Before you embark on your journey through the DTrace source (a fascinating journey to be sure), I would suggest you first read the Solaris Dynamic Tracing Guide (available off docs.sun.com), and learn to use DTrace. You''ll develop mucher deeper appreciation for the power and sophistication of DTrace as you explore the mysteries it can unravel, and it''ll give source browsing some context for you. Bryan Cantrill wrote some detailed blogs on DTrace, along with some great write-ups on the organization of the source code. I would urge you to read those blogs, as well as blogs by Adam Leventhal, Mike Shapiro, Jon Haslam, and others I can''t recall right now (sorry - I''m getting old, I have kids, etc)... :^) blogs.sun.com The level of integration of DTrace with the kernel is, well, about as integrated as a piece of software can get! There is not one location (one top level directory) that contains all the DTrace source code. Good luck going forward. I think there''s enough here to get you to a good start, and keep you busy for a while. Happy holidays. /jim>1) How is the code base organised in Solaris ? >2) Does the opensolaris-gcc-support-20050614.i386.tar.bz2 contains the >complete source code of the Solaris kernel and Dtrace ? >3) Which is the source code path for these in >opensolaris-gcc-support-20050614.i386.tar.bz2 ? >4) Where can I know about the archietecture and internals of solaris >kernel ? Which documents gives me those information . Can anybody >provide me the links >I am interested to know about DTrace source code. >5) Where do I begin, to understand the DTrace source ? >6) Which path of the source tree has DTrace code ? >7) I read about Dlanguage and Dcomplier what are these ? Is DTrace >written in such unique language or it is C language only. Does it >involve a deep kernel interaction and kernel level coding ? Does it >involves lex and yacc ? >8) I found few .c files in /usr/src/uts/comm/dtrace in >opensolaris-gcc-support-20050614.i386.tar.bz2, is that the only files >of Dtrace. >9) If no, where can I find the remaining files and does >opensolaris-gcc-support-20050614.i386.tar.bz2 contains complete source >code of DTrace ? >10 ) How many libraries are invloved and where can I get those >informations from ? > >Thanks and Regards, >Gracy. > > > >On 12/19/05, Nils Nieuwejaar <nils.nieuwejaar at sun.com> wrote: > > >>On Mon 12/19/05 at 14:52 PM, gracy.f at gmail.com wrote: >> >> >>>Hi , >>> I am a student trying to work on some open source project. I >>>recently visited the foss.in and found DTrace very interesting. >>>I have few questions on that. Could anybody help me out please ? >>> >>>1) I have red hat linux box. Where can I get the source code of >>>DTrace alone, for that Linux? >>> >>> >>DTrace is intimately integrated with Solaris. There is no way to extract >>just DTrace and try to apply it to a Linux system - even assuming the >>licenses allowed it. >> >> >> >>>2) Can I compile on Linux box and run it using BrandZ, Is there any >>>instruction to compile the code ? >>> >>> >>No. BrandZ allows you to run Linux applications on Solaris. It does not >>allow you to do anything with your Linux system. (except reinstall it with >>Solaris :) >> >>BrandZ does allow you to use DTrace to probe your Linux applications, but >>you have to be running on a Solaris system. >> >> >> >>>3) Should I have to download the code of BrandZ and compile that >>>too for running it on Linux ? >>> >>> >>No. See 1 and 2. >> >> >> >> >_______________________________________________ >dtrace-discuss mailing list >dtrace-discuss at opensolaris.org > >