Rename channel NTHREADS by NRTHREADS
This commit is contained in:
parent
9d83a319b0
commit
6f8b46e753
4
emu.h
4
emu.h
@ -111,7 +111,7 @@ enum chan_track {
|
|||||||
enum chan {
|
enum chan {
|
||||||
CHAN_OVNI_PID,
|
CHAN_OVNI_PID,
|
||||||
CHAN_OVNI_TID,
|
CHAN_OVNI_TID,
|
||||||
CHAN_OVNI_NTHREADS,
|
CHAN_OVNI_NRTHREADS,
|
||||||
CHAN_OVNI_STATE,
|
CHAN_OVNI_STATE,
|
||||||
CHAN_OVNI_APPID,
|
CHAN_OVNI_APPID,
|
||||||
CHAN_OVNI_CPU,
|
CHAN_OVNI_CPU,
|
||||||
@ -138,7 +138,7 @@ static const int chan_to_prvtype[CHAN_MAX][3] = {
|
|||||||
/* Channel TH CPU */
|
/* Channel TH CPU */
|
||||||
{ CHAN_OVNI_PID, 10, 60 },
|
{ CHAN_OVNI_PID, 10, 60 },
|
||||||
{ CHAN_OVNI_TID, 11, 61 },
|
{ CHAN_OVNI_TID, 11, 61 },
|
||||||
{ CHAN_OVNI_NTHREADS, -1, 62 },
|
{ CHAN_OVNI_NRTHREADS, -1, 62 },
|
||||||
{ CHAN_OVNI_STATE, 13, -1 },
|
{ CHAN_OVNI_STATE, 13, -1 },
|
||||||
{ CHAN_OVNI_APPID, 14, 64 }, /* Not used */
|
{ CHAN_OVNI_APPID, 14, 64 }, /* Not used */
|
||||||
{ CHAN_OVNI_CPU, 15, -1 },
|
{ CHAN_OVNI_CPU, 15, -1 },
|
||||||
|
10
emu_ovni.c
10
emu_ovni.c
@ -47,7 +47,7 @@ hook_init_ovni(struct ovni_emu *emu)
|
|||||||
|
|
||||||
chan_cpu_init(cpu, ucpu, CHAN_OVNI_TID, CHAN_TRACK_TH_RUNNING, row, prv_cpu, clock);
|
chan_cpu_init(cpu, ucpu, CHAN_OVNI_TID, CHAN_TRACK_TH_RUNNING, row, prv_cpu, clock);
|
||||||
chan_cpu_init(cpu, ucpu, CHAN_OVNI_PID, CHAN_TRACK_TH_RUNNING, row, prv_cpu, clock);
|
chan_cpu_init(cpu, ucpu, CHAN_OVNI_PID, CHAN_TRACK_TH_RUNNING, row, prv_cpu, clock);
|
||||||
chan_cpu_init(cpu, ucpu, CHAN_OVNI_NTHREADS, CHAN_TRACK_NONE, row, prv_cpu, clock);
|
chan_cpu_init(cpu, ucpu, CHAN_OVNI_NRTHREADS, CHAN_TRACK_NONE, row, prv_cpu, clock);
|
||||||
|
|
||||||
/* FIXME: Use extended initialization for CPUs too */
|
/* FIXME: Use extended initialization for CPUs too */
|
||||||
chan_enable(&cpu->chan[CHAN_OVNI_TID], 1);
|
chan_enable(&cpu->chan[CHAN_OVNI_TID], 1);
|
||||||
@ -56,8 +56,8 @@ hook_init_ovni(struct ovni_emu *emu)
|
|||||||
chan_enable(&cpu->chan[CHAN_OVNI_PID], 1);
|
chan_enable(&cpu->chan[CHAN_OVNI_PID], 1);
|
||||||
chan_set(&cpu->chan[CHAN_OVNI_PID], 0);
|
chan_set(&cpu->chan[CHAN_OVNI_PID], 0);
|
||||||
|
|
||||||
chan_enable(&cpu->chan[CHAN_OVNI_NTHREADS], 1);
|
chan_enable(&cpu->chan[CHAN_OVNI_NRTHREADS], 1);
|
||||||
chan_set(&cpu->chan[CHAN_OVNI_NTHREADS], 0);
|
chan_set(&cpu->chan[CHAN_OVNI_NRTHREADS], 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,8 +166,8 @@ update_cpu(struct ovni_cpu *cpu)
|
|||||||
|
|
||||||
/* From the CPU channels we only need to manually update the number of
|
/* From the CPU channels we only need to manually update the number of
|
||||||
* threads running in the CPU */
|
* threads running in the CPU */
|
||||||
if(chan_get_st(&cpu->chan[CHAN_OVNI_NTHREADS]) != (int) cpu->nrunning_threads)
|
if(chan_get_st(&cpu->chan[CHAN_OVNI_NRTHREADS]) != (int) cpu->nrunning_threads)
|
||||||
chan_set(&cpu->chan[CHAN_OVNI_NTHREADS], (int) cpu->nrunning_threads);
|
chan_set(&cpu->chan[CHAN_OVNI_NRTHREADS], (int) cpu->nrunning_threads);
|
||||||
|
|
||||||
/* Update all tracking channels */
|
/* Update all tracking channels */
|
||||||
for(i=0; i<CHAN_MAX; i++)
|
for(i=0; i<CHAN_MAX; i++)
|
||||||
|
4
pcf.c
4
pcf.c
@ -132,14 +132,14 @@ struct event_type cpu_ovni_tid = {
|
|||||||
ovni_tid_values
|
ovni_tid_values
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ---------------- CHAN_OVNI_NTHREADS ---------------- */
|
/* ---------------- CHAN_OVNI_NRTHREADS ---------------- */
|
||||||
|
|
||||||
struct event_value ovni_nthreads_values[] = {
|
struct event_value ovni_nthreads_values[] = {
|
||||||
{ -1, NULL },
|
{ -1, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
struct event_type cpu_ovni_nthreads = {
|
struct event_type cpu_ovni_nthreads = {
|
||||||
0, chan_to_prvtype[CHAN_OVNI_NTHREADS][CHAN_CPU],
|
0, chan_to_prvtype[CHAN_OVNI_NRTHREADS][CHAN_CPU],
|
||||||
"CPU: Number of RUNNING threads",
|
"CPU: Number of RUNNING threads",
|
||||||
ovni_nthreads_values
|
ovni_nthreads_values
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user