======================================================================== File I/O Couting (IOC) Library Copyright (C) Information Technology Center, The University of Tokyo 2009, All rights reserved. written by Hitachi, Ltd. ======================================================================== Introduction ============ The IOC library hooks file I/O functions of the GNU C Library (glibc) and supports survey of file I/O timing, amount, and so on. Table of Contests ================= 1. Installation 2. Execution 1. Installation =============== 1.0 Get and unpack the glibc sources [recommend] ------------------------------------------------ The glibc usually hides the internal file I/O functions. You must rebuild the glibc so that the IOC library may hook internal file I/O functions. We recommend you check the version of glibc installed in your system and get a glibc of the same version. For example, if you have unpacked the IOC library sources in `/usr/local/src/libioc-1.0.0', unpack the glibc sources in `/usr/local/src/libioc-1.0.0/glibc'. 1.1 Configure and build the IOC library and utilities ----------------------------------------------------- The IOC library cannot be compiled in the source directory. You must build it in a separate build directory. For example, if you have unpacked the IOC library sources in `/usr/local/src/libioc-1.0.0', create a directory `/usr/local/src/libioc-1.0.0-build' to put the object files in. From your object directory, run the script `configure' located at the top level of the source tree with the option `--disable-hidden-plt'. In the scenario above, you'd type $ ../libioc-1.0.0/configure --disable-hidden-plt The following list describes the available other options for `configure': `--prefix=DIRECTORY' Install the library and utilities in subdirectories of `DIRECTORY'. The default is to install in `/usr/local'. `--with-glibc=DIRECTORY' Specify directory of the glibc sources. If you have got and unpacked the glibc sources, you use this option and specify that diractory. 2. Execution ============ 2.1 Run a program ----------------- It is necessary to use the script `ioc_run' to link the IOC library with your program at run time. In the scenario avobe, you'd type $ /usr/local/bin/ioc_run PROGRAM The following list describes the available options for `ioc_run': `-file FILE' Specify the name of the file that the IOC library outputs. The default is to `ioc_out'. `-file-mode MODE' Specify the unit of the file that the IOC library outputs. The default is to `job'. `-mask MASK' Specify the mask of file I/O functions that the IOC library hooks. `-table-size SIZE' Specify the size (byte) of the table by which the IOC library stores file I/O informations. The default is to `1073741824'. 2.2 Check a result ------------------ It is necessary to use the script `ioc_check_file' to check the file that the IOC library outputs. In the scenario avobe, you'd type $ /usr/local/bin/ioc_check_file ioc_out And you'd get some data files `IOC_*.csv' and an archive file `IOC.tar.gz'. The following list describes the available options for `ioc_check_file': `-tsize SIZE' Specify the unit (msec) of the time step. 2.2.1 Use the Microsoft-Excel ----------------------------- It is necessary to unpack the archive file `IOC.tar.gz' to get the Excel file `IOC.xls'. In addition, you must open `IOC.xls' and input the path of the folder where you unpacked `IOC.tar.gz' to the cell `B2'. And you'd click the button `Setup All' in the sheet `TimingSheet' and check file I/O informations of your program. 2.2.2 Use the Gnuplot --------------------- It is necessary to use the script `ioc_plot_timing' and `ioc_plot_file_access' to check the file file I/O informations of your program. In the scenario avobe, you'd type $ /usr/local/bin/ioc_plot_timing In addition, you'd type $ /usr/local/bin/ioc_plot_file_access -fname FILE The following list describes the available options for `ioc_plot_timing': `-tsize SIZE' Specify the unit (msec) of the time step. And the following list describes the available options for `ioc_plot_file_access': `-fname FILE' Specify the name of the file that your program accesses.