Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
7effc0f7
Commit
7effc0f7
authored
Dec 18, 2000
by
Christophe Massiot
Browse files
We now display CPU usage statistics for each thread.
parent
d54a5f8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
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