|
Packit |
577717 |
COMPONENT
|
|
Packit |
577717 |
|
|
Packit |
577717 |
appio
|
|
Packit |
577717 |
|
|
Packit |
577717 |
SUMMARY
|
|
Packit |
577717 |
|
|
Packit |
577717 |
Application I/O component
|
|
Packit |
577717 |
|
|
Packit |
577717 |
DESCRIPTION
|
|
Packit |
577717 |
|
|
Packit |
577717 |
This application I/O component enables PAPI-C to determine
|
|
Packit |
577717 |
I/O used by the application. This is to be distinguished
|
|
Packit |
577717 |
from system-wide I/O statistics. The goal of this component
|
|
Packit |
577717 |
is to help the programmer attribute the I/O (read/write) to
|
|
Packit |
577717 |
files and sockets, to the source code.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
Listed below are the events measured by the component:
|
|
Packit |
577717 |
|
|
Packit |
577717 |
Event names
|
|
Packit |
577717 |
-----------
|
|
Packit |
577717 |
READ_BYTES READ_CALLS READ_ERR READ_INTERRUPTED READ_WOULD_BLOCK READ_SHORT READ_EOF READ_BLOCK_SIZE READ_USEC
|
|
Packit |
577717 |
WRITE_BYTES WRITE_CALLS WRITE_ERR WRITE_INTERRUPTED WRITE_WOULD_BLOCK WRITE_SHORT WRITE_BLOCK_SIZE WRITE_USEC
|
|
Packit |
577717 |
OPEN_CALLS OPEN_ERR OPEN_FDS
|
|
Packit |
577717 |
SELECT_USEC
|
|
Packit |
577717 |
RECV_BYTES RECV_CALLS RECV_ERR RECV_INTERRUPTED RECV_WOULD_BLOCK RECV_SHORT RECV_EOF RECV_BLOCK_SIZE RECV_USEC
|
|
Packit |
577717 |
|
|
Packit |
577717 |
SOCK_READ_BYTES SOCK_READ_CALLS SOCK_READ_ERR SOCK_READ_SHORT SOCK_READ_WOULD_BLOCK SOCK_READ_USEC
|
|
Packit |
577717 |
SOCK_WRITE_BYTES SOCK_WRITE_CALLS SOCK_WRITE_ERR SOCK_WRITE_SHORT SOCK_WRITE_WOULD_BLOCK SOCK_WRITE_USEC
|
|
Packit |
577717 |
|
|
Packit |
577717 |
SEEK_CALLS SEEK_ABS_BLOCK_SIZE SEEK_USEC
|
|
Packit |
577717 |
|
|
Packit |
577717 |
The component works by intercepting I/O system calls on Linux. At present,
|
|
Packit |
577717 |
the code uses a features available in libc on Linux, and is unlikely to
|
|
Packit |
577717 |
work on other platforms without modifications. The code works for static
|
|
Packit |
577717 |
and shared executables.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
The component has been tested on 32 and 64-bit Linux. It's also been tested
|
|
Packit |
577717 |
to work for multithreaded programs.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
Limitations and future work:
|
|
Packit |
577717 |
---------------------------
|
|
Packit |
577717 |
The most important aspect to note is that the code is likely to only work on
|
|
Packit |
577717 |
Linux, given the low-level dependencies on libc features.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
At present the component intercepts the open(), close(), read(), write(),
|
|
Packit |
577717 |
fread() and fwrite(). In the future it's expected that these will be expanded
|
|
Packit |
577717 |
to cover lseek(), select(), other I/O calls.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
While READ_* and WRITE_* calls will not distinguish between file and network
|
|
Packit |
577717 |
I/O, the user can explicitly determine network statistics using SOCK_* calls.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
Threads are handled using thread-specific structures in the backend. However, no
|
|
Packit |
577717 |
aggregation is currently performed across threads. There is also NO global structure
|
|
Packit |
577717 |
that has the statistics of all the threads. This means the user can call
|
|
Packit |
577717 |
a PAPI read to get statitics for a running thread. However, if the thread has
|
|
Packit |
577717 |
joined, then it's statistics can no longer be queried.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
TESTING:
|
|
Packit |
577717 |
-------
|
|
Packit |
577717 |
Tests lie in the tests/ sub-directory. All but one test take no argument.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
The iozone test (appio_test_iozone) needs arguments just like iozone does.
|
|
Packit |
577717 |
It is not built by default as part of the PAPI tests. To build it:
|
|
Packit |
577717 |
cd appio/tests; make appio_test_iozone
|
|
Packit |
577717 |
An example run for the iozone test could be:
|
|
Packit |
577717 |
./appio_test_iozone -s 100m -r 64 -i 0 -i 1 -t 1
|
|
Packit |
577717 |
|
|
Packit |
577717 |
|
|
Packit |
577717 |
AUTHOR
|
|
Packit |
577717 |
|
|
Packit |
577717 |
The code is written by Tushar Mohan <tusharmohan@gmail.com> and
|
|
Packit |
577717 |
Philip Mucci <mucci@eecs.utk.edu>. The component leverages code
|
|
Packit |
577717 |
written by Jose Pedro Oliveira <jpo@di.uminho.pt> for the PAPI
|
|
Packit |
577717 |
net component.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
SEE ALSO
|
|
Packit |
577717 |
|
|
Packit |
577717 |
|
|
Packit |
577717 |
# vim:set ai ts=4 sw=4 sts=4 et:
|