parsa-epfl / qemu Goto Github PK
View Code? Open in Web Editor NEWThis project forked from qemu/qemu
PARSA's fork of the official QEMU repo, with all features added for simulation.
License: Other
This project forked from qemu/qemu
PARSA's fork of the official QEMU repo, with all features added for simulation.
License: Other
From the latest known mainline verison of QEMU's ARM emualtor, test all the CloudSuite workloads. The workload should be able to run until completion.
Steps to repro:
-qflex_d exec
.Example:
savevm-external testing/1
savevm-external testing/2
testing/1
loads correctly, testing/2
fails.
Formatting '/mnt/parsa-active-vol/bahadori/alpine-copy/tmp/root.qcow2-20230726115258', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=68719476736 backing_file=/mnt/parsa-active-vol/bahadori/alpine-copy/root.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
qemu-system-aarch64: Could not open backing file: Could not open '/mnt/parsa-active-vol/bahadori/alpine-copy/tmp/root.qcow2-20230726113758': No such file or directory
=================================================================
==888207==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 208 byte(s) in 6 object(s) allocated from:
#0 0x7f1735d26a7f in __interceptor_malloc (/nix/store/2sj2xqz0avi5m6f68ah077c6xphl136p-gcc-10.4.0-lib/lib/libasan.so.6+0xaca7f)
#1 0x7f17352168b8 in g_malloc (/nix/store/7vnp9qni962b4zppslbz0fwh85fj7y07-glib-2.76.2/lib/libglib-2.0.so.0+0x648b8)
SUMMARY: AddressSanitizer: 208 byte(s) leaked in 6 allocation(s).
Note: backing files from these snapshots do not share the same root folder.
bahadori@iccluster104:/mnt/parsa-active-vol/bahadori/alpine-copy$ qemu-img info baseline/root.qcow2
image: baseline/root.qcow2
file format: qcow2
virtual size: 64 GiB (68719476736 bytes)
disk size: 176 MiB
cluster_size: 65536
backing file: /mnt/parsa-active-vol/bahadori/alpine/root.qcow2
backing file format: qcow2
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false```
The tracing simulation requires read access to some Qemu's internals. The following list of requirement could be exposed from Qemu's plugin API. I have to which one still are not
On every instruction translation, for all vCPUs
The pth stack overflow problem I asked for help before seemed to been handled by increasing its stack size.
Then another error happened(assertion failed in uArchImpl.cpp:294). But it does not matter for my purpose is to verify the deterministic feature of QFlex.
Now I can run a small number of instructions under timing mode.
The deterministic feature I understand is that the instruction flows generated by the QEMU of multiple runs are the same when a snapshot/checkpoint has been loaded.
I captured the instruction opcodes in the uFetchImpl.cpp:1053.
void updateTranslationResponse(TranslationPtr &tr) {
......
if (!tr->isPagefault()) {
opcode = cpu(tr->theIndex)->fetchInstruction(tr->theVaddr);
_**instTraceFile<< "uFetch addr " << tr->theVaddr << " opcode 0x"<< std::hex<< opcode << std::dec <<std::endl;**_
opcode += opcode ? 0 : 1;
}
......
}
I ran the example “Running Matrix Multiplication with QFlex – Timing (KnottyKraken)”.
After running 120K instructions several times, I got two different patterns of instruction streams and there's a big difference in the beginning.
Pattern 1:
uFetch addr v:000400f50 opcode 0xb8617926
uFetch addr v:000400f54 opcode 0x91000421
uFetch addr v:000400f58 opcode 0x6b01027f
uFetch addr v:000400f5c opcode 0xb86868e7
uFetch addr v:000400f60 opcode 0x1b0614e5
uFetch addr v:000400f64 opcode 0x54ffff4c
uFetch addr v:000400f68 opcode 0xb8286965
uFetch addr v:000400f6c opcode 0x91001108
uFetch addr v:000400f70 opcode 0xeb0c011f
uFetch addr v:000400f74 opcode 0x54fffe21
uFetch addr v:000400f78 opcode 0x9100054a
uFetch addr v:000400f7c opcode 0x6b0a029f
uFetch addr v:000400f80 opcode 0x54fffd4c
uFetch addr v:000400f84 opcode 0xa94153f3
uFetch addr v:000400f88 opcode 0xa9425bf5
uFetch addr v:000400f8c opcode 0xf9401bf7
uFetch addr v:000400f90 opcode 0xa8c47bfd
uFetch addr v:000400f94 opcode 0xd65f03c0
uFetch addr v:000400f98 opcode 0x52800005
uFetch addr v:000400f9c opcode 0xb8286965
uFetch addr v:000400fa0 opcode 0x91001108
uFetch addr v:000400fa4 opcode 0xeb0c011f
uFetch addr v:000400fa8 opcode 0x54fffc81
uFetch addr v:000400fac opcode 0x17fffff3
uFetch addr v:000400f4c opcode 0xf8617ae7
uFetch addr v:000400f50 opcode 0xb8617926
uFetch addr v:000400f54 opcode 0x91000421
uFetch addr v:000400f58 opcode 0x6b01027f
uFetch addr v:000400f5c opcode 0xb86868e7
uFetch addr v:000400f60 opcode 0x1b0614e5
uFetch addr v:000400f64 opcode 0x54ffff4c
uFetch addr v:000400f68 opcode 0xb8286965
uFetch addr v:000400f6c opcode 0x91001108
uFetch addr v:000400f70 opcode 0xeb0c011f
uFetch addr v:000400f74 opcode 0x54fffe21
uFetch addr v:000400f78 opcode 0x9100054a
uFetch addr v:000400f7c opcode 0x6b0a029f
uFetch addr v:000400f80 opcode 0x54fffd4c
uFetch addr v:000400f84 opcode 0xa94153f3
uFetch addr v:000400f88 opcode 0xa9425bf5
uFetch addr v:000400f8c opcode 0xf9401bf7
uFetch addr v:000400f90 opcode 0xa8c47bfd
uFetch addr v:000400f94 opcode 0xd65f03c0
uFetch addr v:000400f98 opcode 0x52800005
uFetch addr v:000400f9c opcode 0xb8286965
......
Pattern 2:
uFetch addr v:000400f5c opcode 0xb86868e7
uFetch addr v:000400f60 opcode 0x1b0614e5
uFetch addr v:000400f64 opcode 0x54ffff4c
uFetch addr v:000400f68 opcode 0xb8286965
uFetch addr v:000400f6c opcode 0x91001108
uFetch addr v:000400f70 opcode 0xeb0c011f
uFetch addr v:000400f74 opcode 0x54fffe21
uFetch addr v:000400f78 opcode 0x9100054a
uFetch addr v:000400f7c opcode 0x6b0a029f
uFetch addr v:000400f4c opcode 0xf8617ae7
uFetch addr v:000400f50 opcode 0xb8617926
uFetch addr v:000400f54 opcode 0x91000421
uFetch addr v:000400f58 opcode 0x6b01027f
uFetch addr v:000400f5c opcode 0xb86868e7
uFetch addr v:000400f60 opcode 0x1b0614e5
uFetch addr v:000400f64 opcode 0x54ffff4c
uFetch addr v:000400f68 opcode 0xb8286965
uFetch addr v:000400f6c opcode 0x91001108
uFetch addr v:000400f70 opcode 0xeb0c011f
uFetch addr v:000400f74 opcode 0x54fffe21
uFetch addr v:000400f78 opcode 0x9100054a
uFetch addr v:000400f7c opcode 0x6b0a029f
uFetch addr v:000400f80 opcode 0x54fffd4c
uFetch addr v:000400f84 opcode 0xa94153f3
uFetch addr v:000400f88 opcode 0xa9425bf5
uFetch addr v:000400f8c opcode 0xf9401bf7
uFetch addr v:000400f90 opcode 0xa8c47bfd
uFetch addr v:000400f94 opcode 0xd65f03c0
uFetch addr v:000400f98 opcode 0x52800005
uFetch addr v:000400f9c opcode 0xb8286965
......
The result is not as expected and I think it cannot be verified for the deterministic feature.
Are there any problems with the method I used?
In addition, when I ran my own benchmarks I encountered an error:
30 MMUUtil.cpp:224 ([]) {0}- Assertion failed: (!(false)) : Unknown value in getting TG1 Granule Size. TG_SZ = 0
How can I run my own benchmarks with flexus core and without using the checkpoints you provide?
Hope your response. Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.