-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build kernel with KFT instrumentation (#1393)
- Loading branch information
1 parent
0833084
commit 8950128
Showing
43 changed files
with
326 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# some generic settings | ||
set output-radix 0x10 | ||
set pagination off | ||
set confirm off | ||
set verbose off | ||
|
||
# make extra commands available | ||
python import os, sys | ||
python sys.path.append(os.path.join(os.getcwd(), 'sys')) | ||
python import debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Command to easily append KFT events to specified file | ||
define dump-kft | ||
printf "Appending %d entries to file `dump.kft`\n", kft_used | ||
append memory dump.kft kft_event_list kft_event_list+kft_used | ||
end | ||
|
||
set $kft_flush_count = 0 | ||
|
||
break kft_flush | ||
commands | ||
silent | ||
printf "kft_flush(%d): ", $kft_flush_count++ | ||
dump-kft | ||
continue | ||
end | ||
|
||
break ktest_success | ||
commands | ||
printf "ktest_success: " | ||
dump-kft | ||
end | ||
|
||
break halt | ||
commands | ||
printf "halt: " | ||
dump-kft | ||
end | ||
|
||
continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,3 +83,6 @@ mimiker-env/ | |
|
||
# | ||
contrib/*/build/ | ||
|
||
# kft dump | ||
dump.kft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef __AARCH64_KFTRACE_H__ | ||
#define __AARCH64_KFTRACE_H__ | ||
|
||
#include <aarch64/armreg.h> | ||
|
||
#define KFT_EVENT_MAX 0x100000 | ||
#define kft_get_time() READ_SPECIALREG(cntpct_el0) | ||
|
||
#endif /* __AARCH64_KFTRACE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __MIPS_KFTRACE_H__ | ||
#define __MIPS_KFTRACE_H__ | ||
|
||
#define _MACHDEP | ||
|
||
#include <mips/m32c0.h> | ||
|
||
#define KFT_EVENT_MAX 0x4000 | ||
#define kft_get_time() mips32_getcount() | ||
|
||
#undef _MACHDEP | ||
|
||
#endif /* __MIPS_KFTRACE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef __RISCV_KFTRACE_H__ | ||
#define __RISCV_KFTRACE_H__ | ||
|
||
#include <riscv/cpufunc.h> | ||
|
||
#define KFT_EVENT_MAX 0x100000 | ||
#define kft_get_time() rdtime() | ||
|
||
#endif /* __RISCV_KFTRACE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef __KFTRACE_H__ | ||
#define __KFTRACE_H__ | ||
|
||
#if KFTRACE | ||
#include <machine/kftrace.h> | ||
void init_kftrace(void); | ||
#else | ||
#define init_kftrace() __nothing | ||
#endif | ||
|
||
#endif /* __KFTRACE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.