#!/bin/sh
# Script to run the trace daemon while only tracing the core events

TRACER=""

# check for args
if [ $# -ne 2 ]; then
        echo "Usage: ${0##*/} <seconds> <output file basename>"
        exit 1
fi

# check if this is a 2.4 kernel (without relayfs)
if grep "version 2.4" /proc/version > /dev/null; then
        TRACER=/dev/tracer
fi

# activate tracedaemon
tracedaemon -eSTART -eSYS_ENTRY -eSYS_EXIT -eTRAP_ENTRY -eTRAP_EXIT -eIRQ_ENTRY -eIRQ_EXIT -eSCHED -eKTIMER -eSIRQ -ts$1 $TRACER $2.trace $2.proc &
