Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
INTsight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lehrstuhl für Informatik 4 (Systemsoftware)
INTsight
Commits
1f449a09
Commit
1f449a09
authored
6 years ago
by
Bernhard Heinloth
Browse files
Options
Downloads
Patches
Plain Diff
Improved inject script
parent
d0a6bf9b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch/x86/intsight/measure.c
+9
-7
9 additions, 7 deletions
arch/x86/intsight/measure.c
include/linux/intsight.h
+10
-1
10 additions, 1 deletion
include/linux/intsight.h
inject.sh
+31
-11
31 additions, 11 deletions
inject.sh
with
50 additions
and
19 deletions
arch/x86/intsight/measure.c
+
9
−
7
View file @
1f449a09
...
@@ -34,13 +34,15 @@ struct checkpoint_record *current_cpr_limit;
...
@@ -34,13 +34,15 @@ struct checkpoint_record *current_cpr_limit;
int
intsight_start_benchmark
(
size_t
reps
,
size_t
checkpoint_capacity
)
int
intsight_start_benchmark
(
size_t
reps
,
size_t
checkpoint_capacity
)
{
{
debugfs_remove_recursive
(
csv_results_folder
);
if
(
csv_results_folder
)
{
BUG_ON
(
!
current_bmr
);
debugfs_remove_recursive
(
csv_results_folder
);
if
(
debugfs_vmalloc_cp_matrix
)
BUG_ON
(
!
current_bmr
);
vfree
(
current_bmr
);
if
(
debugfs_vmalloc_cp_matrix
)
else
vfree
(
current_bmr
);
kfree
(
current_bmr
);
else
current_bmr
=
NULL
;
kfree
(
current_bmr
);
current_bmr
=
NULL
;
}
BUG_ON
(
current_bmr
);
BUG_ON
(
current_bmr
);
const
size_t
matrix_size
=
sizeof
(
struct
checkpoint_record
)
*
reps
const
size_t
matrix_size
=
sizeof
(
struct
checkpoint_record
)
*
reps
...
...
This diff is collapsed.
Click to expand it.
include/linux/intsight.h
+
10
−
1
View file @
1f449a09
...
@@ -50,7 +50,16 @@ struct checkpoint_record {
...
@@ -50,7 +50,16 @@ struct checkpoint_record {
extern
struct
checkpoint_record
*
current_cpr
;
extern
struct
checkpoint_record
*
current_cpr
;
extern
struct
checkpoint_record
*
current_cpr_limit
;
extern
struct
checkpoint_record
*
current_cpr_limit
;
static
__always_inline
void
memo_checkpoint
(
const
char
*
name
)
#ifdef CONFIG_INTSIGHT_TIMESTAMP_TYPE_TSC
static
__always_inline
uint64_t
memo_get_tsc
(
void
)
{
uint64_t
a
,
d
;
// TODO rdtscp
__asm__
volatile
(
"rdtsc"
:
"=a"
(
a
),
"=d"
(
d
));
return
(
d
<<
32
)
|
a
;
}
#endif
static
__always_inline
void
intsight_checkpoint
(
const
char
*
name
)
{
{
asm
volatile
(
""
:::
"memory"
);
asm
volatile
(
""
:::
"memory"
);
...
...
This diff is collapsed.
Click to expand it.
inject.sh
100644 → 100755
+
31
−
11
View file @
1f449a09
#!/bin/sh
#!/bin/sh
# Add new softirq in interrupt list
if
[
$#
-ne
1
-o
!
-d
$1
]
;
then
sed
-i
-e
'/ RCU_SOFTIRQ,/a\'
-e
' INTSIGHT_SOFTIRQ,'
include/linux/interrupt.h
echo
"Usage:
$0
[LinuxFolder]"
>
&2
elif
[
!
-x
"
$(
command
-v
spatch
)
"
]
;
then
echo
"Command 'spatch' not available - please install Coccinelle!"
>
&2
elif
[
-f
"
$1
/.intsight"
]
;
then
echo
"Folder '
$1
' is already patched!"
>
&2
exit
1
else
echo
"Injecting INTsight"
touch
"
$1
/.intsight"
echo
" - copying files..."
cp
-r
arch
"
$1
"
cp
-r
include
"
$1
"
echo
" - adding to KConfig..."
sed
-i
-e
'/endmenu/i source "arch/arm/intsight/Kconfig"\'
-e
''
"
$1
/arch/arm/Kconfig.debug"
sed
-i
-e
'/endmenu/i source "arch/x86/intsight/Kconfig"\'
-e
''
"
$1
/arch/x86/Kconfig.debug"
# Add to KConfig
echo
" - adding to Makefile..."
sed
-i
-e
'/endmenu/i source "arch/arm/intsight/Kconfig"\'
-e
''
arch
/arm/Kconfig.debug
echo
'\n\ncore-y += arch/arm/intsight/'
>>
"
$1
/arch/arm/Makefile"
echo
'\n\ncore-y += arch/x86/intsight/'
>>
"
$1
/arch/x86/Makefile"
echo
" - adding new softirq to interrupt list"
sed
-i
-e
'/ RCU_SOFTIRQ,/a\'
-e
' INTSIGHT_SOFTIRQ,'
"
$1
/include/linux/interrupt.h"
# Add to Makefile
PATCHFILE
=
"
$1
/intsight.patch"
echo
-e
'\n\ncore-y += arch/arm/intsight/'
>>
arch
/arm/Makefile
if
[
!
-f
"
$PATCHFILE
"
]
;
then
echo
" - allocating checkpoints (with coccinelle)"
#TODO: Copy Files
spatch
--sp-file
checkpoints.cocci
--dir
"
$1
"
|
tee
"
$PATCHFILE
"
else
# Patch files (use find)
echo
" - (found checkpoint patch file)"
# for i in /opt/heinloth/linux-at91-bachelorarbeit/drivers/irqchip/*.c ; do spatch --sp-file checkpoints.cocci $i
fi
\ No newline at end of file
echo
" - patching checkpoints"
patch
-p1
-d
"
$1
"
<
"
$PATCHFILE
"
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment