Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SATFON
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pascal Pieper
SATFON
Commits
6a6d7a60
Commit
6a6d7a60
authored
7 years ago
by
Pascal Pieper
Browse files
Options
Downloads
Patches
Plain Diff
Added debug functions
parent
3beba59e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/paffs_if.h
+7
-0
7 additions, 0 deletions
interface/paffs_if.h
tests/powerloss.h
+28
-4
28 additions, 4 deletions
tests/powerloss.h
with
35 additions
and
4 deletions
interface/paffs_if.h
+
7
−
0
View file @
6a6d7a60
...
...
@@ -244,4 +244,11 @@ public:
const
char
*
f_getLastError
(){
return
err_msg
(
fs
->
getLastErr
());
}
Paffs
*
getPaffs
()
{
printf
(
"WARNING: This is for debug purposes only!
\n
"
);
return
fs
;
}
};
This diff is collapsed.
Click to expand it.
tests/powerloss.h
+
28
−
4
View file @
6a6d7a60
...
...
@@ -95,6 +95,29 @@ public:
ofstream
es
(
filesizefil
,
ios
::
out
|
ios
::
binary
);
es
.
write
(
reinterpret_cast
<
char
*>
(
&
filesizeBackup
),
sizeof
(
unsigned
int
)
*
numberOfFiles
);
es
.
close
();
//FIXME DEBUG
//debug
printf
(
"
\n\n
DEBUG: sumCache prePowerloss
\n
"
);
static_cast
<
paffs_IF
*>
(
fsif
)
->
getPaffs
()
->
getDevice
(
0
)
->
sumCache
.
printStatus
();
AreaManagement
*
areaMgmt
=
&
static_cast
<
paffs_IF
*>
(
fsif
)
->
getPaffs
()
->
getDevice
(
0
)
->
areaMgmt
;
printf
(
"Info:
\n\t
%"
PTYPE_AREAPOS
" used Areas
\n
"
,
areaMgmt
->
getUsedAreas
());
for
(
AreaPos
i
=
0
;
i
<
areasNo
;
i
++
)
{
printf
(
"
\t
Area %3"
PTYPE_AREAPOS
" on %4"
PTYPE_AREAPOS
" as %10s %s
\n
"
,
i
,
areaMgmt
->
getPos
(
i
),
areaNames
[
areaMgmt
->
getType
(
i
)],
areaStatusNames
[
areaMgmt
->
getStatus
(
i
)]);
if
(
i
>
128
)
{
printf
(
"
\n
-- truncated 128-%"
PTYPE_AREAPOS
" Areas.
\n
"
,
areasNo
);
break
;
}
}
printf
(
"
\t
----------------------
\n
"
);
//FIXME DEBUG
}
}
...
...
@@ -281,6 +304,7 @@ public:
ins
.
close
();
TraceMask
bkp
=
traceMask
;
traceMask
=
(
traceMask
&
~
PAFFS_WRITE_VERIFY_AS
)
|
PAFFS_TRACE_AREA
|
PAFFS_TRACE_JOURNAL
|
PAFFS_TRACE_ASCACHE
|
PAFFS_TRACE_PACACHE
|
...
...
@@ -289,11 +313,11 @@ public:
fsif
->
mount
();
traceMask
=
bkp
;
}
}
}
while
(
true
)
{
enableCallback
();
while
(
true
)
{
enableCallback
();
while
(
!
exitAndRedo
)
{
if
(
appendOrDeleteFile
(
accesses
++
%
numberOfFiles
)
<
0
)
...
...
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