Commit Graph

52 Commits

Author SHA1 Message Date
175b0e3d50 bst_vs_heap_vs_hashmap: create nicer version with separated benchmarks
One data structure per executable, and gem5 instrumented versions in
separate executables.

Create the allowed_emulators path_properties property.

TODO: wire it up to benchmark result generation and remove the old version.
2019-11-15 00:00:00 +00:00
627623157c atomic.cpp: split into several versions one per executable 2019-11-15 00:00:00 +00:00
730eb8e991 static g++: clarify pthread problems further 2019-11-15 00:00:00 +00:00
ca47a77676 fork and fork bomb moved in from cpp-cheat 2019-11-12 00:00:00 +00:00
988289f766 gem5: classify all test failures
To skip tests, create a decent list of "which instructions a test use"
and "which instructions each simulator does not support".
2019-11-05 00:00:00 +00:00
5b67747214 cpp: parametrize nthreads on threaded programs CLI
Mark them as multithreaded in path_properties. Preparation for
https://cirosantilli.com/linux-kernel-module-cheat/#user-mode-static-executables-with-dynamic-libraries
which is likely what breaks gem5 on them.
2019-11-04 23:00:01 +00:00
6936bd6ba9 how to update gcc
Automatically add extra remotes from ./build.
2019-10-31 00:00:00 +00:00
02018daa95 arm: sve_addvl test program that prints sve length 2019-10-30 22:00:02 +00:00
9afe5355e9 userland: add some random filesystem and random stuff
Some moved from C++, some moved from SO, some I just made up.
2019-10-18 00:00:02 +00:00
b4b2164f29 wget: move from cpp-cheat 2019-09-22 00:00:00 +00:00
e0fb39c92a userland: move more multithreading from cpp-cheat!
Convert infinite_loop.c into loop.c. Keep all examples fast by default!
2019-09-07 00:00:03 +00:00
d1d12e4b43 infinite_loop.c: document better, allow 0 magic value to not print
Enable test by passing arguments to the test to limit loops.

gem5 arm LSE: still skipped, but add a link to the master patch that was merged.
2019-09-07 00:00:00 +00:00
a1cf89efba stack smashing 2019-09-07 00:00:00 +00:00
9e39fc4fd5 userland/gcc: cc_pedantic is needed here, previous removal broke things 2019-08-29 00:00:00 +00:00
f8b3ba9175 userland/linux: cc_pedantic actually works there and I found a bug with it 2019-08-27 00:00:01 +00:00
1e969e832f path_properties: actually skip qemu unimplemented instructions 2019-08-25 00:00:00 +00:00
9524307c0d build-doc: verify that there are no github readme links 2019-08-25 00:00:00 +00:00
96239298a9 Start nostartfiles examples.
Interlink freestanding directories and readme.
2019-08-25 00:00:00 +00:00
f28191a735 baremetal aarch64: create C version of multicore.S as well
Attempted to do the same for arm, but it failed.
2019-08-21 00:00:00 +00:00
915b04a76e mmap anonymous: configurable size 2019-08-11 00:00:03 +00:00
c03d5d18ea count_to: mark as more than 1s 2019-08-11 00:00:01 +00:00
d7a24ea200 start moving malloc and friends in 2019-08-11 00:00:00 +00:00
6f5a1a3e83 gem5: centralize information on simulate() time reached 2019-07-25 00:00:00 +00:00
d205140557 userland: move some multithreaded examples from cpp-cheat
Using them mostly to evaluate how well the emulators are handling user
mode multithreading.
2019-07-19 00:00:03 +00:00
369a47fc6e cpp/atomic.cpp: use 2 cpus as required for gem5 and skip gem5 due to ldadd 2019-07-19 00:00:02 +00:00
b38e2b0da9 arm baremetal: SVC explain where the imm16 can be retrieved
Use upper case hex literals on all PRIXnn.

.gitignore /out.docker
2019-07-16 00:00:01 +00:00
28cd27f969 Move all non-README links to cirosantilli.com where the file is not cut off... 2019-07-07 00:00:01 +00:00
52a203a1e2 bst_vs_heap_vs_hashmap: use small size by default
This allows us to add it to regressions.

Also clarify that the gem5 run blew up.
2019-06-28 00:00:00 +00:00
3fdd83c2c5 Rationalize -mcpu for emulators, compilers and assemblers on ARM
Move SVE example in from arm-assembly-cheat.

atomic.cpp aarch64 add LSE ldadd placeholder, not compiling yet
2019-06-26 00:00:00 +00:00
88a1c914c9 c++: move atomic in from cpp-cheat
TODO: README improve, link to x86 LOCK docs
2019-06-26 00:00:00 +00:00
178a6681df bst vs heap: move in fully from cpp-cheat 2019-06-26 00:00:00 +00:00
9fd9cb520e x86 asm: fix test-executables after move from x86-assembly-cheat
Even QEMU has unimplemented x86 instructions!
2019-06-24 00:00:00 +00:00
89084d2332 baremetal aarch64: timer.c get closer to working 2019-06-16 12:29:10 +01:00
0028ff0ebd x86 asm: move binary arithmetic instructions from x86-assembly-cheat except cmp 2019-06-12 00:00:00 +00:00
9fba97740c file_write_read.c: move from cpp-cheat
Improve README C section with example tree.
2019-06-07 00:00:03 +00:00
7fda133215 run-gdb-user: killed it, all that was needed was to pass --userland
Fixes part of https://github.com/cirosantilli/linux-kernel-module-cheat/issues/63
2019-06-02 00:00:03 +00:00
819ef42ea4 kernel modules: hack up quick floating point example 2019-06-02 00:00:01 +00:00
a90271c6af asm: start x86 intrinsics examples
Split userland/arch/<arch>/c/ into inline_asm and intrinsics, and move programs
that don't match either up.
2019-05-31 00:00:00 +00:00
fedb68c62c merge test-user-mode and test-baremetal into test-executables
Differentiate with --mode userland vs --mode baremetal.

The code was basically copied, now it's DRY.
2019-05-29 00:00:01 +00:00
6994dc21af test-gdb: can now run in either userland or baremetal modes
Selection with --mode userland (default because has x86_64) or --mode baremetal.

This is the first userland tool where this choice is done on the command line,
which led to a refactor of supported_archs and is_baremetal and is_userland
into a single self.env['mode'].
2019-05-29 00:00:00 +00:00
04c54a6369 test-user-mode: classify and skip all failing gem5 tests
Create userlan/posix/kill.c to better test signals.
2019-05-28 00:00:00 +00:00
cc1d8d08d0 test-gdb: bring back to life
Well factored with ./test-baremetal, allowing for target selection.
2019-05-27 00:00:05 +00:00
add6eedb76 baremetal: all examples working, all failures accounted for!
SIMD&FP is now enabled in arm from bootloader.
2019-05-25 00:00:01 +00:00
05aa5c7c79 baremetal: build userland/ programs using baremetal path property instead of symlinks
Otherwise I'll go crazy with symlink action.
2019-05-24 00:00:00 +00:00
c8c4f89854 asm: make use regular asserts that will just work on baremetal
Previously had wonky line pointer in asm_main. New interface simpler and more portable.

Add tests for ASSERT_EQ_ and family in arm and aarch64, previously on x86_64.

ASSERT_EQ_ and family in ARM can now either take =123, =addr or var, before this
the = was added on macros so var was not possible.

Define the main function directly in assembly, the C driver was useless.
2019-05-23 00:00:00 +00:00
72200dee4e userland: scope every header identifier with lkmc_ 2019-05-21 00:00:01 +00:00
6fe9e5bae7 baremetal: symlink all programs that currently run on both userland and baremetal 2019-05-21 00:00:00 +00:00
492d9cdf3f arm: udf instruction 2019-05-21 00:00:00 +00:00
01984c2201 test-boot: run in parallel
--quit-after-boot: fix for gem5, update path to gem5.sh

Improve the printing of results and errors:

- remove newlines from IDs at the end for ./test-boot
- remove newlines from progress for __call__ commands and don't print executed commands at all,
  otherwise there are too many lines per test and it is hard to tell what is going on
- print backtraces for any exception in the threads (bugs while developing this code)

Tests across different archs and emulators are still not running in parallel,
which is a huge loss. TODO.

thread_pool: introduce with API. This was motivate by test-boot, I've had enough
of doing separate error handling for each loop type! Greatly dries up the code, awesome.

common: make --all-emulators work properly with native hopefully for the last time,
./test-baremetal was still failing.

gem5: don't pass --command-line for baremetal. Maybe later we can use it to actually
pass command line arguments to main()? To be seen.
2019-05-21 00:00:00 +00:00
5391bc1bfd Get rid of lkmc_assert_fail in favor of abort + assert
What was missing previously was implementing abort in baremetal.

I had done that previously and forgotten to do this conversion!
2019-05-21 00:00:00 +00:00