📄 readme.sdk
字号:
/* * (C) 2001 by Argonne National Laboratory * See COPYRIGHT in top-level directory. *//* * @author Anthony Chan */This package provides both the Runtime and the Software Developmentenvironment for SLOG-2. The runtime environment includes a visualizationtool for slog2 file, i.e. Jumpshot-4, and some utility programs likeslog2print, slog2navigator, and logformat converter like clogTOslog2 or some other trace format to slog2 converter. The development environmentconsists of a Java implementation of SLOG-2 Input/Output APIs, a Java implementation of TRACE-API for CLOG, a reference C implementation of TRACE-API and the JNI interface of TRACE-API and its Java counterparts.The development environment is mainly designed for TRACE-API implementors.For typical end users of SLOG-2, the runtime environment is what youare looking for. The runtime includes the following utility programswhich are located in the bin/ directory after the package is configuredand installed. The programs are jumpshot: A visualization tool for SLOG-2 file.logconvertor A GUI front end for all the logfile convertor.slog2filter A SLOG-2 formating and filtering program.slog2updater A SLOG-2 format update program.slog2print: A SLOG-2 serial printing program, i.e. scalable.slog2navigator: Another SLOG-2 printing program with navigation feature. aka. baby jumpshot.clogprint: A CLOG printing program.clogTOslog2: A CLOG to SLOG-2 converter.traceprint: A custom TRACE printing program.traceTOslog2: A custom TRACE to SLOG-2 converter, this is created only if configure option --with-trace-libdir is used.Each of the programs has a "-h" option to show its usage.The Development environment includes the RunTime environment and theextra directories: src/, trace_sample/ and possibly other trace_xxx/.The doc/ directory contains both the documentation for the runtime anddevelopment environment. The Development environment is Unix basedbut can be used under Windows's cygwin environment.For MS Windows user: As long as a Java2 runtime environment is installed, Jumpshot can be launched with better JVM option by clicking jumpshot_launcher.jar.To TRACE-API implementor:-------------------------The most helpful directory could be trace_sample/ which contains a reference implementation of TRACE-API written in C. The custom TRACE-API implementation converts ASCII definition of drawables(let's call it textlog) and passes those information through TRACE-API.There are 4 programs generated from this package. They are:textlog_print(.exe): C version of textlog print programtextlogprint: Java version of textlog print and time order checking program( with -tc option ).textlog_check_timeorder(.exe): C version of textlog time order checking program.textlogTOslog2: textlog to SLOG-2 convertorAs shown, the subpackage contains two version of TRACE printingprograms. One is written in C and the other is written in Java.They are trace_print.c and Print.java. Both of them are in src/logformat/trace. Each program prints out the content of the tracefile specified in the command line when the program is invoked. The Cversion of TRACE printing program aims to help TRACE-API implementorto debug their TRACE-API implementation. The Java print program invokesthe Java interface of TRACE-API, i.e. JNI, and then calls the actual Cimplementation of TRACE-API through the JNI code in src/logformat/trace/logformat_trace_InputLog.c. So failure of usingthe Java printing program indicates incompatibility between the implementation and the JNI code provided here. Also the Java versionof printing program has a command line option, -tc, which turns on theendtime-order checking code. Since the order of the drawables is passedto TRACE-API is cruical in visualization accuracy of the slog2 file, thetime order checking code further makes sure that the TRACE-API implementation is being done correctly. There is no similar option in Cversion of TRACE printing program. Instead the functionality is providedthrough another C program, trace_check_timeorder.c.In order to avoid duplication of source and ease of maintainenceand support, trace_sample is arranged in a way that only the TRACE-APIimplementation code is located in trace_sample/src. All the filesthat are needed to build a TRACE-API shared library( needed by Java )and utility programs remain in src/logformat/trace. The Makefileuses make's VPATH feature to achieve its goal. These files aretrace_API.h, logformat_trace_InputLog.c, trace_print.c andtrace_check_timeorder.c. In general, developer of TRACE-API onlyneeds to modify variable IMPL_CSRC in trace_sample/src/Makefile.in.IMPL_CSRC defines the C programs needed to build a TRACE-API implementation.If you are interested to modify the name of the utility program liketraceprint and traceTOslog2 to something more meaningful, you needto change TRACE_NAME define configure.in. The TRACE_NAME replacesthe prefix "trace" in traceprint and traceTOslog2. Remember to runautoconf afterward. If you need to add extra system header files tobe checked by autoconf, e.g. through AC_CHECK_HEAEDERS, you need torun autoheader before running autoconf. Since the configure uses libtool to generate shared library, using the suggested infrastructure should increases portability(as well as ease of support from the author)of your TRACE-API implementation.traceprint.jar and traceTOslog2.jar require libTraceInput.so(for Unix)or TraceInput.dll(for Windows) to run. The name of the shared library,TraceInput, has been hardwired into the jar files. That means the sharedlibrary has to be named "TraceInput". For more details, seetrace_sample/src/Makefile.in(or Makefile). Essentially, libTraceInput.soor TraceInput.dll is created by linkingsrc/logformat/trace/logformat_trace_InputLog.o with the object files of theTRACE-API implementation.Recommended Directory structure for custom TRACE-API implementation:--------------------------------------------------------------------It is recommended for all TRACE-API implementors to create a separate directory to develop their TRACE-API implementation, i.e. don't writeany code in any SLOG-2 and Jumpshot directories, i.e. src/. The suggesteddirectory structure is to create new directory, say trace_myformat/, atthe same level at the top level directory, i.e. at the same level asas this README. Under trace_myformat/, there should be subdirectories like src/, include/, bin/, lib/, logfiles/. A reference Makefile, which is located trace_sample/src, serves as a template to interact with the JNI code provided in src/logformat/trace. As usual, all source files, .cand .h, go to src/, or .h files go to include/, all executables built go to bin/, all libraries go to lib/. Any logfiles created should be stored in logfiles/. After the code is fully debugged, and you don'tneed any support from the author, you can move your custom TRACE-API code anywhere you want.Directory structure of the Java code:-------------------------------------Main Java source directories are (all of them are under src/):logformat/clog, logformat/clogTOdrawable, logformat/trace, logformat/slog2and base/drawable and viewer/timelines.logformat/clog: this directory contains a CLOG parser.logformat/clogTOdrawable: this directory contains a CLOG to Drawable converter.logformat/trace: this directory contains Java Native Interface to TRACE-API, i.e. all the required Java and C code to interface between C implementation of TRACE-API and the Java SLOG-2 code.logformat/slog2: this directory contains both the Input and Output API for SLOG-2. Both ClogToSlog2 and TraceToSlog2 converter are defined here. It also defines a SLOG-2 navigator and print programs.base/drawable: this directory contains all the definitions of drawable related classes. The Java interface of TRACE-API is defined here and is in file src/base/drawable/InputAPI.javaviewer/*: this directories are the bulk of the new Jumpshot for SLOG-2.The next important directory is probably the top level lib/ directorywhere all the executable jar files are located. The utility programsmentioned above has its bytecode archived by the following jar fileof the same name. They areslog2filter.jar: executable jar file that filters or modifies the content of the slog2 file, e.g. removal of undesirable categories and their drawables.slog2updater.jar: executable jar file that updates the file with older slog2 format to the latest slog2 format.slog2print.jar: executable jar file prints the slog2 file usage: java -jar slog2print.jar slog2filenameslog2navigator.jar: executable jar file that navigates in the slog2 file usage: java -jar slog2navigator slog2filename traceprint.jar: executable jar file prints the trace file usage: java -Djava.library.path=<location_to_libTraceInput.so> -jar traceprint.jar tracefilenametraceTOslog2.jar: executable jar file converts trace to slog2 file usage: java -Djava.library.path=<location_to_libTraceInput.so> -jar traceTOslog2.jar tracefilenameclogprint.jar: executable jar file prints the clog file usage: java -jar traceprint.jar clogfilenameclogTOslog2.jar: executable jar file converts clog to slog2 file usage: java -jar traceTOslog2.jar clogfilenamejumpshot.jar: executable jar file that visualizes slog2 file and convert clog, rlog and ute files to slog2 file. usage: java -Xms64m -Xmx256m -jar jumpshot.jar [filename]jumpshot_launcher.jar: executable jar file that launchs jumpshot.jar usage:java -jar jumpshot_launcherUsing SLOG2 command line utility programs-----------------------------------------1) Modifocation of SLOG2 File's Structure: slog2filter that can reconfigure slog2 treenode features, like tree leaf size and number of child nodes per parent node through command like e.g. slog2filter -ls 128k flash2.slog2 which will create a flash2.slog2.slog2 file with slog2 leaf size = 128k instead of the default 64k. This is useful to readjust the number of preview bands in Jumpshot if the default one does not produce a desirable view in Jumpshot.2) Print Specific Information of SLOG2 File: a) slog2print prints drawables in the 4 time orders as listed by "slog2print -h". b) Also, slog2print can print specific features of slog2 file, like CategoryMap, DirectoryTree, Y-Coordinate Map.... e.g. slog2print -c flash2.slog2 which prints the CategoryMap of flash2.slog23) Removal of Undesirable Categories of Drawables: slog2filter can delete specific categories of drawables. i.e. using "slog2print -c" to identify the category indexes of undesirable drawables, say id1,id2,...idN. Then do slog2repair -r id1,id2,...idN -o new_flash2.slog2 flash2.slog2 which will create a new_flash2.slog2 file that does not have drawables with category indexes, id1,id2,...idN, and with similar file structure as the original one.4) Format Updater: slog2updater updates the logfile with older slog2 format to the latest one. slog2filter -o fpilog_new.slog2 fpilog_old.slog2 which converts the fpilog_old.slog2 with older slog2 format to the latest one named fpilog_new.slog2.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -