Skip to content
Snippets Groups Projects
Commit 77bca1ae authored by fu5520tp's avatar fu5520tp
Browse files

cleanup proc fs output method

parent 6538d597
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,7 @@ void init_pb_rq(struct pb_rq *pb_rq) ...@@ -144,7 +144,7 @@ void init_pb_rq(struct pb_rq *pb_rq)
pb_rq->n_admin_cycles = 20; pb_rq->n_admin_cycles = 20;
pb_rq->count_admin_cycles = 0; pb_rq->count_admin_cycles = 0;
pb_rq->mode = PB_DISABLED_MODE; pb_rq->mode = PB_DISABLED_MODE;
pb_rq->c_entry = -1; pb_rq->c_entry = 0;
pb_rq->size = 0; pb_rq->size = 0;
pb_rq->pevent = NULL; pb_rq->pevent = NULL;
pb_rq->is_initialized = 0; pb_rq->is_initialized = 0;
...@@ -375,12 +375,10 @@ const struct sched_class pb_sched_class = { ...@@ -375,12 +375,10 @@ const struct sched_class pb_sched_class = {
EXPORT_SYMBOL(pb_sched_class); EXPORT_SYMBOL(pb_sched_class);
///////////////////// ProcFS Ausgabe /////////////////////////////////// /***********************************************************************
static struct plan_entry dummy_plan = { * /proc filesystem entry
.n_instr = 20000, * use 'cat /proc/pbsched' to read
.task_id = 0xCAFE, **********************************************************************/
.task_struct = NULL,
};
static int show_pbsched(struct seq_file *seq, void *v) static int show_pbsched(struct seq_file *seq, void *v)
{ {
...@@ -393,12 +391,6 @@ static int show_pbsched(struct seq_file *seq, void *v) ...@@ -393,12 +391,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
struct rq *rq; struct rq *rq;
struct pb_rq *pb; struct pb_rq *pb;
// perf event stuff here is for testing and will be deleted in the future
struct perf_event *event;
int perf_init_res;
u64 perf_counter;
u64 read_error;
int i; int i;
struct plan_entry *plan; struct plan_entry *plan;
...@@ -406,8 +398,6 @@ static int show_pbsched(struct seq_file *seq, void *v) ...@@ -406,8 +398,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
rq = cpu_rq(cpu); rq = cpu_rq(cpu);
pb = &(rq->pb); pb = &(rq->pb);
perf_init_res = init_perf_event(&dummy_plan, &event);
switch(pb->mode) { switch(pb->mode) {
case PB_DISABLED_MODE: mode='D'; break; case PB_DISABLED_MODE: mode='D'; break;
case PB_EXEC_MODE: mode='E'; break; case PB_EXEC_MODE: mode='E'; break;
...@@ -415,16 +405,6 @@ static int show_pbsched(struct seq_file *seq, void *v) ...@@ -415,16 +405,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
default: mode='U'; break; default: mode='U'; break;
} }
read_error = get_perf_counter(event, &perf_counter);
printk(KERN_WARNING "get_perf_counter: %llu\n", perf_counter);
terminate_perf_event(event);
if (read_error) {
printk(KERN_WARNING "Hi! FETCHING PERFORMANCE COUNTER IN PB SCHEDULER FAILED WITH %llu\n", read_error);
}
/* runqueue-specific stats */ /* runqueue-specific stats */
seq_printf(seq, seq_printf(seq,
"cpu%d %c %u %llu %llu\n", "cpu%d %c %u %llu %llu\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment