Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG UE
Commits
98b2a81e
Commit
98b2a81e
authored
May 31, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename T_SEND to T_COMMIT, sounds better
get rid of T_send(), no use anymore
parent
1b0aaa84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
26 deletions
+23
-26
common/utils/T/T.c
common/utils/T/T.c
+2
-2
common/utils/T/T.h
common/utils/T/T.h
+20
-23
common/utils/T/generate_Txx.c
common/utils/T/generate_Txx.c
+1
-1
No files found.
common/utils/T/T.c
View file @
98b2a81e
...
@@ -144,7 +144,7 @@ again:
...
@@ -144,7 +144,7 @@ again:
T_LOCAL_DATA
T_LOCAL_DATA
T_HEADER
(
T_ID
(
-
1
));
T_HEADER
(
T_ID
(
-
1
));
T_PUT_buffer
(
1
,
((
T_buffer
){
addr
:
(
buf
),
length
:
(
len
)}));
T_PUT_buffer
(
1
,
((
T_buffer
){
addr
:
(
buf
),
length
:
(
len
)}));
T_
SEND
();
T_
COMMIT
();
}
while
(
0
);
}
while
(
0
);
buf
+=
send_size
;
buf
+=
send_size
;
len
-=
send_size
;
len
-=
send_size
;
...
@@ -152,6 +152,6 @@ again:
...
@@ -152,6 +152,6 @@ again:
do
{
do
{
T_LOCAL_DATA
T_LOCAL_DATA
T_HEADER
(
T_ID
(
-
2
));
T_HEADER
(
T_ID
(
-
2
));
T_
SEND
();
T_
COMMIT
();
}
while
(
0
);
}
while
(
0
);
}
}
common/utils/T/T.h
View file @
98b2a81e
...
@@ -127,11 +127,10 @@ extern T_cache_t *T_cache;
...
@@ -127,11 +127,10 @@ extern T_cache_t *T_cache;
#define T_ACTIVE(x) T_active[(intptr_t)x]
#define T_ACTIVE(x) T_active[(intptr_t)x]
#define T_
SEND
() \
#define T_
COMMIT
() \
T_cache[T_LOCAL_slot].length = T_LOCAL_size; \
T_cache[T_LOCAL_slot].length = T_LOCAL_size; \
__sync_synchronize(); \
__sync_synchronize(); \
T_cache[T_LOCAL_slot].busy = 1; \
T_cache[T_LOCAL_slot].busy = 1; \
T_send(T_LOCAL_buf, T_LOCAL_size)
#define T_CHECK_SIZE(len, argnum) \
#define T_CHECK_SIZE(len, argnum) \
if (T_LOCAL_size + (len) > T_BUFFER_MAX) { \
if (T_LOCAL_size + (len) > T_BUFFER_MAX) { \
...
@@ -222,7 +221,7 @@ extern T_cache_t *T_cache;
...
@@ -222,7 +221,7 @@ extern T_cache_t *T_cache;
if (T_ACTIVE(t)) { \
if (T_ACTIVE(t)) { \
T_LOCAL_DATA \
T_LOCAL_DATA \
T_HEADER(t); \
T_HEADER(t); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -232,7 +231,7 @@ extern T_cache_t *T_cache;
...
@@ -232,7 +231,7 @@ extern T_cache_t *T_cache;
T_LOCAL_DATA \
T_LOCAL_DATA \
T_HEADER(t); \
T_HEADER(t); \
T_PUT_##t0(2, x0); \
T_PUT_##t0(2, x0); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -243,7 +242,7 @@ extern T_cache_t *T_cache;
...
@@ -243,7 +242,7 @@ extern T_cache_t *T_cache;
T_HEADER(t); \
T_HEADER(t); \
T_PUT_##t0(2, x0); \
T_PUT_##t0(2, x0); \
T_PUT_##t1(3, x1); \
T_PUT_##t1(3, x1); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -255,7 +254,7 @@ extern T_cache_t *T_cache;
...
@@ -255,7 +254,7 @@ extern T_cache_t *T_cache;
T_PUT_##t0(2, x0); \
T_PUT_##t0(2, x0); \
T_PUT_##t1(3, x1); \
T_PUT_##t1(3, x1); \
T_PUT_##t2(4, x2); \
T_PUT_##t2(4, x2); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -268,7 +267,7 @@ extern T_cache_t *T_cache;
...
@@ -268,7 +267,7 @@ extern T_cache_t *T_cache;
T_PUT_##t1(3, x1); \
T_PUT_##t1(3, x1); \
T_PUT_##t2(4, x2); \
T_PUT_##t2(4, x2); \
T_PUT_##t3(5, x3); \
T_PUT_##t3(5, x3); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -282,7 +281,7 @@ extern T_cache_t *T_cache;
...
@@ -282,7 +281,7 @@ extern T_cache_t *T_cache;
T_PUT_##t2(4, x2); \
T_PUT_##t2(4, x2); \
T_PUT_##t3(5, x3); \
T_PUT_##t3(5, x3); \
T_PUT_##t4(6, x4); \
T_PUT_##t4(6, x4); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -297,7 +296,7 @@ extern T_cache_t *T_cache;
...
@@ -297,7 +296,7 @@ extern T_cache_t *T_cache;
T_PUT_##t3(5, x3); \
T_PUT_##t3(5, x3); \
T_PUT_##t4(6, x4); \
T_PUT_##t4(6, x4); \
T_PUT_##t5(7, x5); \
T_PUT_##t5(7, x5); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -313,7 +312,7 @@ extern T_cache_t *T_cache;
...
@@ -313,7 +312,7 @@ extern T_cache_t *T_cache;
T_PUT_##t4(6, x4); \
T_PUT_##t4(6, x4); \
T_PUT_##t5(7, x5); \
T_PUT_##t5(7, x5); \
T_PUT_##t6(8, x6); \
T_PUT_##t6(8, x6); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -330,7 +329,7 @@ extern T_cache_t *T_cache;
...
@@ -330,7 +329,7 @@ extern T_cache_t *T_cache;
T_PUT_##t5(7, x5); \
T_PUT_##t5(7, x5); \
T_PUT_##t6(8, x6); \
T_PUT_##t6(8, x6); \
T_PUT_##t7(9, x7); \
T_PUT_##t7(9, x7); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -348,7 +347,7 @@ extern T_cache_t *T_cache;
...
@@ -348,7 +347,7 @@ extern T_cache_t *T_cache;
T_PUT_##t6(8, x6); \
T_PUT_##t6(8, x6); \
T_PUT_##t7(9, x7); \
T_PUT_##t7(9, x7); \
T_PUT_##t8(10, x8); \
T_PUT_##t8(10, x8); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -367,7 +366,7 @@ extern T_cache_t *T_cache;
...
@@ -367,7 +366,7 @@ extern T_cache_t *T_cache;
T_PUT_##t7(9, x7); \
T_PUT_##t7(9, x7); \
T_PUT_##t8(10, x8); \
T_PUT_##t8(10, x8); \
T_PUT_##t9(11, x9); \
T_PUT_##t9(11, x9); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -387,7 +386,7 @@ extern T_cache_t *T_cache;
...
@@ -387,7 +386,7 @@ extern T_cache_t *T_cache;
T_PUT_##t8(10, x8); \
T_PUT_##t8(10, x8); \
T_PUT_##t9(11, x9); \
T_PUT_##t9(11, x9); \
T_PUT_##t10(12, x10); \
T_PUT_##t10(12, x10); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -408,7 +407,7 @@ extern T_cache_t *T_cache;
...
@@ -408,7 +407,7 @@ extern T_cache_t *T_cache;
T_PUT_##t9(11, x9); \
T_PUT_##t9(11, x9); \
T_PUT_##t10(12, x10); \
T_PUT_##t10(12, x10); \
T_PUT_##t11(13, x11); \
T_PUT_##t11(13, x11); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -430,7 +429,7 @@ extern T_cache_t *T_cache;
...
@@ -430,7 +429,7 @@ extern T_cache_t *T_cache;
T_PUT_##t10(12, x10); \
T_PUT_##t10(12, x10); \
T_PUT_##t11(13, x11); \
T_PUT_##t11(13, x11); \
T_PUT_##t12(14, x12); \
T_PUT_##t12(14, x12); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -453,7 +452,7 @@ extern T_cache_t *T_cache;
...
@@ -453,7 +452,7 @@ extern T_cache_t *T_cache;
T_PUT_##t11(13, x11); \
T_PUT_##t11(13, x11); \
T_PUT_##t12(14, x12); \
T_PUT_##t12(14, x12); \
T_PUT_##t13(15, x13); \
T_PUT_##t13(15, x13); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -477,7 +476,7 @@ extern T_cache_t *T_cache;
...
@@ -477,7 +476,7 @@ extern T_cache_t *T_cache;
T_PUT_##t12(14, x12); \
T_PUT_##t12(14, x12); \
T_PUT_##t13(15, x13); \
T_PUT_##t13(15, x13); \
T_PUT_##t14(16, x14); \
T_PUT_##t14(16, x14); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -502,7 +501,7 @@ extern T_cache_t *T_cache;
...
@@ -502,7 +501,7 @@ extern T_cache_t *T_cache;
T_PUT_##t13(15, x13); \
T_PUT_##t13(15, x13); \
T_PUT_##t14(16, x14); \
T_PUT_##t14(16, x14); \
T_PUT_##t15(17, x15); \
T_PUT_##t15(17, x15); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -542,7 +541,7 @@ extern T_cache_t *T_cache;
...
@@ -542,7 +541,7 @@ extern T_cache_t *T_cache;
T_LOCAL_DATA \
T_LOCAL_DATA \
T_HEADER(T_ID((var) + VCD_FIRST_VARIABLE)); \
T_HEADER(T_ID((var) + VCD_FIRST_VARIABLE)); \
T_PUT_ulong(1, (val)); \
T_PUT_ulong(1, (val)); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
...
@@ -557,12 +556,10 @@ extern T_cache_t *T_cache;
...
@@ -557,12 +556,10 @@ extern T_cache_t *T_cache;
T_LOCAL_DATA \
T_LOCAL_DATA \
T_HEADER(T_ID((fun) + VCD_FIRST_FUNCTION)); \
T_HEADER(T_ID((fun) + VCD_FIRST_FUNCTION)); \
T_PUT_int(1, (val)); \
T_PUT_int(1, (val)); \
T_
SEND
(); \
T_
COMMIT
(); \
} \
} \
} while (0)
} while (0)
#define T_send(...)
/**/
extern
int
*
T_active
;
extern
int
*
T_active
;
void
T_connect_to_tracer
(
char
*
addr
,
int
port
);
void
T_connect_to_tracer
(
char
*
addr
,
int
port
);
...
...
common/utils/T/generate_Txx.c
View file @
98b2a81e
...
@@ -11,7 +11,7 @@ void print(int n)
...
@@ -11,7 +11,7 @@ void print(int n)
printf
(
" T_LOCAL_DATA
\\\n
"
);
printf
(
" T_LOCAL_DATA
\\\n
"
);
printf
(
" T_HEADER(t);
\\\n
"
);
printf
(
" T_HEADER(t);
\\\n
"
);
for
(
i
=
0
;
i
<
(
n
-
1
)
/
2
;
i
++
)
printf
(
" T_PUT_##t%d(%d, x%d);
\\\n
"
,
i
,
i
+
2
,
i
);
for
(
i
=
0
;
i
<
(
n
-
1
)
/
2
;
i
++
)
printf
(
" T_PUT_##t%d(%d, x%d);
\\\n
"
,
i
,
i
+
2
,
i
);
printf
(
" T_
SEND
();
\\\n
"
);
printf
(
" T_
COMMIT
();
\\\n
"
);
printf
(
" }
\\\n
"
);
printf
(
" }
\\\n
"
);
printf
(
" } while (0)
\n
"
);
printf
(
" } while (0)
\n
"
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment