Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
7effc0f7
Commit
7effc0f7
authored
Dec 18, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We now display CPU usage statistics for each thread.
parent
d54a5f8f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
src/input/input.c
src/input/input.c
+14
-0
src/video_output/video_output.c
src/video_output/video_output.c
+14
-0
src/video_parser/video_parser.c
src/video_parser/video_parser.c
+13
-0
No files found.
src/input/input.c
View file @
7effc0f7
...
...
@@ -35,6 +35,10 @@
#include <string.h>
#include <errno.h>
#ifdef STATS
# include <sys/times.h>
#endif
#include "config.h"
#include "common.h"
#include "threads.h"
...
...
@@ -293,6 +297,16 @@ static void EndThread( input_thread_t * p_input )
pi_status
=
p_input
->
pi_status
;
*
pi_status
=
THREAD_END
;
#ifdef STATS
{
struct
tms
cpu_usage
;
times
(
&
cpu_usage
);
intf_Msg
(
"input stats: cpu usage (user: %d, system: %d)
\n
"
,
cpu_usage
.
tms_utime
,
cpu_usage
.
tms_stime
);
}
#endif
/* Destroy all decoder threads */
for
(
i_es_loop
=
0
;
(
i_es_loop
<
INPUT_MAX_ES
)
...
...
src/video_output/video_output.c
View file @
7effc0f7
...
...
@@ -33,6 +33,10 @@
#include <stdio.h>
/* sprintf() */
#include <string.h>
/* strerror() */
#ifdef STATS
# include <sys/times.h>
#endif
#include "config.h"
#include "common.h"
#include "threads.h"
...
...
@@ -1259,6 +1263,16 @@ static void EndThread( vout_thread_t *p_vout )
intf_DbgMsg
(
"
\n
"
);
*
p_vout
->
pi_status
=
THREAD_END
;
#ifdef STATS
{
struct
tms
cpu_usage
;
times
(
&
cpu_usage
);
intf_Msg
(
"vout stats: cpu usage (user: %d, system: %d)
\n
"
,
cpu_usage
.
tms_utime
,
cpu_usage
.
tms_stime
);
}
#endif
/* Destroy all remaining pictures and subpictures */
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_PICTURES
;
i_index
++
)
{
...
...
src/video_parser/video_parser.c
View file @
7effc0f7
...
...
@@ -35,6 +35,10 @@
#include <errno.h>
#include <string.h>
#ifdef STATS
# include <sys/times.h>
#endif
#include "config.h"
#include "common.h"
#include "threads.h"
...
...
@@ -322,6 +326,15 @@ static void EndThread( vpar_thread_t *p_vpar )
#ifdef STATS
intf_Msg
(
"vpar stats: %d loops among %d sequence(s)
\n
"
,
p_vpar
->
c_loops
,
p_vpar
->
c_sequences
);
{
struct
tms
cpu_usage
;
times
(
&
cpu_usage
);
intf_Msg
(
"vpar stats: cpu usage (user: %d, system: %d)
\n
"
,
cpu_usage
.
tms_utime
,
cpu_usage
.
tms_stime
);
}
intf_Msg
(
"vpar stats: Read %d frames/fields (I %d/P %d/B %d)
\n
"
,
p_vpar
->
pc_pictures
[
I_CODING_TYPE
]
+
p_vpar
->
pc_pictures
[
P_CODING_TYPE
]
...
...
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