From 858ac9b5bedc9d5e849cc1e7455ee090c14e13d7 Mon Sep 17 00:00:00 2001 From: yangxx Date: Thu, 24 Jul 2003 19:50:51 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@134 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/yangxx/convert/convert.c | 32 +++------------------------ 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/ltt/branches/yangxx/convert/convert.c b/ltt/branches/yangxx/convert/convert.c index 52c9bb1b..7b6d03f5 100644 --- a/ltt/branches/yangxx/convert/convert.c +++ b/ltt/branches/yangxx/convert/convert.c @@ -105,7 +105,6 @@ int main(int argc, char ** argv){ buffer_start end; heartbeat beat; int beat_count = 0; - int *size_count; gboolean * has_event; uint32_t size_lost; int reserve_size = sizeof(buffer_start) + sizeof(uint16_t) + 2*sizeof(uint32_t);//lost_size and buffer_end event @@ -243,7 +242,6 @@ int main(int argc, char ** argv){ buf_out = g_new(char*,cpu); write_pos = g_new(void*, cpu); fdCpu = g_new(int, cpu); - size_count = g_new(int, cpu); has_event = g_new(gboolean, cpu); for(i=0;i=0){ if(ltt_log_cpu){ - size_count[cpu_id] += sizeof(uint16_t) + sizeof(uint32_t) + event_size; - if(size_count[cpu_id] > block_size - reserve_size){ - printf("size count exceeds the limit of the buffer\n"); - exit(1); - } write_to_buffer(write_pos[cpu_id], cur_pos, event_size); }else{ - size_count[0] += sizeof(uint16_t) + sizeof(uint32_t) + event_size; - if(size_count[0] > block_size - reserve_size){ - printf("size count exceeds the limit of the buffer\n"); - exit(1); - } write_to_buffer(write_pos[0], cur_pos, event_size); } if(evId == TRACE_HEARTBEAT){ if(ltt_log_cpu){ - size_count[cpu_id] += sizeof(heartbeat); write_to_buffer(write_pos[cpu_id],(void*)&beat , sizeof(heartbeat)); }else{ - size_count[0] += sizeof(heartbeat); write_to_buffer(write_pos[0], (void*)&beat, sizeof(heartbeat)); } } @@ -505,11 +489,6 @@ int main(int argc, char ** argv){ }else nbBytes = 0; if(ltt_log_cpu){ - size_count[cpu_id] += nbBytes + sizeof(uint16_t) + sizeof(uint32_t)+ event_size; - if(size_count[cpu_id] > block_size - reserve_size){ - printf("size count exceeds the limit of the buffer\n"); - exit(1); - } write_to_buffer(write_pos[cpu_id], cur_pos, event_size); cur_pos += event_size + sizeof(char*); if(nbBytes){ @@ -518,11 +497,6 @@ int main(int argc, char ** argv){ write_to_buffer(write_pos[cpu_id], (void*)&c, 1); } }else{ - size_count[0] += nbBytes + sizeof(uint16_t) + sizeof(uint32_t)+event_size; - if(size_count[0] > block_size - reserve_size){ - printf("size count exceeds the limit of the buffer\n"); - exit(1); - } write_to_buffer(write_pos[0], cur_pos, event_size); cur_pos += event_size + sizeof(char*); if(nbBytes){ -- 2.34.1