For the purposes of this guide, YourKit has been installed into /opt/yjp-9.5.4. Note that YourKit has a default filter which excludes org.eclipse.*, so if you would like to profile the internals of Virgo then you'll need to disable this filter.įor a detailed break down of this process, please see the section below related to your operating system. The setup is simple and apart from adding the appropriate JVM options (described on the YourKit site) to JAVA_OPTS, all that is necessary is to add com.yourkit.* to the property in lib/java6-server.profile. It is arranged that any exit from a method will be traced if its entry is, even if that was the result of an exception, so the entry and exit lines should always pair. main and < respectively, with the full class names of the method and its parameters supplied. You will see entries in the serviceability/log/log*.log files like this: main > public static boolean .() So, to see these entries you need to set the logging level to DEBUG or higher for the areas you are interested in. 'Getter' and 'Setter' methods (those beginning with get and set) are not traced at any level. It traces entry and exit points at two levels: DEBUG for all public methods and TRACE for all other methods (package private and private). The entry and exit level tracing aspects are carefully woven into the kernel and the server code ( web) to avoid the logging code itself (recursion) and the low-level utility functions ( util and osgi-extensions). These aspects are woven into the rest of the code so that they don't have to code them themselves. Medic (one of the Virgo repositories) is designed to set up logging, tracing and dumping, for use by the rest of the code, and achieves this partly by weaving in aspects that perform tracing at the entry and exit points of methods. This is reasonable: if a log entry is made at INFO level, one expects this to appear in the log under normal circumstances. In the default serviceability.xml file the root logging level is INFO. For more information see the Logback configuration on-line documentation. The serviceability.xml file is just a logback configuration file, and all the Logback functionality is available. In the standard serviceability.xml file the appenders used here write to "rolling log files" which are based upon size so the total amount of logged information is bounded, though the log you choose can be swamped with information from one source. Which is pretty verbose, so be aware that the log file may become quite large very quickly. In this case the sort of output you might see is (actual paths have been replaced): fs-watcher. pickup - before check:įileList(): This puts debug information in the log.log file in serviceability/logs/virgo-kernel directory.Īlternatively, set appender-ref ref="LOG_FILE" and the debug information goes in the general log.log file in the serviceability/logs directory. In serviceability.xml in the config directory simply add the following: Īfter the other logger specifications and before the root tag. We illustrate this with a FileSystemChecker debug trace, which is part of the HotDeployer system. It is possible to turn on logging at various levels for specific classes (loggers) in Virgo. Type ' vsh help' to see a list of the shell commands available. When running in the user region, the Virgo shell commands are offered via the ' vsh' command. The most useful commands are ' ss' to list all bundles, ' bundle ' to display information about the bundle with bundle id ' ', and ' help' to see other commands. You can even enable an Equinox console in both regions at once, using two different ports of course. In the case of the kernel region, add this property to the file lib/.launch.properties. In the case of the user region, add this property to the file config/.userregion.properties. To enable an Equinox console, you need to set a framework property, like this: Virgo offers shell commands to the user region Equinox Console for slightly more friendly inspection of user region artefacts. The Equinox Console is useful for examining either the kernel framework or the user region framework.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |