Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Reorganized the code a little and change from using shmem to mmap #8

Merged
merged 3 commits into from

2 participants

@akariv
Collaborator

No description provided.

Adam Kariv added some commits
Adam Kariv Some code and make file reorganization
- Create include directory
- Fix some makefile dependencies
30c029f
Adam Kariv SHMEM -> MMAP
63c3c05
@yotamr
Owner

Cool, did you test this on Android?
I think you left some debug printf()'s along the way, can you remove those?

Collaborator
Owner

Great, I'm waiting for an updated version.

Collaborator
Collaborator
@akariv
Collaborator

OK, removed those printfs.

@yotamr yotamr merged commit 6322cb6 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 22, 2012
  1. Some code and make file reorganization

    Adam Kariv authored
    - Create include directory
    - Fix some makefile dependencies
Commits on Apr 24, 2012
  1. SHMEM -> MMAP

    Adam Kariv authored
  2. Removed forgotten debug printf

    Adam Kariv authored
This page is out of date. Refresh to see the latest.
View
3  .gitignore
@@ -1,8 +1,11 @@
trace_dumper/trace_dumper
trace_reader/simple_trace_reader
trace_instrumentor/trace_instrumentor.so
+interactive_reader/_trace_parser_ctypes.py
traces.so
demo/demo
lib*.a
*.o
*.pyc
+*\#
+*~
View
49 Makefile
@@ -1,29 +1,44 @@
-CFLAGS=-I. -c -Wall -g -fPIC
-LIBTRACE_OBJS=trace_metadata_util.o trace_parser.o halt.o trace_user.o
-LIBTRACEUSER_OBJS=trace_metadata_util.o trace_user.o halt.o
+CFLAGS=-Iinclude/ -c -Wall -g -fPIC
+LLVM_CONFIG=$(TRACE_LLVM_CONFIG_PATH)
+
all: libtrace libtraceuser simple_trace_reader trace_dumper interactive_reader trace_instrumentor
-trace_dumper: $(LIBTRACE_OBJS) trace_dumper/trace_dumper.o trace_dumper/filesystem.o trace_user_stubs.o
- gcc -L. trace_dumper/filesystem.o trace_dumper/trace_dumper.o trace_user_stubs.o -ltrace -o trace_dumper/trace_dumper -lrt
-libtrace: $(LIBTRACE_OBJS)
- ar rcs libtrace.a trace_metadata_util.o trace_parser.o halt.o
- gcc -shared -g trace_metadata_util.o trace_parser.o halt.o -o traces.so
+libtrace: libtrace.a traces.so
+trace_dumper: trace_dumper/trace_dumper
+libtraceuser: libtraceuser.a
+simple_trace_reader: trace_reader/simple_trace_reader
+interactive_reader: interactive_reader/_trace_parser_ctypes.py
+
+LIBTRACEUSER_FILES:=trace_metadata_util halt trace_user
+LIBTRACE_FILES:=$(LIBTRACEUSER_FILES) trace_parser
+LIBTRACE_OBJS=$(LIBTRACE_FILES:%=libtrace/%.o)
+LIBTRACEUSER_OBJS=$(LIBTRACEUSER_FILES:%=libtrace/%.o)
+
+libtrace.a traces.so: $(LIBTRACE_OBJS)
+ ar rcs libtrace.a $^
+ gcc -shared -g -o traces.so $^
-libtraceuser: $(LIBTRACEUSER_OBJS)
- ar rcs libtraceuser.a trace_metadata_util.o trace_user.o halt.o
+trace_dumper/trace_dumper: $(LIBTRACE_OBJS) trace_dumper/trace_dumper.o trace_dumper/filesystem.o trace_dumper/trace_user_stubs.o
+ gcc -L. trace_dumper/filesystem.o trace_dumper/trace_dumper.o trace_dumper/trace_user_stubs.o -ltrace -o trace_dumper/trace_dumper -lrt
-simple_trace_reader: $(LIBTRACE_OBJS) trace_reader/simple_trace_reader.o
+libtraceuser.a: $(LIBTRACEUSER_OBJS)
+ ar rcs libtraceuser.a $^
+
+trace_reader/simple_trace_reader: $(LIBTRACE_OBJS) trace_reader/simple_trace_reader.o
gcc -L. trace_reader/simple_trace_reader.o -ltrace -o trace_reader/simple_trace_reader
-interactive_reader: trace_parser.h
- h2xml -c -I. trace_parser.h -o _trace_parser_ctypes.xml
- xml2py -k f -k e -k s _trace_parser_ctypes.xml > interactive_reader/_trace_parser_ctypes.py
+interactive_reader/_trace_parser_ctypes.py: include/trace_parser.h
+ h2xml.py -c -I. include/trace_parser.h -o _trace_parser_ctypes.xml
+ xml2py.py -k f -k e -k s _trace_parser_ctypes.xml > interactive_reader/_trace_parser_ctypes.py
rm _trace_parser_ctypes.xml
-trace_instrumentor/trace_instrumentor.o: CXXFLAGS := $(shell llvm-config --cxxflags)
-trace_instrumentor/trace_instrumentor.o: LDFLAGS := $(shell llvm-config --libs --ldflags)
+trace_instrumentor/trace_instrumentor.o: CXXFLAGS := $(shell $(LLVM_CONFIG) --cxxflags) -Iinclude/ $(TRACE_CLANG_INCLUDE_PATH:%=-I%)
+trace_instrumentor/trace_instrumentor.o: LDFLAGS := $(shell $(LLVM_CONFIG) --libs --ldflags)
trace_instrumentor: trace_instrumentor/trace_instrumentor.o
gcc $(LDFLAGS) -shared trace_instrumentor/trace_instrumentor.o -o trace_instrumentor/trace_instrumentor.so
clean:
- rm -f *.o trace_reader/simple_trace_reader.o trace_reader/simple_trace_reader trace_dumper/*.o trace_instrumentor/*.o trace_instrumentor/*.so trace_dumper/trace_dumper trace_reader/trace_reader *so *.a
+ find -name \*.o -exec rm \{} \;
+ rm *.so *.a
+ rm interactive_reader/_trace_parser_ctypes.py
+
View
4 ccwrap.py
@@ -107,8 +107,8 @@ def main():
cpp_args.extend(["-w", "-D", "_GNU_SOURCE"])
cpp_args.extend(["-D", "__TRACE_INSTRUMENTATION"])
- cpp_args.extend(["-include", os.path.join(os.path.dirname(sys.argv[0]), "trace_lib.h")])
- cpp_args.extend(["-include", os.path.join(os.path.dirname(sys.argv[0]), "trace_user.h")])
+ cpp_args.extend(["-include", os.path.join(os.path.dirname(sys.argv[0]), "include/trace_lib.h")])
+ cpp_args.extend(["-include", os.path.join(os.path.dirname(sys.argv[0]), "include/trace_user.h")])
out_pp_file = pp_file + ".i"
ret = spawn(cpp_args)
View
4 env_setup.sh
@@ -0,0 +1,4 @@
+export TRACE_INSTRUMENTOR=/code/traces/trace_instrumentor/trace_instrumentor.so
+export TRACE_CLANG_PATH=/code/clang/build/Release/bin
+export TRACE_LLVM_CONFIG_PATH=/code/clang/build/Release/bin/llvm-config
+export TRACE_CLANG_INCLUDE_PATH="/code/clang/llvm/include/ /code/clang/llvm/tools/clang/include/ /code/clang/build/tools/clang/include/ /code/clang/build/include/"
View
0  array_length.h → include/array_length.h
File renamed without changes
View
0  bool.h → include/bool.h
File renamed without changes
View
13 include/config.h
@@ -0,0 +1,13 @@
+#ifndef _CONFIG_H_
+#define _CONFIG_H_
+
+#define SHM_PATH "/dev/shm/"
+#define TRACE_SHM_ID "_trace_shm_"
+
+#ifndef ANDROID
+#define TRACE_RECORD_BUFFER_RECS 0x100000
+#else
+#define TRACE_RECORD_BUFFER_RECS 0x100000
+#endif
+
+#endif // _CONFIG_H_
View
0  halt.h → include/halt.h
File renamed without changes
View
0  list_template.h → include/list_template.h
File renamed without changes
View
0  macros.h → include/macros.h
File renamed without changes
View
0  min_max.h → include/min_max.h
File renamed without changes
View
0  object_pool.h → include/object_pool.h
File renamed without changes
View
161 trace_defs.h → include/trace_defs.h
@@ -18,13 +18,14 @@ Copyright 2012 Yotam Rubin <yotamrubin@gmail.com>
#ifndef __TRACE_DEFS_H__
#define __TRACE_DEFS_H__
+#include "config.h"
+
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_METADATA_SIZE (0x1000000)
#define TRACE_BUFFER_NUM_RECORDS (3)
-#define TRACE_RECORD_BUFFER_RECS 0x100000
#define TRACE_SEVERITY_DEF \
@@ -48,19 +49,19 @@ TRACE_SEVERITY_DEF
static inline int trace_strcmp(const char *s1, const char *s2)
{
- /* Move s1 and s2 to the first differing characters
- in each string, or the ends of the strings if they
- are identical. */
- while (*s1 != '\0' && *s1 == *s2) {
- s1++;
- s2++;
- }
- /* Compare the characters as unsigned char and
- return the difference. */
- const unsigned char uc1 = (*(const unsigned char *) s1);
- const unsigned char uc2 = (*(const unsigned char *) s2);
- return ((uc1 < uc2) ? -1 : (uc1 > uc2));
- }
+ /* Move s1 and s2 to the first differing characters
+ in each string, or the ends of the strings if they
+ are identical. */
+ while (*s1 != '\0' && *s1 == *s2) {
+ s1++;
+ s2++;
+ }
+ /* Compare the characters as unsigned char and
+ return the difference. */
+ const unsigned char uc1 = (*(const unsigned char *) s1);
+ const unsigned char uc2 = (*(const unsigned char *) s2);
+ return ((uc1 < uc2) ? -1 : (uc1 > uc2));
+}
#define TRACE_SEV_X(num, name) \
if (trace_strcmp(function_name, #name) == 0) { \
@@ -74,13 +75,13 @@ static inline enum trace_severity trace_function_name_to_severity(const char *fu
}
enum trace_rec_type {
- TRACE_REC_TYPE_UNKNOWN = 0,
- TRACE_REC_TYPE_TYPED = 1,
- TRACE_REC_TYPE_FILE_HEADER = 2,
- TRACE_REC_TYPE_METADATA_HEADER = 3,
- TRACE_REC_TYPE_METADATA_PAYLOAD = 4,
- TRACE_REC_TYPE_DUMP_HEADER = 5,
- TRACE_REC_TYPE_BUFFER_CHUNK = 6,
+ TRACE_REC_TYPE_UNKNOWN = 0,
+ TRACE_REC_TYPE_TYPED = 1,
+ TRACE_REC_TYPE_FILE_HEADER = 2,
+ TRACE_REC_TYPE_METADATA_HEADER = 3,
+ TRACE_REC_TYPE_METADATA_PAYLOAD = 4,
+ TRACE_REC_TYPE_DUMP_HEADER = 5,
+ TRACE_REC_TYPE_BUFFER_CHUNK = 6,
TRACE_REC_TYPE_END_OF_FILE = 7
};
@@ -96,21 +97,21 @@ enum trace_log_descriptor_kind {
enum trace_termination_type {
- TRACE_TERMINATION_LAST = 1,
- TRACE_TERMINATION_FIRST = 2
+ TRACE_TERMINATION_LAST = 1,
+ TRACE_TERMINATION_FIRST = 2
};
#define TRACE_MACHINE_ID_SIZE 0x18
static inline int trace_compare_generation(unsigned int a, unsigned int b)
{
- if (a >= 0xc0000000 && b < 0x40000000)
- return 1;
- if (b > a)
- return 1;
- if (b < a)
- return -1;
- return 0;
+ if (a >= 0xc0000000 && b < 0x40000000)
+ return 1;
+ if (b > a)
+ return 1;
+ if (b < a)
+ return -1;
+ return 0;
}
enum trace_file_type {
@@ -143,61 +144,61 @@ struct trace_type_definition {
};
struct trace_record {
- /* 20 bytes header */
- unsigned long long ts;
- unsigned short int pid;
- unsigned short int tid;
+ /* 20 bytes header */
+ unsigned long long ts;
+ unsigned short int pid;
+ unsigned short int tid;
short nesting;
- unsigned termination:2;
- unsigned reserved:6;
- unsigned severity:4;
- unsigned rec_type:4;
- unsigned int generation;
-
- /* 44 bytes payload */
- union trace_record_u {
- unsigned char payload[TRACE_RECORD_PAYLOAD_SIZE];
- struct trace_record_typed {
- unsigned int log_id;
- unsigned char payload[0];
- } typed;
- struct trace_record_file_header {
- unsigned char machine_id[TRACE_MACHINE_ID_SIZE];
+ unsigned termination:2;
+ unsigned reserved:6;
+ unsigned severity:4;
+ unsigned rec_type:4;
+ unsigned int generation;
+
+ /* 44 bytes payload */
+ union trace_record_u {
+ unsigned char payload[TRACE_RECORD_PAYLOAD_SIZE];
+ struct trace_record_typed {
+ unsigned int log_id;
+ unsigned char payload[0];
+ } typed;
+ struct trace_record_file_header {
+ unsigned char machine_id[TRACE_MACHINE_ID_SIZE];
unsigned long long boot_time;
- } file_header;
- struct trace_record_metadata {
- unsigned int metadata_size_bytes;
- } metadata;
- struct trace_record_dump_header {
- unsigned int prev_dump_offset;
- unsigned int total_dump_size;
+ } file_header;
+ struct trace_record_metadata {
+ unsigned int metadata_size_bytes;
+ } metadata;
+ struct trace_record_dump_header {
+ unsigned int prev_dump_offset;
+ unsigned int total_dump_size;
unsigned int first_chunk_offset;
- } dump_header;
- struct trace_record_buffer_dump {
- unsigned int last_metadata_offset;
- unsigned int prev_chunk_offset;
- unsigned int dump_header_offset;
- unsigned long long ts;
- unsigned int records;
- unsigned int severity_type;
- } buffer_chunk;
- } __attribute__((packed)) u;
+ } dump_header;
+ struct trace_record_buffer_dump {
+ unsigned int last_metadata_offset;
+ unsigned int prev_chunk_offset;
+ unsigned int dump_header_offset;
+ unsigned long long ts;
+ unsigned int records;
+ unsigned int severity_type;
+ } buffer_chunk;
+ } __attribute__((packed)) u;
} __attribute__((packed));
-
+
enum trace_param_desc_flags {
- TRACE_PARAM_FLAG_NUM_8 = 0x001,
- TRACE_PARAM_FLAG_NUM_16 = 0x002,
- TRACE_PARAM_FLAG_NUM_32 = 0x004,
- TRACE_PARAM_FLAG_NUM_64 = 0x008,
- TRACE_PARAM_FLAG_VARRAY = 0x010,
- TRACE_PARAM_FLAG_CSTR = 0x020,
-
- TRACE_PARAM_FLAG_STR = 0x040,
- TRACE_PARAM_FLAG_BLOB = 0x080,
-
- TRACE_PARAM_FLAG_UNSIGNED = 0x100,
- TRACE_PARAM_FLAG_HEX = 0x200,
- TRACE_PARAM_FLAG_ZERO = 0x400,
+ TRACE_PARAM_FLAG_NUM_8 = 0x001,
+ TRACE_PARAM_FLAG_NUM_16 = 0x002,
+ TRACE_PARAM_FLAG_NUM_32 = 0x004,
+ TRACE_PARAM_FLAG_NUM_64 = 0x008,
+ TRACE_PARAM_FLAG_VARRAY = 0x010,
+ TRACE_PARAM_FLAG_CSTR = 0x020,
+
+ TRACE_PARAM_FLAG_STR = 0x040,
+ TRACE_PARAM_FLAG_BLOB = 0x080,
+
+ TRACE_PARAM_FLAG_UNSIGNED = 0x100,
+ TRACE_PARAM_FLAG_HEX = 0x200,
+ TRACE_PARAM_FLAG_ZERO = 0x400,
TRACE_PARAM_FLAG_ENUM = 0x800,
TRACE_PARAM_FLAG_RECORD = 0x1000,
TRACE_PARAM_FLAG_ENTER = 0x2000,
View
22 trace_lib.h → include/trace_lib.h
@@ -22,18 +22,28 @@ Copyright 2012 Yotam Rubin <yotamrubin@gmail.com>
extern "C" {
#endif
-#define TRACE_SHM_ID "_trace_shm_"
+#include "config.h"
#include "trace_defs.h"
#include <sys/syscall.h>
#include <time.h>
-#ifndef _UNISTD_H
+#ifdef ANDROID
+#ifndef _UNISTD_H
#ifdef __cplusplus
- extern long int syscall (long int __sysno, ...) throw ();
+ extern int syscall (int __sysno, ...) throw ();
#else
+ extern int syscall(int __sysno, ...);
+#endif //__clusplus
+#endif //_UNISTD
+#else //ANDROID
+#ifndef _SYS_SYSCALL_H_
+#ifdef __cplusplus
+ extern long int syscall (long int __sysno, ...) throw ();
+#else
extern long int syscall(long int __sysno, ...);
-#endif
-#endif
+#endif //__cplusplus
+#endif //_SYS_SYSCALL_H_
+#endif //ANDROID
#define _O_RDONLY 00000000
extern struct trace_buffer *current_trace_buffer;
@@ -41,7 +51,7 @@ extern struct trace_log_descriptor __static_log_information_start;
extern struct trace_log_descriptor __static_log_information_end;
extern struct trace_type_definition *__type_information_start;
extern __thread unsigned short trace_current_nesting;
-
+
static inline unsigned short int trace_get_pid(void)
{
static __thread int pid_cache = 0;
View
0  trace_metadata_util.h → include/trace_metadata_util.h
File renamed without changes
View
0  trace_parser.h → include/trace_parser.h
File renamed without changes
View
0  trace_user.h → include/trace_user.h
File renamed without changes
View
587 interactive_reader/_trace_parser_ctypes.py
@@ -1,587 +0,0 @@
-from ctypes import *
-
-STRING = c_char_p
-
-
-class trace_type_definition(Structure):
- pass
-
-# values for enumeration 'trace_type_id'
-TRACE_TYPE_ID_ENUM = 1
-TRACE_TYPE_ID_RECORD = 2
-TRACE_TYPE_ID_TYPEDEF = 3
-trace_type_id = c_int # enum
-class N21trace_type_definition4DOT_30E(Union):
- pass
-class trace_enum_value(Structure):
- pass
-N21trace_type_definition4DOT_30E._fields_ = [
- ('params', c_void_p),
- ('enum_values', POINTER(trace_enum_value)),
-]
-trace_type_definition._anonymous_ = ['_0']
-trace_type_definition._fields_ = [
- ('type_id', trace_type_id),
- ('type_name', STRING),
- ('_0', N21trace_type_definition4DOT_30E),
-]
-trace_enum_value._fields_ = [
- ('name', STRING),
- ('value', c_uint),
-]
-class trace_record(Structure):
- pass
-class trace_record_u(Union):
- pass
-class trace_record_typed(Structure):
- pass
-trace_record_typed._fields_ = [
- ('log_id', c_uint),
- ('payload', c_ubyte * 0),
-]
-class trace_record_file_header(Structure):
- pass
-trace_record_file_header._fields_ = [
- ('machine_id', c_ubyte * 24),
- ('boot_time', c_ulonglong),
-]
-class trace_record_metadata(Structure):
- pass
-trace_record_metadata._fields_ = [
- ('metadata_size_bytes', c_uint),
-]
-class trace_record_dump_header(Structure):
- pass
-trace_record_dump_header._fields_ = [
- ('prev_dump_offset', c_uint),
- ('total_dump_size', c_uint),
- ('first_chunk_offset', c_uint),
-]
-class trace_record_buffer_dump(Structure):
- pass
-trace_record_buffer_dump._fields_ = [
- ('last_metadata_offset', c_uint),
- ('prev_chunk_offset', c_uint),
- ('dump_header_offset', c_uint),
- ('ts', c_ulonglong),
- ('records', c_uint),
- ('severity_type', c_uint),
-]
-trace_record_u._pack_ = 1
-trace_record_u._fields_ = [
- ('payload', c_ubyte * 44),
- ('typed', trace_record_typed),
- ('file_header', trace_record_file_header),
- ('metadata', trace_record_metadata),
- ('dump_header', trace_record_dump_header),
- ('buffer_chunk', trace_record_buffer_dump),
-]
-trace_record._fields_ = [
- ('ts', c_ulonglong),
- ('pid', c_ushort),
- ('tid', c_ushort),
- ('nesting', c_short),
- ('termination', c_uint, 2),
- ('reserved', c_uint, 6),
- ('severity', c_uint, 4),
- ('rec_type', c_uint, 4),
- ('generation', c_uint),
- ('u', trace_record_u),
-]
-class trace_param_descriptor(Structure):
- pass
-class N22trace_param_descriptor4DOT_31E(Union):
- pass
-N22trace_param_descriptor4DOT_31E._fields_ = [
- ('str', STRING),
- ('const_str', STRING),
- ('type_name', STRING),
-]
-trace_param_descriptor._anonymous_ = ['_0']
-trace_param_descriptor._fields_ = [
- ('flags', c_ulong),
- ('param_name', STRING),
- ('_0', N22trace_param_descriptor4DOT_31E),
-]
-class trace_log_descriptor(Structure):
- pass
-
-# values for enumeration 'trace_log_descriptor_kind'
-TRACE_LOG_DESCRIPTOR_KIND_FUNC_ENTRY = 0
-TRACE_LOG_DESCRIPTOR_KIND_FUNC_LEAVE = 1
-TRACE_LOG_DESCRIPTOR_KIND_EXPLICIT = 2
-trace_log_descriptor_kind = c_int # enum
-trace_log_descriptor._fields_ = [
- ('kind', trace_log_descriptor_kind),
- ('params', POINTER(trace_param_descriptor)),
-]
-class trace_metadata_region(Structure):
- pass
-trace_metadata_region._fields_ = [
- ('name', c_char * 256),
- ('base_address', c_void_p),
- ('log_descriptor_count', c_ulong),
- ('type_definition_count', c_ulong),
- ('data', c_char * 0),
-]
-class trace_parser_buffer_context(Structure):
- pass
-trace_parser_buffer_context._fields_ = [
- ('metadata', POINTER(trace_metadata_region)),
- ('metadata_size', c_ulong),
- ('current_metadata_offset', c_ulong),
- ('metadata_read', c_ulong),
- ('descriptors', POINTER(trace_log_descriptor)),
- ('types', POINTER(trace_type_definition)),
- ('name', c_char * 256),
- ('id', c_uint),
-]
-class trace_record_accumulator(Structure):
- pass
-trace_record_accumulator._fields_ = [
- ('accumulated_data', c_char * 40960),
- ('data_offset', c_uint),
- ('tid', c_ushort),
-]
-class BufferParseContextList_s(Structure):
- pass
-BufferParseContextList_s._fields_ = [
- ('element_count', c_int),
- ('elements', trace_parser_buffer_context * 20),
-]
-class RecordsAccumulatorList_s(Structure):
- pass
-RecordsAccumulatorList_s._fields_ = [
- ('element_count', c_int),
- ('elements', trace_record_accumulator * 20),
-]
-class parser_complete_typed_record(Structure):
- pass
-parser_complete_typed_record._fields_ = [
- ('record', POINTER(trace_record)),
- ('buffer', POINTER(trace_parser_buffer_context)),
-]
-class trace_file_info(Structure):
- pass
-trace_file_info._fields_ = [
- ('filename', c_char * 256),
- ('machine_id', c_char * 256),
- ('boot_time', c_long),
- ('fd', c_int),
-]
-class record_dump_context_s(Structure):
- pass
-record_dump_context_s._fields_ = [
- ('start_offset', c_longlong),
- ('current_offset', c_longlong),
- ('end_offset', c_longlong),
-]
-class buffer_dump_context_s(Structure):
- pass
-buffer_dump_context_s._fields_ = [
- ('record_dump_contexts', record_dump_context_s * 150),
- ('end_offset', c_longlong),
- ('previous_dump_offset', c_longlong),
- ('file_offset', c_longlong),
- ('num_chunks', c_uint),
-]
-class trace_record_matcher_spec_s(Structure):
- pass
-
-# values for enumeration 'trace_record_matcher_type'
-TRACE_MATCHER_TRUE = 0
-TRACE_MATCHER_FALSE = 1
-TRACE_MATCHER_OR = 2
-TRACE_MATCHER_AND = 3
-TRACE_MATCHER_NOT = 4
-TRACE_MATCHER_PID = 5
-TRACE_MATCHER_TID = 6
-TRACE_MATCHER_TIMERANGE = 7
-TRACE_MATCHER_LOGID = 8
-TRACE_MATCHER_SEVERITY = 9
-TRACE_MATCHER_FUNCTION = 10
-TRACE_MATCHER_TYPE = 11
-TRACE_MATCHER_LOG_PARAM_VALUE = 12
-TRACE_MATCHER_LOG_NAMED_PARAM_VALUE = 13
-TRACE_MATCHER_PROCESS_NAME = 14
-trace_record_matcher_type = c_int # enum
-class trace_record_matcher_data_u(Union):
- pass
-class trace_time_range(Structure):
- pass
-trace_time_range._fields_ = [
- ('start', c_ulonglong),
- ('end', c_ulonglong),
-]
-class trace_matcher_named_param_value(Structure):
- pass
-trace_matcher_named_param_value._fields_ = [
- ('param_name', c_char * 256),
- ('param_value', c_ulonglong),
-]
-class trace_record_matcher_binary_operator_params(Structure):
- pass
-trace_record_matcher_binary_operator_params._fields_ = [
- ('a', POINTER(trace_record_matcher_spec_s)),
- ('b', POINTER(trace_record_matcher_spec_s)),
-]
-class trace_record_matcher_unary_operator_params(Structure):
- pass
-trace_record_matcher_unary_operator_params._fields_ = [
- ('param', POINTER(trace_record_matcher_spec_s)),
-]
-trace_record_matcher_data_u._fields_ = [
- ('pid', c_ushort),
- ('tid', c_ushort),
- ('log_id', c_uint),
- ('severity', c_uint),
- ('time_range', trace_time_range),
- ('function_name', c_char * 256),
- ('type_name', c_char * 256),
- ('process_name', c_char * 256),
- ('param_value', c_ulonglong),
- ('named_param_value', trace_matcher_named_param_value),
- ('binary_operator_parameters', trace_record_matcher_binary_operator_params),
- ('unary_operator_parameters', trace_record_matcher_unary_operator_params),
-]
-trace_record_matcher_spec_s._fields_ = [
- ('type', trace_record_matcher_type),
- ('u', trace_record_matcher_data_u),
-]
-class trace_parser(Structure):
- pass
-BufferParseContextList = BufferParseContextList_s
-RecordsAccumulatorList = RecordsAccumulatorList_s
-
-# values for enumeration 'trace_parser_event_e'
-TRACE_PARSER_COMPLETE_TYPED_RECORD_PROCESSED = 0
-TRACE_PARSER_MATCHED_RECORD = 1
-TRACE_PARSER_SEARCHING_METADATA = 2
-TRACE_PARSER_FOUND_METADATA = 3
-trace_parser_event_e = c_int # enum
-trace_parser_event_handler_t = CFUNCTYPE(None, POINTER(trace_parser), trace_parser_event_e, c_void_p, c_void_p)
-class _IO_FILE(Structure):
- pass
-FILE = _IO_FILE
-
-# values for enumeration 'trace_input_stream_type'
-TRACE_INPUT_STREAM_TYPE_NONSEEKABLE = 0
-TRACE_INPUT_STREAM_TYPE_SEEKABLE_FILE = 1
-trace_input_stream_type = c_int # enum
-trace_parser._fields_ = [
- ('fd', c_int),
- ('file_info', trace_file_info),
- ('buffer_contexts', BufferParseContextList),
- ('records_accumulators', RecordsAccumulatorList),
- ('buffer_dump_context', buffer_dump_context_s),
- ('event_handler', trace_parser_event_handler_t),
- ('max_ts', c_ulonglong),
- ('arg', c_void_p),
- ('out_file', POINTER(FILE)),
- ('color', c_int),
- ('always_hex', c_int),
- ('indent', c_int),
- ('relative_ts', c_int),
- ('record_filter', trace_record_matcher_spec_s),
- ('ignored_records_count', c_uint),
- ('stream_type', trace_input_stream_type),
-]
-class _G_fpos_t(Structure):
- pass
-__off_t = c_long
-class __mbstate_t(Structure):
- pass
-class N11__mbstate_t4DOT_26E(Union):
- pass
-N11__mbstate_t4DOT_26E._fields_ = [
- ('__wch', c_uint),
- ('__wchb', c_char * 4),
-]
-__mbstate_t._fields_ = [
- ('__count', c_int),
- ('__value', N11__mbstate_t4DOT_26E),
-]
-_G_fpos_t._fields_ = [
- ('__pos', __off_t),
- ('__state', __mbstate_t),
-]
-class _G_fpos64_t(Structure):
- pass
-__off64_t = c_long
-_G_fpos64_t._fields_ = [
- ('__pos', __off64_t),
- ('__state', __mbstate_t),
-]
-class _IO_jump_t(Structure):
- pass
-_IO_jump_t._fields_ = [
-]
-class _IO_marker(Structure):
- pass
-_IO_marker._fields_ = [
- ('_next', POINTER(_IO_marker)),
- ('_sbuf', POINTER(_IO_FILE)),
- ('_pos', c_int),
-]
-_IO_lock_t = None
-size_t = c_ulong
-_IO_FILE._fields_ = [
- ('_flags', c_int),
- ('_IO_read_ptr', STRING),
- ('_IO_read_end', STRING),
- ('_IO_read_base', STRING),
- ('_IO_write_base', STRING),
- ('_IO_write_ptr', STRING),
- ('_IO_write_end', STRING),
- ('_IO_buf_base', STRING),
- ('_IO_buf_end', STRING),
- ('_IO_save_base', STRING),
- ('_IO_backup_base', STRING),
- ('_IO_save_end', STRING),
- ('_markers', POINTER(_IO_marker)),
- ('_chain', POINTER(_IO_FILE)),
- ('_fileno', c_int),
- ('_flags2', c_int),
- ('_old_offset', __off_t),
- ('_cur_column', c_ushort),
- ('_vtable_offset', c_byte),
- ('_shortbuf', c_char * 1),
- ('_lock', POINTER(_IO_lock_t)),
- ('_offset', __off64_t),
- ('__pad1', c_void_p),
- ('__pad2', c_void_p),
- ('__pad3', c_void_p),
- ('__pad4', c_void_p),
- ('__pad5', size_t),
- ('_mode', c_int),
- ('_unused2', c_char * 20),
-]
-class _IO_FILE_plus(Structure):
- pass
-_IO_FILE_plus._fields_ = [
-]
-class _IO_cookie_io_functions_t(Structure):
- pass
-__ssize_t = c_long
-__io_read_fn = CFUNCTYPE(__ssize_t, c_void_p, STRING, size_t)
-__io_write_fn = CFUNCTYPE(__ssize_t, c_void_p, STRING, size_t)
-__io_seek_fn = CFUNCTYPE(c_int, c_void_p, POINTER(__off64_t), c_int)
-__io_close_fn = CFUNCTYPE(c_int, c_void_p)
-_IO_cookie_io_functions_t._fields_ = [
- ('read', POINTER(__io_read_fn)),
- ('write', POINTER(__io_write_fn)),
- ('seek', POINTER(__io_seek_fn)),
- ('close', POINTER(__io_close_fn)),
-]
-class _IO_cookie_file(Structure):
- pass
-_IO_cookie_file._fields_ = [
-]
-class _pthread_cleanup_buffer(Structure):
- pass
-_pthread_cleanup_buffer._fields_ = [
- ('__routine', CFUNCTYPE(None, c_void_p)),
- ('__arg', c_void_p),
- ('__canceltype', c_int),
- ('__prev', POINTER(_pthread_cleanup_buffer)),
-]
-class _4DOT_23(Structure):
- pass
-class N4DOT_234DOT_24E(Structure):
- pass
-__jmp_buf = c_long * 8
-N4DOT_234DOT_24E._fields_ = [
- ('__cancel_jmp_buf', __jmp_buf),
- ('__mask_was_saved', c_int),
-]
-_4DOT_23._fields_ = [
- ('__cancel_jmp_buf', N4DOT_234DOT_24E * 1),
- ('__pad', c_void_p * 4),
-]
-class __pthread_cleanup_frame(Structure):
- pass
-__pthread_cleanup_frame._fields_ = [
- ('__cancel_routine', CFUNCTYPE(None, c_void_p)),
- ('__cancel_arg', c_void_p),
- ('__do_it', c_int),
- ('__cancel_type', c_int),
-]
-class __jmp_buf_tag(Structure):
- pass
-__jmp_buf_tag._fields_ = [
-]
-class obstack(Structure):
- pass
-obstack._fields_ = [
-]
-class timespec(Structure):
- pass
-__time_t = c_long
-timespec._fields_ = [
- ('tv_sec', __time_t),
- ('tv_nsec', c_long),
-]
-class tm(Structure):
- pass
-tm._fields_ = [
- ('tm_sec', c_int),
- ('tm_min', c_int),
- ('tm_hour', c_int),
- ('tm_mday', c_int),
- ('tm_mon', c_int),
- ('tm_year', c_int),
- ('tm_wday', c_int),
- ('tm_yday', c_int),
- ('tm_isdst', c_int),
- ('tm_gmtoff', c_long),
- ('tm_zone', STRING),
-]
-class itimerspec(Structure):
- pass
-itimerspec._fields_ = [
- ('it_interval', timespec),
- ('it_value', timespec),
-]
-class sigevent(Structure):
- pass
-sigevent._fields_ = [
-]
-class __pthread_internal_list(Structure):
- pass
-__pthread_internal_list._fields_ = [
- ('__prev', POINTER(__pthread_internal_list)),
- ('__next', POINTER(__pthread_internal_list)),
-]
-class __pthread_mutex_s(Structure):
- pass
-__pthread_list_t = __pthread_internal_list
-__pthread_mutex_s._fields_ = [
- ('__lock', c_int),
- ('__count', c_uint),
- ('__owner', c_int),
- ('__nusers', c_uint),
- ('__kind', c_int),
- ('__spins', c_int),
- ('__list', __pthread_list_t),
-]
-class N14pthread_cond_t3DOT_6E(Structure):
- pass
-N14pthread_cond_t3DOT_6E._fields_ = [
- ('__lock', c_int),
- ('__futex', c_uint),
- ('__total_seq', c_ulonglong),
- ('__wakeup_seq', c_ulonglong),
- ('__woken_seq', c_ulonglong),
- ('__mutex', c_void_p),
- ('__nwaiters', c_uint),
- ('__broadcast_seq', c_uint),
-]
-class N16pthread_rwlock_t3DOT_9E(Structure):
- pass
-N16pthread_rwlock_t3DOT_9E._fields_ = [
- ('__lock', c_int),
- ('__nr_readers', c_uint),
- ('__readers_wakeup', c_uint),
- ('__writer_wakeup', c_uint),
- ('__nr_readers_queued', c_uint),
- ('__nr_writers_queued', c_uint),
- ('__writer', c_int),
- ('__shared', c_int),
- ('__pad1', c_ulong),
- ('__pad2', c_ulong),
- ('__flags', c_uint),
-]
-class sched_param(Structure):
- pass
-sched_param._fields_ = [
- ('__sched_priority', c_int),
-]
-class __sched_param(Structure):
- pass
-__sched_param._fields_ = [
- ('__sched_priority', c_int),
-]
-class cpu_set_t(Structure):
- pass
-__cpu_mask = c_ulong
-cpu_set_t._fields_ = [
- ('__bits', __cpu_mask * 16),
-]
-class __fsid_t(Structure):
- pass
-__fsid_t._fields_ = [
- ('__val', c_int * 2),
-]
-class __locale_struct(Structure):
- pass
-class __locale_data(Structure):
- pass
-__locale_struct._fields_ = [
- ('__locales', POINTER(__locale_data) * 13),
- ('__ctype_b', POINTER(c_ushort)),
- ('__ctype_tolower', POINTER(c_int)),
- ('__ctype_toupper', POINTER(c_int)),
- ('__names', STRING * 13),
-]
-__locale_data._fields_ = [
-]
-class __va_list_tag(Structure):
- pass
-__va_list_tag._fields_ = [
-]
-__all__ = ['TRACE_TYPE_ID_ENUM', 'N11__mbstate_t4DOT_26E',
- 'cpu_set_t', '__pthread_mutex_s', 'trace_type_definition',
- 'TRACE_MATCHER_TRUE', 'N14pthread_cond_t3DOT_6E',
- '__fsid_t', 'FILE', '__off64_t', 'size_t',
- 'trace_file_info', 'TRACE_MATCHER_TYPE', 'trace_parser',
- 'N4DOT_234DOT_24E', 'RecordsAccumulatorList', 'tm',
- '__cpu_mask', 'TRACE_MATCHER_FUNCTION', 'trace_record',
- 'TRACE_INPUT_STREAM_TYPE_NONSEEKABLE',
- '__pthread_internal_list', 'TRACE_MATCHER_PID',
- 'trace_input_stream_type', 'TRACE_MATCHER_NOT', '__time_t',
- 'buffer_dump_context_s', '_G_fpos64_t',
- 'trace_record_metadata', 'trace_enum_value', '_IO_jump_t',
- 'TRACE_INPUT_STREAM_TYPE_SEEKABLE_FILE',
- 'RecordsAccumulatorList_s', 'TRACE_MATCHER_PROCESS_NAME',
- '__io_close_fn', '__va_list_tag', 'sigevent',
- 'trace_log_descriptor_kind', 'trace_metadata_region',
- 'trace_time_range', 'TRACE_TYPE_ID_RECORD',
- 'trace_param_descriptor', 'TRACE_MATCHER_SEVERITY',
- 'TRACE_MATCHER_LOGID', '__jmp_buf_tag',
- 'TRACE_MATCHER_TIMERANGE', '_G_fpos_t',
- '_pthread_cleanup_buffer', '_IO_cookie_io_functions_t',
- 'trace_record_dump_header', '__locale_data',
- '_IO_FILE_plus',
- 'TRACE_PARSER_COMPLETE_TYPED_RECORD_PROCESSED',
- 'BufferParseContextList_s', '__pthread_list_t',
- 'TRACE_PARSER_MATCHED_RECORD',
- 'TRACE_LOG_DESCRIPTOR_KIND_FUNC_LEAVE', 'timespec',
- 'N16pthread_rwlock_t3DOT_9E',
- 'parser_complete_typed_record', '__sched_param',
- 'BufferParseContextList', 'trace_record_u', '__off_t',
- 'record_dump_context_s', 'TRACE_PARSER_SEARCHING_METADATA',
- '__ssize_t', 'obstack', 'trace_record_file_header',
- '_IO_cookie_file',
- 'trace_record_matcher_binary_operator_params',
- 'TRACE_MATCHER_FALSE', '__mbstate_t',
- 'TRACE_MATCHER_LOG_PARAM_VALUE', '__io_seek_fn',
- 'trace_parser_event_e', '_4DOT_23',
- 'TRACE_TYPE_ID_TYPEDEF', 'TRACE_MATCHER_TID', '_IO_FILE',
- 'TRACE_LOG_DESCRIPTOR_KIND_FUNC_ENTRY', 'sched_param',
- '__locale_struct', '__io_read_fn', 'trace_type_id',
- 'trace_parser_buffer_context', 'trace_record_buffer_dump',
- '__jmp_buf', 'trace_record_matcher_unary_operator_params',
- '__pthread_cleanup_frame',
- 'trace_matcher_named_param_value',
- 'TRACE_MATCHER_LOG_NAMED_PARAM_VALUE',
- 'trace_record_matcher_data_u', '_IO_marker',
- 'N21trace_type_definition4DOT_30E', 'TRACE_MATCHER_OR',
- 'trace_record_matcher_spec_s', '__io_write_fn',
- 'TRACE_PARSER_FOUND_METADATA',
- 'TRACE_LOG_DESCRIPTOR_KIND_EXPLICIT',
- 'trace_log_descriptor',
- 'N22trace_param_descriptor4DOT_31E', '_IO_lock_t',
- 'itimerspec', 'trace_record_accumulator',
- 'TRACE_MATCHER_AND', 'trace_record_typed',
- 'trace_record_matcher_type',
- 'trace_parser_event_handler_t']
View
0  halt.c → libtrace/halt.c
File renamed without changes
View
0  trace_metadata_util.c → libtrace/trace_metadata_util.c
File renamed without changes
View
0  trace_parser.c → libtrace/trace_parser.c
File renamed without changes
View
12 trace_user.c → libtrace/trace_user.c
@@ -26,13 +26,13 @@ Copyright 2012 Yotam Rubin <yotamrubin@gmail.com>
#include <string.h>
#include <libgen.h>
+#include "config.h"
#include "macros.h"
#include "trace_lib.h"
#include "trace_user.h"
#include "halt.h"
-
struct trace_buffer *current_trace_buffer = NULL;
__thread unsigned short trace_current_nesting;
@@ -252,8 +252,9 @@ static void map_static_log_data(const char *buffer_name)
unsigned int type_definition_count;
unsigned int enum_value_count;
static_log_alloc_size(log_descriptor_count, &total_log_descriptor_params, &type_definition_count, &enum_value_count, &alloc_size);
- snprintf(shm_name, sizeof(shm_name), "%s%d_static_trace_metadata", TRACE_SHM_ID, getpid());
- int shm_fd = shm_open(shm_name, O_CREAT | O_RDWR, 0660);
+ snprintf(shm_name, sizeof(shm_name), "%s%s%d_static_trace_metadata", SHM_PATH, TRACE_SHM_ID, getpid());
+ int shm_fd = open(shm_name, O_CREAT | O_RDWR, 0660);
+ printf("map_static_log_data %s\n",shm_name);
if (shm_fd < 0) {
return;
}
@@ -291,8 +292,9 @@ static void init_records_metadata(void)
static void map_dynamic_log_buffers()
{
char shm_name[0x100];
- snprintf(shm_name, sizeof(shm_name), "%s%d_dynamic_trace_data", TRACE_SHM_ID, getpid());
- int shm_fd = shm_open(shm_name, O_CREAT | O_RDWR, 0660);
+ snprintf(shm_name, sizeof(shm_name), "%s%s%d_dynamic_trace_data", SHM_PATH, TRACE_SHM_ID, getpid());
+ int shm_fd = open(shm_name, O_CREAT | O_RDWR, 0660);
+ printf("map_dynamic_log_buffers %s\n",shm_name);
if (shm_fd < 0) {
return;
}
View
43 trace_dumper/trace_dumper.c
@@ -14,22 +14,26 @@
#include <sys/uio.h>
#include <sys/time.h>
#include <sys/utsname.h>
-#include "../list_template.h"
-#include "filesystem.h"
-#include "../bool.h"
-#include "../trace_metadata_util.h"
-#include "../trace_parser.h"
-#include "../min_max.h"
-#include "../array_length.h"
#include <syslog.h>
#include <time.h>
#include <sys/sysinfo.h>
-#include "../trace_lib.h"
-#include "../trace_user.h"
+
+#include "config.h"
+#include "list_template.h"
+#include "filesystem.h"
+#include "bool.h"
+#include "trace_metadata_util.h"
+#include "trace_parser.h"
+#include "min_max.h"
+#include "array_length.h"
+#include "trace_lib.h"
+#include "trace_user.h"
#define MAX_FILTER_SIZE (10)
#define METADATA_IOVEC_SIZE 2*(MAX_METADATA_SIZE/TRACE_RECORD_PAYLOAD_SIZE+1)
+#define TRACE_FILE_MAX_RECORDS_PER_FILE 0x1000000
+
struct trace_mapped_metadata {
struct iovec metadata_iovec[METADATA_IOVEC_SIZE];
struct trace_record metadata_payload_record;
@@ -83,7 +87,6 @@ CREATE_LIST_IMPLEMENTATION(BufferFilter, buffer_name_t);
#define TRACE_METADATA_IOVEC_SIZE (2*(MAX_METADATA_SIZE/TRACE_RECORD_PAYLOAD_SIZE+1))
-#define TRACE_FILE_MAX_RECORDS_PER_FILE 0x1000000
#define TRACE_FILE_MAX_RECORDS_PER_LOGDIR (TRACE_FILE_MAX_RECORDS_PER_FILE) * 10
#define TRACE_FILE_MAX_RECORDS_PER_CHUNK 0x10000
@@ -123,8 +126,6 @@ struct trace_dumper_configuration_s {
static struct trace_dumper_configuration_s trace_dumper_configuration;
-#define SHM_DIR "/dev/shm"
-
bool_t is_trace_shm_region(const char *shm_name)
{
if (strncmp(shm_name, TRACE_SHM_ID, strlen(TRACE_SHM_ID)) == 0) {
@@ -360,8 +361,8 @@ static int delete_shm_files(unsigned short pid)
int rc;
snprintf(dynamic_trace_filename, sizeof(dynamic_trace_filename), "_trace_shm_%d_dynamic_trace_data", pid);
snprintf(static_log_data_filename, sizeof(static_log_data_filename), "_trace_shm_%d_static_trace_metadata", pid);
- snprintf(full_dynamic_trace_filename, sizeof(full_dynamic_trace_filename), "%s/%s", SHM_DIR, dynamic_trace_filename);
- snprintf(full_static_log_data_filename, sizeof(full_static_log_data_filename), "%s/%s", SHM_DIR, static_log_data_filename);
+ snprintf(full_dynamic_trace_filename, sizeof(full_dynamic_trace_filename), "%s/%s", SHM_PATH, dynamic_trace_filename);
+ snprintf(full_static_log_data_filename, sizeof(full_static_log_data_filename), "%s/%s", SHM_PATH, static_log_data_filename);
rc = unlink(full_dynamic_trace_filename);
rc |= unlink(full_static_log_data_filename);
@@ -393,8 +394,8 @@ static int map_buffer(struct trace_dumper_configuration_s *conf, pid_t pid)
unsigned int dead = 0;
snprintf(dynamic_trace_filename, sizeof(dynamic_trace_filename), "_trace_shm_%d_dynamic_trace_data", pid);
snprintf(static_log_data_filename, sizeof(static_log_data_filename), "_trace_shm_%d_static_trace_metadata", pid);
- snprintf(full_dynamic_trace_filename, sizeof(full_dynamic_trace_filename), "%s/%s", SHM_DIR, dynamic_trace_filename);
- snprintf(full_static_log_data_filename, sizeof(full_static_log_data_filename), "%s/%s", SHM_DIR, static_log_data_filename);
+ snprintf(full_dynamic_trace_filename, sizeof(full_dynamic_trace_filename), "%s/%s", SHM_PATH, dynamic_trace_filename);
+ snprintf(full_static_log_data_filename, sizeof(full_static_log_data_filename), "%s/%s", SHM_PATH, static_log_data_filename);
int trace_region_size = get_file_size(full_dynamic_trace_filename);
if (trace_region_size <= 0) {
@@ -410,15 +411,17 @@ static int map_buffer(struct trace_dumper_configuration_s *conf, pid_t pid)
goto delete_shm_files;
}
- dynamic_fd = shm_open(dynamic_trace_filename, O_RDWR, 0);
+ dynamic_fd = open(full_dynamic_trace_filename, O_RDWR, 0);
+ printf("opened (1) %s\n", full_dynamic_trace_filename);
if (dynamic_fd < 0) {
ERROR("Unable to open dynamic buffer %s: %s", dynamic_trace_filename, strerror(errno));
rc = -1;
goto delete_shm_files;
}
- static_fd = shm_open(static_log_data_filename, O_RDWR, 0);
- if (dynamic_fd < 0) {
+ static_fd = open(full_static_log_data_filename, O_RDWR, 0);
+ printf("opened (2) %s\n", full_static_log_data_filename);
+ if (static_fd < 0) {
ERROR("Unable to open static buffer: %s", strerror(errno));
rc = -1;
goto close_static;
@@ -563,7 +566,7 @@ static int map_new_buffers(struct trace_dumper_configuration_s *conf)
DIR *dir;
struct dirent *ent;
int rc = 0;
- dir = opendir(SHM_DIR);
+ dir = opendir(SHM_PATH);
if (dir == NULL) {
return -1;
View
0  trace_user_stubs.c → trace_dumper/trace_user_stubs.c
File renamed without changes
View
2  trace_instrumentor/TraceCall.h
@@ -27,7 +27,7 @@ Copyright 2012 Yotam Rubin <yotamrubin@gmail.com>
#include "clang/AST/AST.h"
#include "clang/Frontend/CompilerInstance.h"
#include "llvm/Support/raw_ostream.h"
-#include "../trace_defs.h"
+#include "trace_defs.h"
#include <stdio.h>
#include <stdlib.h>
View
6 trace_instrumentor/trace_instrumentor.cpp
@@ -15,7 +15,7 @@ Copyright 2012 Yotam Rubin <yotamrubin@gmail.com>
limitations under the License.
***/
-#include "../trace_user.h"
+#include "trace_user.h"
#include <stdio.h>
#include <stdlib.h>
@@ -32,8 +32,8 @@ Copyright 2012 Yotam Rubin <yotamrubin@gmail.com>
#include "clang/Frontend/CompilerInstance.h"
#include "llvm/Support/raw_ostream.h"
#include "TraceCall.h"
-#include "../trace_defs.h"
-#include "../trace_lib.h"
+#include "trace_defs.h"
+#include "trace_lib.h"
#include <sstream>
#include <string>
View
6 trace_reader/simple_trace_reader.c
@@ -1,12 +1,12 @@
-#include "../trace_parser.h"
+#include "trace_parser.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <getopt.h>
-#include "../list_template.h"
-#include "../array_length.h"
+#include "list_template.h"
+#include "array_length.h"
typedef char trace_filename_t[0x100];
CREATE_LIST_PROTOTYPE(FilenameList, trace_filename_t)
Something went wrong with that request. Please try again.