Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmytro Levit
Software
Commits
3ba73f43
Commit
3ba73f43
authored
3 years ago
by
Qidong Zhou
Browse files
Options
Downloads
Patches
Plain Diff
fix bug of output formant of evtsz in pcie40_statlink
parent
b897c86d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Pcie40Applications/main_pcie40_statlink.cpp
+4
-4
4 additions, 4 deletions
Pcie40Applications/main_pcie40_statlink.cpp
with
4 additions
and
4 deletions
Pcie40Applications/main_pcie40_statlink.cpp
+
4
−
4
View file @
3ba73f43
...
...
@@ -141,7 +141,7 @@ readregs(std::bitset<48> link_mask, pcie40reg_t pcie40reg[])
memset
(
pcie
,
0
,
sizeof
(
*
pcie
));
if
(
!
link_mask
[
i
])
continue
;
pcie
->
eventsz
=
pcie40_b2l_evtsz
(
dev_slot
,
i
);
pcie
->
eventsz
=
pcie40_b2l_evtsz
(
dev_slot
,
i
);
pcie
->
nevent
=
pcie40_b2l_nevent
(
dev_slot
,
i
);
pcie
->
nkbyte
=
pcie40_b2l_nkyte
(
dev_slot
,
i
);
pcie
->
maxevtsz
=
pcie40_b2l_maxevtsz
(
dev_slot
,
i
);
...
...
@@ -314,16 +314,16 @@ statlink(std::bitset<48> link_mask, pcie40reg_t pcie40reg[])
printf
(
"event=%-9d total=%8.1fkB"
,
pcie
->
nevent
,
pcie
->
nkbyte
);
if
(
pcie
->
nevent
)
{
double
avg
=
pcie
->
nkbyte
/
pcie
->
nevent
;
printf
(
" (avg=%
4.3fk
B"
,
avg
);
printf
(
" (avg=%
5.4f
B"
,
avg
*
1000
);
if
(
pcie
->
eventsz
==
0xffff
)
{
printf
(
" last=oflow"
);
}
else
{
printf
(
" last=%
4.3fkB
"
,
pcie
->
eventsz
);
printf
(
" last=%
-4d
"
,
pcie
->
eventsz
);
}
if
(
pcie
->
maxevtsz
==
0xffff
)
{
printf
(
" max=oflow)"
);
}
else
{
printf
(
" max=%
4.3fkB
)"
,
pcie
->
maxevtsz
);
printf
(
" max=%
-4d
)"
,
pcie
->
maxevtsz
);
}
}
printf
(
"
\n
"
);
...
...
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