TABLE OF CONTENTS
AYUDAME
NAME
AYUDAME - package to communicate between *Ss runtime and external tools
DESCRIPTION
AYUDAME provides a callback function AYU_event() which is called from the *Ss runtime. It processes the information given to it via the function parameters and passes it to clients via sockets.
AYU_event() is declared with __attribute__ ((weak)) in Ayudame.h which has to be included in the runtime. The events and requests are declared in Ayudame_types.h
USAGE
To compile the SMPSs runtime with AYUDAME support, configure SMPSs with --enable-ayudame, to compile without AYUDAME support, use --disable-ayudame. Possibly it is necessary to do a autoreconf to generate the right configure file. Without reconfiguring, you can add/edit the line in master/config.h to
#define USE_AYUDAME 1 // 1 for yes, 0 for no
Finally you have to (re)compile SMPSs with
make clean && make && make install
Additionally one has to compile the libayudame.so. To do so go to the Tools/ayudame directory and perform a simple
make
Run you application (which you compiled with smpss-cc) this way to use the AYUDAME tool:
export AYU_PORT=<port> LD_PRELOAD=/path/to/libayudame.so ./smpss_app
The execution will be paused until a client connects to the AYUDAME library. Alternatively you can run temanejo.py and start the application from there. For details refer to the TEMANEJO documentation.
SIDE EFFECTS
Some ouput is printed to stdout. For quiet operation reroute to file or /dev/null or define AYU_VERBOSE = -1
TODO
- possibility for clients to connect and disconnect whenever
AUTHOR
Steffen Brinkmann, HLRS <brinkmann@hlrs.de>
COPYRIGHT
(C) HLRS, University of Stuttgart AYUDAME is published under the terms of the BSD license.
AYU_event
[ Top ] [ AYUDAME ] [ Functions ]
NAME
AYU_event - callback for the *Ss runtime
SYNOPSIS
AYU_event(event, taskId, pointer)
DESCRIPTION
this function is called from the *Ss runtime to communicate with the AYUDAME package. Events of type ayu_event_t, the task ID of the calling task and a pointer to arbitrary data can be sent. AYU_event will connect to a client via tcp sockets and pass on the information.
PARAMETERS
ayu_event_t event // type of event const int64_t taskId // taskId from which the event is sent void *p // pointer to further data
RETURN VALUE
void
AYU_initSocket
[ Top ] [ AYUDAME ] [ Functions ]
NAME
AYU_initSocket - initialise server side communication for the AYUDAME tool
SYNOPSIS
AYU_initSocket()
DESCRIPTION
Initialises the server side communication for the AYUDAME tool performing the following tasks:
- check for the environment variable AYU_PORT
- create a socket
- bind to the port AYU_PORT
- listen for a client to connect
- accept the client
- set AYU_client to the client handle
PARAMETERS
void
RETURN VALUE
returns 0 on success and -1 on failure
TODO
- possibility for various clients to connect
AYU_rdtsc
[ Top ] [ AYUDAME ] [ Functions ]
NAME
AYU_rdtsc - get cycle count
SYNOPSIS
t = AYU_rdtsc()
DESCRIPTION
return timestamp in cycle counts
PARAMETERS
void
RETURN VALUE
integer number of cycles
AYU_write
[ Top ] [ AYUDAME ] [ Functions ]
NAME
AYU_write - write data to a socket connection
SYNOPSIS
n = AYU_write(c,buf,buf_size)
DESCRIPTION
writes data to a client accessed by a handle
PARAMETERS
int c // client handle void *buf // pointer to data chunk size_t buf_size // size of data chunk in bytes
RETURN VALUE
integer number of sent bytes, -1 on failure