mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 18:25:57 +01:00
GEM5 checkpoint switch to HPI for benchmarking.
Don't pass -e on checkpoint restore. Add benchmarks to how much GEM5 is slower than QEMU. Rename Kernel boot command line arguments to match kernel docs name. Document how to pass extra options to GEM5. Start listing interesting benchmarks to run on GEM5. Add an openmp hello world.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
.PHONY: all clean
|
||||
|
||||
CFLAGS_EXTRA ?= -ggdb3 -O0 -std=c99 -Wall -Werror -Wextra
|
||||
CFLAGS_EXTRA ?= -ggdb3 -fopenmp -O0 -std=c99 -Wall -Werror -Wextra
|
||||
IN_EXT ?= .c
|
||||
OUT_EXT ?= .out
|
||||
|
||||
|
||||
17
kernel_module/user/openmp.c
Normal file
17
kernel_module/user/openmp.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <omp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main () {
|
||||
int nthreads, tid;
|
||||
#pragma omp parallel private(nthreads, tid)
|
||||
{
|
||||
tid = omp_get_thread_num();
|
||||
printf("Hello World from thread = %d\n", tid);
|
||||
if (tid == 0) {
|
||||
nthreads = omp_get_num_threads();
|
||||
printf("Number of threads = %d\n", nthreads);
|
||||
}
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user