projects
/
lttv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
805e05f
)
-Wall -Wformat fixes
author
compudj
<compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 23 Aug 2005 01:00:22 +0000
(
01:00
+0000)
committer
compudj
<compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 23 Aug 2005 01:00:22 +0000
(
01:00
+0000)
git-svn-id: http://ltt.polymtl.ca/svn@1055
04897980
-b3bd-0310-b5e0-
8ef037075253
ltt/branches/poly/ltt/convert/convert.c
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/facility.c
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/facility.h
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/parser.c
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/parser.h
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/trace.h
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/tracefile.c
patch
|
blob
|
blame
|
history
diff --git
a/ltt/branches/poly/ltt/convert/convert.c
b/ltt/branches/poly/ltt/convert/convert.c
index 5f2de35fb5dc9902143700e98ccffc1841e199e8..55efb1536846f0b467d916efb282ad4a6f495366 100644
(file)
--- a/
ltt/branches/poly/ltt/convert/convert.c
+++ b/
ltt/branches/poly/ltt/convert/convert.c
@@
-151,9
+151,6
@@
int main(int argc, char ** argv){
heartbeat beat;
uint64_t adaptation_tsc; // (Mathieu)
uint32_t size_lost;
heartbeat beat;
uint64_t adaptation_tsc; // (Mathieu)
uint32_t size_lost;
- int reserve_size = sizeof(buffer_start) +
- sizeof(buffer_end) + //buffer_end event
- sizeof(uint32_t); //lost size
int nb_para;
new_process process;
int nb_para;
new_process process;
@@
-318,7
+315,7
@@
int main(int argc, char ** argv){
end.block_id = start.block_id;
end.block_id = start.block_id;
- g_
printf
("Trace version %hu.%hu detected\n",
+ g_
message
("Trace version %hu.%hu detected\n",
tStart->MajorVersion,
tStart->MinorVersion);
if(tStart->MinorVersion == 2) {
tStart->MajorVersion,
tStart->MinorVersion);
if(tStart->MinorVersion == 2) {
@@
-335,7
+332,7
@@
int main(int argc, char ** argv){
* with TRACE_SYSCALL_ENTRY.
*/
g_warning("This is a 2.3 trace format that has a 2.2 tag. Please upgrade your kernel");
* with TRACE_SYSCALL_ENTRY.
*/
g_warning("This is a 2.3 trace format that has a 2.2 tag. Please upgrade your kernel");
- g_
printf
("Processing the trace as a 2.3 format\n");
+ g_
message
("Processing the trace as a 2.3 format\n");
tStart->MinorVersion = 3;
}
tStart->MinorVersion = 3;
}
@@
-757,7
+754,7
@@
int main(int argc, char ** argv){
close(fdProc);
fclose(fp);
close(fdProc);
fclose(fp);
- g_
printf
("Conversion completed. Don't forget to copy core.xml to eventdefs directory\n");
+ g_
message
("Conversion completed. Don't forget to copy core.xml to eventdefs directory\n");
return 0;
}
return 0;
}
diff --git
a/ltt/branches/poly/ltt/facility.c
b/ltt/branches/poly/ltt/facility.c
index 0b5f1ee7d7ee8bfc0e385ea7f7b4583051bdc5a5..53519c02a683046b00b0b10b2c95aa16931a3aff 100644
(file)
--- a/
ltt/branches/poly/ltt/facility.c
+++ b/
ltt/branches/poly/ltt/facility.c
@@
-74,12
+74,12
@@
void freeLttNamedType(LttType * type);
int ltt_facility_open(LttFacility *f, LttTrace * t, gchar * pathname)
{
int ltt_facility_open(LttFacility *f, LttTrace * t, gchar * pathname)
{
+ int ret = 0;
gchar *token;
parse_file_t in;
gchar *token;
parse_file_t in;
- gsize length;
facility_t * fac;
unsigned long checksum;
facility_t * fac;
unsigned long checksum;
- GError * error = NULL;
+
//
GError * error = NULL;
gchar buffer[BUFFER_SIZE];
in.buffer = &(buffer[0]);
gchar buffer[BUFFER_SIZE];
in.buffer = &(buffer[0]);
@@
-93,7
+93,8
@@
int ltt_facility_open(LttFacility *f, LttTrace * t, gchar * pathname)
if(in.fp == NULL) {
g_warning("cannot open facility description file %s",
in.name);
if(in.fp == NULL) {
g_warning("cannot open facility description file %s",
in.name);
- return 1;
+ ret = 1;
+ goto open_error;
}
//in.channel = g_io_channel_unix_new(in.fd);
}
//in.channel = g_io_channel_unix_new(in.fd);
@@
-135,6
+136,7
@@
int ltt_facility_open(LttFacility *f, LttTrace * t, gchar * pathname)
}
else {
g_warning("facility token was expected in file %s", in.name);
}
else {
g_warning("facility token was expected in file %s", in.name);
+ ret = 1;
goto parse_error;
}
}
goto parse_error;
}
}
@@
-143,11
+145,13
@@
int ltt_facility_open(LttFacility *f, LttTrace * t, gchar * pathname)
//g_io_channel_shutdown(in.channel, FALSE, &error); /* No flush */
//if(error != NULL) {
fclose(in.fp);
//g_io_channel_shutdown(in.channel, FALSE, &error); /* No flush */
//if(error != NULL) {
fclose(in.fp);
+open_error:
// g_warning("Can not close file: \n%s\n", error->message);
// g_error_free(error);
//}
//g_close(in.fd);
// g_warning("Can not close file: \n%s\n", error->message);
// g_error_free(error);
//}
//g_close(in.fd);
+ return ret;
}
}
@@
-250,7
+254,7
@@
void generateFacility(LttFacility *f, facility_t *fac, guint32 checksum)
void construct_types_and_fields(LttFacility * fac, type_descriptor_t * td,
LttField * fld)
{
void construct_types_and_fields(LttFacility * fac, type_descriptor_t * td,
LttField * fld)
{
- int i
, flag
;
+ int i;
type_descriptor_t * tmpTd;
switch(td->type) {
type_descriptor_t * tmpTd;
switch(td->type) {
@@
-654,5
+658,6
@@
LttEventType *ltt_facility_eventtype_get(LttFacility *f, guint8 i)
LttEventType *ltt_facility_eventtype_get_by_name(LttFacility *f, GQuark name)
{
LttEventType *et = g_datalist_id_get_data(&f->events_by_name, name);
LttEventType *ltt_facility_eventtype_get_by_name(LttFacility *f, GQuark name)
{
LttEventType *et = g_datalist_id_get_data(&f->events_by_name, name);
+ return et;
}
}
diff --git
a/ltt/branches/poly/ltt/facility.h
b/ltt/branches/poly/ltt/facility.h
index 091d8af22be451a0e21daf83841269dda2ca3e39..173fd1433a1780b0794fa8ec45aee2c7d610e463 100644
(file)
--- a/
ltt/branches/poly/ltt/facility.h
+++ b/
ltt/branches/poly/ltt/facility.h
@@
-47,9
+47,5
@@
LttEventType *ltt_facility_eventtype_get_by_name(LttFacility *f, GQuark name);
void ltt_facility_close(LttFacility *f);
void ltt_facility_close(LttFacility *f);
-/* Reserved facility names */
-
-static const char *ltt_facility_name_core = "core";
-
#endif // FACILITY_H
#endif // FACILITY_H
diff --git
a/ltt/branches/poly/ltt/parser.c
b/ltt/branches/poly/ltt/parser.c
index aa87db950f66ede7cbfe018efdb477b6b7c97590..795b3f96f4ba0d5a8be7be6ab666c293c5b2c16b 100644
(file)
--- a/
ltt/branches/poly/ltt/parser.c
+++ b/
ltt/branches/poly/ltt/parser.c
@@
-38,11
+38,24
@@
This program is distributed in the hope that it will be useful,
#include <stdarg.h>
#include <linux/errno.h>
#include <assert.h>
#include <stdarg.h>
#include <linux/errno.h>
#include <assert.h>
-
+#include <ctype.h>
#include "parser.h"
#include "parser.h"
+static char *intOutputTypes[] = {
+ "int8_t", "int16_t", "int32_t", "int64_t", "short int", "int", "long int" };
+
+static char *uintOutputTypes[] = {
+ "uint8_t", "uint16_t", "uint32_t", "uint64_t", "unsigned short int",
+ "unsigned int", "unsigned long int" };
+
+static char *floatOutputTypes[] = {
+ "undef", "undef", "float", "double", "undef", "float", "double" };
+
+
+
+
/* helper function */
void strupper(char *string)
{
/* helper function */
void strupper(char *string)
{
@@
-173,7
+186,6
@@
char *allocAndCopy(char *str)
void getTypeAttributes(parse_file_t *in, type_descriptor_t *t)
{
char * token;
void getTypeAttributes(parse_file_t *in, type_descriptor_t *t)
{
char * token;
- char car;
t->fmt = NULL;
t->size = -1;
t->fmt = NULL;
t->size = -1;
@@
-465,7
+477,6
@@
void parseEvent(parse_file_t *in, event_t * ev, sequence_t * unnamed_types,
table_t * named_types)
{
char *token;
table_t * named_types)
{
char *token;
- type_descriptor_t *t;
//<event name=eventtype_name>
getEventAttributes(in, ev);
//<event name=eventtype_name>
getEventAttributes(in, ev);
@@
-1271,9
+1282,8
@@
void freeNamedType(table_t * t)
void freeTypes(sequence_t *t)
{
void freeTypes(sequence_t *t)
{
- int pos
, pos2
;
+ int pos;
type_descriptor_t *tp;
type_descriptor_t *tp;
- field_t *f;
for(pos = 0 ; pos < t->position; pos++) {
tp = (type_descriptor_t *)t->array[pos];
for(pos = 0 ; pos < t->position; pos++) {
tp = (type_descriptor_t *)t->array[pos];
diff --git
a/ltt/branches/poly/ltt/parser.h
b/ltt/branches/poly/ltt/parser.h
index 904109349dcc5ec1f13492e7d5cd45b8ef0919ce..c846697b89099338c938e9fef05784a738f6e133 100644
(file)
--- a/
ltt/branches/poly/ltt/parser.h
+++ b/
ltt/branches/poly/ltt/parser.h
@@
-167,17
+167,6
@@
char * getValueStrAttribute(parse_file_t *in);
char * getDescription(parse_file_t *in);
char * getDescription(parse_file_t *in);
-static char *intOutputTypes[] = {
- "int8_t", "int16_t", "int32_t", "int64_t", "short int", "int", "long int" };
-
-static char *uintOutputTypes[] = {
- "uint8_t", "uint16_t", "uint32_t", "uint64_t", "unsigned short int",
- "unsigned int", "unsigned long int" };
-
-static char *floatOutputTypes[] = {
- "undef", "undef", "float", "double", "undef", "float", "double" };
-
-
/* Dynamic memory allocation and freeing */
void * memAlloc(int size);
/* Dynamic memory allocation and freeing */
void * memAlloc(int size);
diff --git
a/ltt/branches/poly/ltt/trace.h
b/ltt/branches/poly/ltt/trace.h
index bb586320270f15cb04af62ac776a52ada9fa46f5..900a72de18355ef75faa7a8f6468cae19e056b3b 100644
(file)
--- a/
ltt/branches/poly/ltt/trace.h
+++ b/
ltt/branches/poly/ltt/trace.h
@@
-172,4
+172,8
@@
gint check_fields_compatibility(LttEventType *event_type1,
LttEventType *event_type2,
LttField *field1, LttField *field2);
LttEventType *event_type2,
LttField *field1, LttField *field2);
+gint64 ltt_get_int(gboolean reverse_byte_order, gint size, void *data);
+
+guint64 ltt_get_uint(gboolean reverse_byte_order, gint size, void *data);
+
#endif // TRACE_H
#endif // TRACE_H
diff --git
a/ltt/branches/poly/ltt/tracefile.c
b/ltt/branches/poly/ltt/tracefile.c
index 3eefa029003d98b4049cf274a398ab0a0d6454dc..5f4b4e28dc6ed2c513b38afe3e87ab5ed3cd16e2 100644
(file)
--- a/
ltt/branches/poly/ltt/tracefile.c
+++ b/
ltt/branches/poly/ltt/tracefile.c
@@
-76,11
+76,6
@@
GQuark LTT_TRACEFILE_NAME_FACILITIES;
#define PAGE_MASK (~(page_size-1))
#define PAGE_ALIGN(addr) (((addr)+page_size-1)&PAGE_MASK)
#define PAGE_MASK (~(page_size-1))
#define PAGE_ALIGN(addr) (((addr)+page_size-1)&PAGE_MASK)
-/* obtain the time of an event */
-
-static inline LttTime getEventTime(LttTracefile * tf);
-
-
/* set the offset of the fields belonging to the event,
need the information of the archecture */
void set_fields_offsets(LttTracefile *tf, LttEventType *event_type);
/* set the offset of the fields belonging to the event,
need the information of the archecture */
void set_fields_offsets(LttTracefile *tf, LttEventType *event_type);
@@
-540,7
+535,6
@@
int get_tracefile_name_number(const gchar *raw_name,
{
guint raw_name_len = strlen(raw_name);
gchar char_name[PATH_MAX];
{
guint raw_name_len = strlen(raw_name);
gchar char_name[PATH_MAX];
- gchar *digit_begin;
int i;
int underscore_pos;
long int cpu_num;
int i;
int underscore_pos;
long int cpu_num;
@@
-689,8
+683,6
@@
static int open_tracefiles(LttTrace *trace, gchar *root_path,
GQuark name;
guint num;
GArray *group;
GQuark name;
guint num;
GArray *group;
- LttTracefile *tf;
- guint len;
if(get_tracefile_name_number(rel_path, &name, &num))
continue; /* invalid name */
if(get_tracefile_name_number(rel_path, &name, &num))
continue; /* invalid name */
@@
-959,7
+951,6
@@
static int ltt_process_facility_tracefile(LttTracefile *tf)
return 0;
/* Error handling */
return 0;
/* Error handling */
-facility_error:
event_id_error:
fac_id_error:
update_error:
event_id_error:
fac_id_error:
update_error:
@@
-1157,7
+1148,6
@@
LttTracefile *ltt_trace_find_tracefile(LttTrace *t, const gchar *name)
static void ltt_tracefile_time_span_get(LttTracefile *tf,
LttTime *start, LttTime *end)
{
static void ltt_tracefile_time_span_get(LttTracefile *tf,
LttTime *start, LttTime *end)
{
- struct ltt_block_start_header * header;
int err;
err = map_block(tf, 0);
int err;
err = map_block(tf, 0);
@@
-1386,11
+1376,12
@@
int ltt_tracefile_seek_position(LttTracefile *tf, const LttEventPosition *ep) {
err = ltt_tracefile_read_op(tf);
if(err) goto fail;
err = ltt_tracefile_read_op(tf);
if(err) goto fail;
- return;
+ return
0
;
fail:
g_error("ltt_tracefile_seek_time failed on tracefile %s",
g_quark_to_string(tf->name));
fail:
g_error("ltt_tracefile_seek_time failed on tracefile %s",
g_quark_to_string(tf->name));
+ return 1;
}
/* Calculate the real event time based on the buffer boundaries */
}
/* Calculate the real event time based on the buffer boundaries */
@@
-1486,9
+1477,6
@@
int ltt_tracefile_read_seek(LttTracefile *tf)
/* do specific operation on events */
int ltt_tracefile_read_op(LttTracefile *tf)
{
/* do specific operation on events */
int ltt_tracefile_read_op(LttTracefile *tf)
{
- int err;
- LttFacility *f;
- void * pos;
LttEvent *event;
event = &tf->event;
LttEvent *event;
event = &tf->event;
@@
-1508,8
+1496,6
@@
int ltt_tracefile_read_op(LttTracefile *tf)
* event specific operation. */
int ltt_tracefile_read_update_event(LttTracefile *tf)
{
* event specific operation. */
int ltt_tracefile_read_update_event(LttTracefile *tf)
{
- int err;
- LttFacility *f;
void * pos;
LttEvent *event;
void * pos;
LttEvent *event;
@@
-1766,7
+1752,6
@@
static int ltt_seek_next_event(LttTracefile *tf)
{
int ret = 0;
void *pos;
{
int ret = 0;
void *pos;
- ssize_t event_size;
/* seek over the buffer header if we are at the buffer start */
if(tf->event.offset == 0) {
/* seek over the buffer header if we are at the buffer start */
if(tf->event.offset == 0) {
@@
-2038,7
+2023,6
@@
gint check_fields_compatibility(LttEventType *event_type1,
LttField *field1, LttField *field2)
{
guint different = 0;
LttField *field1, LttField *field2)
{
guint different = 0;
- enum field_status local_fixed_root, local_fixed_parent;
guint i;
LttType *type1;
LttType *type2;
guint i;
LttType *type1;
LttType *type2;
@@
-2064,11
+2048,6
@@
gint check_fields_compatibility(LttEventType *event_type1,
type1 = field1->field_type;
type2 = field2->field_type;
type1 = field1->field_type;
type2 = field2->field_type;
- size_t current_root_offset;
- size_t current_offset;
- enum field_status current_child_status, final_child_status;
- size_t max_size;
-
if(type1->type_class != type2->type_class) {
different = 1;
goto end;
if(type1->type_class != type2->type_class) {
different = 1;
goto end;
This page took
0.030773 seconds
and
4
git commands to generate.