Skip to content
Snippets Groups Projects
Commit 9244cc83 authored by ael-mess's avatar ael-mess
Browse files

changing repo, keeping ptask, adding java code for parser

parent b73676e0
No related branches found
No related tags found
No related merge requests found
Showing
with 153 additions and 11 deletions
.DS_Store 0 → 100644
File added
File added
File added
File deleted
File deleted
File deleted
File deleted
public abstract class kernel_tracepoint extends trace{
}
File deleted
File deleted
File added
File added
File added
package com.event;
public class clone_entry extends kernel_syscall {
protected Long clone_flag = null;
protected Long newsp = null;
protected Long parent_tid = null;
protected Long child_tid = null;
public clone_entry(Integer cpu_id, Integer pid, Integer tid, time_trace time, String flag, String newsp, String ptid, String ctid) {
public clone_entry(time_trace time, Integer cpu_id, Integer pid, Integer tid, String flag, String newsp, String ptid, String ctid) {
this.time = time;
this.cpu_id = cpu_id;
this.pid = pid;
this.tid = tid;
this.clone_flag = Long.parseLong(flag, 16);
this.newsp = Long.parseLong(newsp, 16);
this.parent_tid = Long.parseLong(ptid, 16);
this.child_tid = Long.parseLong(ctid, 16);
this.clone_flag = Long.parseLong(flag.substring(2), 16);
this.newsp = Long.parseLong(newsp.substring(2), 16);
this.parent_tid = Long.parseLong(ptid.substring(2), 16);
this.child_tid = Long.parseLong(ctid.substring(2), 16);
}
public Long getClone_flag() {
......@@ -29,4 +32,8 @@ public class clone_entry extends kernel_syscall {
public Long getChild_tid() {
return this.child_tid;
}
public String description() {
return "["+super.time.getHour()+":"+super.time.getMinute()+":"+super.time.getSeconde()+"] (+"+super.time.getDelta()+") cpu id="+super.getCpu_id()+", pid="+super.getPid()+", tid="+super.getTid()+" "+this.getClone_flag()+" "+this.getNewsp()+" "+this.getChild_tid()+" "+this.getParent_tid();
}
}
package com.event;
public class clone_exit extends kernel_syscall {
protected Integer ret = null;
public clone_exit(Integer cpu_id, Integer pid, Integer tid, Integer ret) {
public clone_exit(time_trace time, Integer cpu_id, Integer pid, Integer tid, Integer ret) {
this.time = time;
this.cpu_id = cpu_id;
this.pid = pid;
this.tid = tid;
......@@ -11,4 +14,8 @@ public class clone_exit extends kernel_syscall {
public Integer getRet() {
return this.ret;
}
public String description() {
return "["+super.time.getHour()+":"+super.time.getMinute()+":"+super.time.getSeconde()+"] (+"+super.time.getDelta()+") cpu id="+super.getCpu_id()+", pid="+super.getPid()+", tid="+super.getTid()+" "+this.getRet();
}
}
package com.event;
public abstract class kernel_syscall extends trace {
}
package com.event;
public abstract class kernel_tracepoint extends trace {
}
package com.event;
public class ptask_tracepoint extends userspace_tracepoint {
protected String flag = null;
protected String state = null;
protected Integer index = null;
protected Integer times = null;
protected Integer prio = null;
protected Integer periode = null;
protected Integer period = null;
protected Integer deadline = null;
public ptask_tracepoint(Integer cpu_id, Integer pid, Integer tid, String flag, String state, Integer idx, Integer tim, Integer prio, Integer peri, Integer dd) {
public ptask_tracepoint(time_trace time, Integer cpu_id, String pid, String tid, String flag, String state, String idx, String tim, String prio, String peri, String dd) {
this.time = time;
this.cpu_id = cpu_id;
this.pid = pid;
this.tid = tid;
this.pid = Integer.valueOf(pid);
this.tid = Integer.valueOf(tid);
this.flag = flag;
this.state = state;
this.index = idx;
this.times = tim;
this.prio = prio;
this.periode = peri;
this.deadline = dd;
this.index = Integer.valueOf(idx);
this.times = Integer.valueOf(tim);
this.prio = Integer.valueOf(prio);
this.period = Integer.valueOf(peri);
this.deadline = Integer.valueOf(dd);
}
public String getFlag() {
......@@ -40,11 +43,15 @@ public class ptask_tracepoint extends userspace_tracepoint {
return this.prio;
}
public Integer getPeriode() {
return this.periode;
public Integer getPeriod() {
return this.period;
}
public Integer getDeadline() {
return this.deadline;
}
public String description() {
return "["+super.time.getHour()+":"+super.time.getMinute()+":"+super.time.getSeconde()+"] (+"+super.time.getDelta()+") cpu id="+super.getCpu_id()+", pid="+super.getPid()+", tid="+super.getTid()+" "+this.getFlag()+" "+this.getState()+" "+this.getIndex()+" "+this.getTimes()+" "+this.getPrio()+" "+this.getPeriod()+" "+this.getDeadline();
}
}
package com.event;
public class sched_switch extends kernel_tracepoint {
protected String prev_comm = null;
protected String next_comm = null;
......@@ -7,17 +9,18 @@ public class sched_switch extends kernel_tracepoint {
protected Integer next_prio = null;
protected Integer prev_state = null;
public sched_switch(Integer cpu_id, Integer pid, Integer tid, String pcomm, String ncomm, Integer ptid, Integer ntid, Integer pprio, Integer nprio, Integer ps) {
public sched_switch(time_trace time, Integer cpu_id, Integer pid, Integer tid, String pcomm, String ncomm, String ptid, String ntid, String pprio, String nprio, String ps) {
this.time = time;
this.cpu_id = cpu_id;
this.pid = pid;
this.tid = tid;
this.prev_comm = pcomm;
this.next_comm = ncomm;
this.prev_tid = ptid;
this.next_tid = ntid;
this.prev_prio = pprio;
this.next_prio = nprio;
this.prev_state = ps;
this.prev_tid = Integer.valueOf(ptid);
this.next_tid = Integer.valueOf(ntid);
this.prev_prio = Integer.valueOf(pprio);
this.next_prio = Integer.valueOf(nprio);
this.prev_state = Integer.valueOf(ps);
}
public String getPrev_comm() {
......@@ -47,4 +50,8 @@ public class sched_switch extends kernel_tracepoint {
public Integer getPrev_state() {
return this.prev_state;
}
public String description() {
return "["+super.time.getHour()+":"+super.time.getMinute()+":"+super.time.getSeconde()+"] (+"+super.time.getDelta()+") cpu id="+super.getCpu_id()+ ", pid="+super.getPid()+", tid="+super.getTid()+" "+this.getPrev_comm()+" "+this.getNext_comm()+" "+this.getPrev_tid()+" "+this.getNext_tid()+" "+this.getPrev_prio()+" "+this.getNext_prio()+" "+this.getPrev_state();
}
}
package com.event;
public class time_trace {
protected Double hour = null;
protected Double minute = null;
protected Double seconde = null;
protected Double delta = null;
public time_trace(Integer h, Integer m, Integer s, Integer os, String d) {
public time_trace(Integer h, Integer m, Integer s, String os, String d) {
this.hour = (double) h;
this.minute = (double) m;
this.seconde = (double) s + (double) os*10;
this.seconde = (double) s + Double.valueOf("0."+os);
this.delta = Double.valueOf(d);
}
......@@ -21,11 +23,23 @@ public class time_trace {
public Double getTime(String in) {
if(in.equals("minute")) return (this.hour*60 + this.minute + this.seconde/60);
else if(in.equals("hour")) return (this.hour + this.minute/60 + this.seconde/60);
else if(in.equals("hour")) return (this.hour*60 + this.minute*60 + this.seconde);
else if(in.equals("seconde")) return (this.hour*60 + this.minute*60 + this.seconde);
else return -1.;
}
public Double getDelta() {
return this.delta;
}
public Double getHour() {
return this.hour;
}
public Double getMinute() {
return this.minute;
}
public Double getSeconde() {
return this.seconde;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment