Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
igt-gpu-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
drm
igt-gpu-tools
Commits
2b961d95
Commit
2b961d95
authored
Aug 29, 2013
by
Chris Wilson
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
overlay: Hide idle processes
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
2f297ed2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
overlay/gpu-perf.h
overlay/gpu-perf.h
+2
-0
overlay/overlay.c
overlay/overlay.c
+15
-1
No files found.
overlay/gpu-perf.h
View file @
2b961d95
...
...
@@ -53,6 +53,8 @@ struct gpu_perf {
uint64_t
wait_time
;
uint32_t
nr_sema
;
time_t
show
;
}
*
comm
;
struct
gpu_perf_time
{
struct
gpu_perf_time
*
next
;
...
...
overlay/overlay.c
View file @
2b961d95
...
...
@@ -344,6 +344,16 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
return
;
}
if
(
gp
->
gpu_perf
.
comm
==
NULL
)
{
cairo_text_extents_t
extents
;
cairo_text_extents
(
ctx
->
cr
,
gp
->
gpu_perf
.
error
,
&
extents
);
cairo_move_to
(
ctx
->
cr
,
ctx
->
width
/
2
+
HALF_PAD
+
(
ctx
->
width
/
2
-
SIZE_PAD
-
extents
.
width
)
/
2
.,
PAD
+
(
ctx
->
height
/
2
-
SIZE_PAD
+
extents
.
height
)
/
2
.);
cairo_show_text
(
ctx
->
cr
,
"idle"
);
return
;
}
y
=
PAD
+
12
-
2
;
x
=
ctx
->
width
/
2
+
HALF_PAD
;
...
...
@@ -411,6 +421,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
continue
;
len
+=
sprintf
(
buf
+
len
,
"%s %d%s"
,
need_comma
?
","
:
""
,
comm
->
nr_requests
[
n
],
ring_name
[
n
]);
need_comma
=
true
;
comm
->
show
=
ctx
->
time
;
}
if
(
comm
->
wait_time
)
{
if
(
comm
->
wait_time
>
1000
*
1000
)
{
...
...
@@ -428,6 +439,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
}
need_comma
=
true
;
comm
->
wait_time
=
0
;
comm
->
show
=
ctx
->
time
;
}
if
(
comm
->
nr_sema
)
{
len
+=
sprintf
(
buf
+
len
,
"%s %d syncs"
,
...
...
@@ -435,6 +447,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
comm
->
nr_sema
);
need_comma
=
true
;
comm
->
nr_sema
=
0
;
comm
->
show
=
ctx
->
time
;
}
if
(
comm
->
user_data
)
{
...
...
@@ -452,7 +465,8 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
skip_comm:
memset
(
comm
->
nr_requests
,
0
,
sizeof
(
comm
->
nr_requests
));
if
(
strcmp
(
comm
->
name
,
get_comm
(
comm
->
pid
,
buf
,
sizeof
(
buf
))))
{
if
(
comm
->
show
<
ctx
->
time
-
10
||
strcmp
(
comm
->
name
,
get_comm
(
comm
->
pid
,
buf
,
sizeof
(
buf
))))
{
*
prev
=
comm
->
next
;
if
(
comm
->
user_data
)
{
chart_fini
(
comm
->
user_data
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment