bugfix: trace

This commit is contained in:
云风
2012-09-17 23:04:18 +08:00
parent 1aa89d8672
commit ca6c467b2e
2 changed files with 20 additions and 4 deletions

View File

@@ -94,6 +94,7 @@ trace_register(struct trace_pool *p, int session) {
if (p->slot[hash]) {
p->slot[hash]->prev = t;
}
p->slot[hash] = t;
}
struct trace_info *
@@ -129,6 +130,7 @@ trace_switch(struct trace_pool *p, int session) {
if (t->next) {
t->next->prev = prev;
}
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t->ti);
return;
}
prev = t;