Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fail
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
E-EXK4 - Operating System Group
projects
fail
Commits
4d070c63
Commit
4d070c63
authored
10 years ago
by
Horst Schirmeier
Browse files
Options
Downloads
Patches
Plain Diff
visualfail: collapse repeating instructions
Change-Id: I7d3bbb9eb79b502acabeeeab9886bf20177e68c6
parent
957f9c93
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/analysis/VisualFAIL/core.php
+47
-12
47 additions, 12 deletions
tools/analysis/VisualFAIL/core.php
with
47 additions
and
12 deletions
tools/analysis/VisualFAIL/core.php
+
47
−
12
View file @
4d070c63
...
...
@@ -170,6 +170,38 @@ function asmCode()
echo
json_encode
(
$content
);
}
function
collapse_repeated
(
$html
,
$disasm
,
$force_finish
)
{
static
$last_disasm
=
''
;
static
$collect
=
array
();
$limit_before
=
$limit_after
=
3
;
$out
=
''
;
if
(
$force_finish
||
$last_disasm
!=
$disasm
)
{
if
(
count
(
$collect
)
>
$limit_before
+
$limit_after
+
1
)
{
for
(
$i
=
0
;
$i
<
$limit_before
;
++
$i
)
{
$out
.
=
$collect
[
$i
];
}
$out
.
=
'<i>-- omitted '
.
(
count
(
$collect
)
-
$limit_before
-
$limit_after
)
.
" repetitions of '
$last_disasm
'</i><br>"
;
for
(
$i
=
count
(
$collect
)
-
$limit_after
;
$i
<
count
(
$collect
);
++
$i
)
{
$out
.
=
$collect
[
$i
];
}
}
else
{
$out
=
implode
(
''
,
$collect
);
}
$last_disasm
=
$disasm
;
$collect
=
array
();
}
if
(
$force_finish
)
{
$out
.
=
$html
;
}
else
{
$collect
[]
=
$html
;
}
return
$out
;
}
function
getAsmCode
()
{
$content
=
""
;
...
...
@@ -188,25 +220,26 @@ function getAsmCode()
// FIXME id not unique
$content
=
'<div id="maxFehler" '
;
foreach
(
$resulttypes
as
$value
)
{
$temp
=
$value
.
'="'
.
$fehlerdaten
[
'max'
][
$value
]
.
'" '
;
$content
.
=
$temp
;
}
$temp
=
$value
.
'="'
.
$fehlerdaten
[
'max'
][
$value
]
.
'" '
;
$content
.
=
$temp
;
}
$content
.
=
' >'
;
while
(
$row
=
mysql_fetch_object
(
$asmcode
))
{
if
(
array_key_exists
(
$row
->
instr_address
,
$fehlerdaten
[
'Daten'
]))
{
$
content
.
=
'<span data-address="'
.
dechex
(
$row
->
instr_address
)
.
'" class="hasFehler" '
;
$
line
=
'<span data-address="'
.
dechex
(
$row
->
instr_address
)
.
'" class="hasFehler" '
;
foreach
(
$resulttypes
as
$value
)
{
$
content
.
=
$value
.
'="'
.
$fehlerdaten
[
'Daten'
][
$row
->
instr_address
][
$value
]
.
'" '
;
$
line
.
=
$value
.
'="'
.
$fehlerdaten
[
'Daten'
][
$row
->
instr_address
][
$value
]
.
'" '
;
}
$content
.
=
' style="cursor: pointer;">'
.
dechex
(
$row
->
instr_address
)
.
' '
.
htmlspecialchars
(
$row
->
disassemble
)
.
'</span>'
;
$line
.
=
' style="cursor: pointer;">'
.
dechex
(
$row
->
instr_address
)
.
' '
.
htmlspecialchars
(
$row
->
disassemble
)
.
'</span><br>'
;
$content
.
=
collapse_repeated
(
$line
,
'dontcare'
,
true
);
}
else
{
$content
.
=
dechex
(
$row
->
instr_address
)
.
' '
.
htmlspecialchars
(
$row
->
disassemble
);
$line
=
dechex
(
$row
->
instr_address
)
.
' '
.
htmlspecialchars
(
$row
->
disassemble
)
.
'<br>'
;
$content
.
=
collapse_repeated
(
$line
,
htmlspecialchars
(
$row
->
disassemble
),
false
);
}
$content
.
=
'<br>'
;
}
$content
.
=
collapse_repeated
(
''
,
''
,
true
);
$content
.
=
' </div>'
;
echo
json_encode
(
$content
);
...
...
@@ -265,13 +298,15 @@ function getHighlevelCode()
$maxFehler
[
$value
]
+=
$fehlerdaten
[
'Daten'
][
$row
->
instr_address
][
$value
];
}
$newline
.
=
' style="cursor: pointer;">'
.
dechex
(
$row
->
instr_address
)
.
' '
.
htmlspecialchars
(
$row
->
disassemble
)
.
'</span>'
;
$newline
.
=
' style="cursor: pointer;">'
.
dechex
(
$row
->
instr_address
)
.
' '
.
htmlspecialchars
(
$row
->
disassemble
)
.
'</span><br>'
;
$newline
=
collapse_repeated
(
$newline
,
'dontcare'
,
true
);
}
else
{
$newline
=
dechex
(
$row
->
instr_address
)
.
' '
.
htmlspecialchars
(
$row
->
disassemble
);
$newline
=
dechex
(
$row
->
instr_address
)
.
' '
.
htmlspecialchars
(
$row
->
disassemble
)
.
'<br>'
;
$newline
=
collapse_repeated
(
$newline
,
htmlspecialchars
(
$row
->
disassemble
),
false
);
}
$newline
.
=
'<br>'
;
$mapping
[
$lineNumber
]
[]
=
$newline
;
}
$mapping
[
$lineNumber
]
[]
=
collapse_repeated
(
''
,
''
,
true
);
}
foreach
(
$resulttypes
as
$value
)
{
$maxFehlerMapping
[
$lineNumber
][
$value
]
=
$maxFehler
[
$value
];
...
...
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