> I am trying to create and port some benchmarks over to gem5 Android.
> I've been basing my efforts on BBench, but I have a few questions
> about its implementation.


> In init.rc, "m5 readfile" is called to read "start_apk.sh". This is
> actually the benchmark script (.rcS) that is passed in from
> Benchmarks.py, so -b bbench passes in "configs/boot/bbench.rcS". On
> boot, the last line in init.rc, executes whatever "start_apk.sh" was
> passed in. I believe I have this part right, if I am missing
> something, clarification would be greatly appreciated.
>

Correct.


> Inside "bbench.rcS", "am start .... " is called, firing the Browser
> activity. My questions regarding BBench implementation are:
>
> 1) How does the browser know to launch /data/bbench/index.html? Has
> the Browser been modified, or is it passed in some other way?
>

The browser's homepage was manually set to the bbench start page. There is
a way to open the browser and set it to a certain page, e.g., am start -a
android.intent.action.VIEW -d    http://gem5.org but this doesn't work for
local pages, i.e., file:/// instead of http://. For some reason the intent
is not recognized by the browser. You can look at the browser's manifest
file and see if you can get it work with file:/// by messing with the
intent filters. I briefly looked into this but wasn't successful. If anyone
else knows how to open a local page in the Android browser from the command
line that would be useful.


> 2) How do you wait for the activity to complete? I see mkfifo is used,
> but I'm not sure that is what causes the full benchmark to run?
>

The fifos are used to prevent allow the benchmark to finish. The fifo is
created with mkfifo(). Then, inside wait_bb_finishfifo() the finish page's
html is written into that fifo. Once bbench reaches the results.html page
it jumps to the finish_fifo.html page. Once this happens the simulator can
proceed.


> In my benchmark, I have created a "test.rcS" as follows:
> am start .....
> /sbin/m5 exit


> However, after the intent is fired for my activity, m5 exit stops the
> simulation before the activity even begins.


am is just a script (see system/bin inside your Android file system). It
will launch the activity but the script itself will return immediately and
hit m5 exit.


> How might I resolve this?
>

You will have to find someway to have the application you're trying to run
call m5 exit when it's finished, or have it trigger some other event that
calls m5 exit. If you have the source for your application it is relatively
easy to have it call m5 exit.

_______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>

-Tony
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to