1

I know it's possible to run Java workbenches on Gem5 (http://www.gem5.org/Main_Page) simulator for ARM architecture.

I want to run a simulation of a Java application on ISA x86, is this possible?

Thanks for helping me.

N33D
  • 135
  • 1
  • 7
  • 1
    Full system or syscall emulation? Why wouldn't it be possible in full system, where is you simulate everything pretty accurately? :-) Get some Ubuntu based image, use QEMU to apt-get install Java, hack up the initrd, then boot it on gem5. I will automate and explain those steps better one day. – Ciro Santilli Aug 27 '18 at 19:58
  • http://www.gem5.org/Main_Page says it can boot "unmodified Linux and Android" on its ARM simulator, so yes of course it can run Java under that. – Peter Cordes Aug 27 '18 at 21:35
  • @PeterCordes for my project it's important to simulate x86 architecture! Not ARM. – N33D Aug 29 '18 at 06:53
  • @ciro-santilli could please you explain me this steps? I only found the dacapo bench for ARM ISA on the gem5 webpage: http://gem5.org/DaCapo_benchmarks – N33D Sep 10 '18 at 14:08
  • @N33D I will automate this when I get some time, and ping it here. But for now, if you google every step I mentioned, you will get there. – Ciro Santilli Sep 10 '18 at 18:15
  • @ciro-santilli okay thanks. – N33D Sep 11 '18 at 08:15
  • @CiroSantilli Hi. Sorry but I wonder if you guys have found the tutorial on building full system gem5 mode and run applications like Java. I do not care if it is x86 or ARM ) Thank you so much! – yeehaw Jun 03 '21 at 06:30
  • @yeehaw for full system boot Ubuntu on QEMU (official images are Ubuntu based now I think), install Java, boot into gem5 and run (Basically the same for any other program). I'd rather use Buildroot instead of Ubuntu to avoid the QEMU step, but their Java package was not working last time I tried. – Ciro Santilli Jun 04 '21 at 07:20
  • @CiroSantilli Thanks, but are there any full system tutorials available? I do not want to run java indeed but another application using different runtime. So i think i should set an linux full system first and then try to install the runtime that I want to test. [This](http://learning.gem5.org/book/part3/fs_config.html#running-full-system) does not look like a se.py tutorial ( – yeehaw Jun 04 '21 at 20:19
  • @yeehaw not sure if someone wrote the hole thing step by step, there is some stuff at http://www.gem5.org/documentation/general_docs/fullsystem/disks but not sure how amazing it is. But it is easily broken into the steps I said which can be indivisualy Googled. Boot image in QEMU, e.g. https://askubuntu.com/questions/884534/how-to-run-ubuntu-desktop-on-qemu But unlike that answer which uses qcow2, you have to use a raw disk. Install program. Then boot gem5 e.g. http://www.gem5.org/documentation/general_docs/fullsystem/building_arm_kernel – Ciro Santilli Jun 05 '21 at 06:55
  • @yeehaw if your program is available in buildroot, this is the perfect tutorial: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/b4d0b4b9d8af5529063bf17eb27d98ed8b711ce4#gem5-buildroot-setup – Ciro Santilli Jun 05 '21 at 06:56
  • @CiroSantilli Hi, thank you! I do not know what is QEMU for, but I am using ubuntu and followed [this](https://www.youtube.com/watch?v=gd_DtxQD5kc&t=196s) tutorial. basically, I downloaded binary and image (x86-system.tar.bz2) and then `build/X86/gem5.opt configs/example/fs.py --kernel=x86_64-vmlinux-2.6.22.9 --disk-image=linux-x86.image` I am able to get a full system running on another terminal. What do you think? Next, Should install the runtime and run the application on this new terminal? I tried a simple helloworld, but I did not find stats.txt from ./gem5/m5out folder. Idk where it is – yeehaw Jun 06 '21 at 04:20
  • I think what I said won't work ( because the full system is not complete. curl is even not supported so I cannot treat it as a virtual machine and cannot do anything I want such as install and execution on it. – yeehaw Jun 08 '21 at 06:44
  • @yeehaw QEMU is to speedup large compilations or other setups. If they are not needed, you can skip QEMU step. Buildroot does that better by using cross compilation purely. – Ciro Santilli Jun 18 '21 at 12:41

0 Answers0