rendered paste body#!/bin/sh
echo "INIT OPROFILE..."
sudo opcontrol --no-vmlinux
sudo opcontrol --init
sudo opcontrol -s
sudo opcontrol -d
sudo opcontrol --reset
echo "RUN TEST APP..."
$@
echo "RUN DONE."
sudo opcontrol -t
echo "WRITING PROFILE: oprof.txt"
opreport -l > oprof.txt
echo "DONE."
titan@titan-laptop:~$ ./oprof ephoto
INIT OPROFILE...
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
/usr/bin/opcontrol: 1: arith: syntax error: "NR_CHOSEN - 1"
No events given.
Unable to complete dump of oprofile data: is the oprofile daemon running?
RUN TEST APP...
RUN DONE.
Daemon not running
WRITING PROFILE: oprof.txt
opreport error: No sample file found: try running opcontrol --dump
or specify a session containing sample files
DONE.