projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SPARC NCG: Add a comment explaining why we can't used a pinned reg for gct
[ghc-hetmet.git]
/
rts
/
eventlog
/
EventLog.c
diff --git
a/rts/eventlog/EventLog.c
b/rts/eventlog/EventLog.c
index
820e95c
..
990820f
100644
(file)
--- a/
rts/eventlog/EventLog.c
+++ b/
rts/eventlog/EventLog.c
@@
-45,10
+45,12
@@
char *EventDesc[] = {
"Steal spark",
"Shutdown",
"Wakeup thread",
"Steal spark",
"Shutdown",
"Wakeup thread",
+ "Starting GC",
+ "Finished GC",
"Request sequential GC",
"Request parallel GC",
"Request sequential GC",
"Request parallel GC",
- "Starting GC",
- "Finished GC"
+ "Create spark",
+ "Spark to thread"
};
// Event type.
};
// Event type.
@@
-104,12
+106,15
@@
static inline void postWord64(EventsBuf *eb, StgWord64 i)
static inline void postEventTypeNum(EventsBuf *eb, EventTypeNum etNum)
{ postWord16(eb, etNum); }
static inline void postEventTypeNum(EventsBuf *eb, EventTypeNum etNum)
{ postWord16(eb, etNum); }
-static inline void postEventTypeID(EventsBuf *eb, StgWord16 etID)
-{ postWord16(eb, etID); }
-
static inline void postTimestamp(EventsBuf *eb, Timestamp t)
{ postWord64(eb,t); }
static inline void postTimestamp(EventsBuf *eb, Timestamp t)
{ postWord64(eb,t); }
+static inline void postThreadID(EventsBuf *eb, ThreadID id)
+{ postWord32(eb,id); }
+
+static inline void postCapNo(EventsBuf *eb, CapNo no)
+{ postWord16(eb,no); }
+
static inline void postInt8(EventsBuf *eb, StgInt8 i)
{ postWord8(eb, (StgWord8)i); }
static inline void postInt8(EventsBuf *eb, StgInt8 i)
{ postWord8(eb, (StgWord8)i); }
@@
-176,21
+181,26
@@
initEventLogging(void)
case EVENT_CREATE_THREAD: // (cap, thread)
case EVENT_RUN_THREAD: // (cap, thread)
case EVENT_THREAD_RUNNABLE: // (cap, thread)
case EVENT_CREATE_THREAD: // (cap, thread)
case EVENT_RUN_THREAD: // (cap, thread)
case EVENT_THREAD_RUNNABLE: // (cap, thread)
+ case EVENT_CREATE_SPARK: // (cap, thread)
case EVENT_RUN_SPARK: // (cap, thread)
case EVENT_RUN_SPARK: // (cap, thread)
- eventTypes[t].size = sizeof(CapabilityNum) + sizeof(ThreadID);
+ eventTypes[t].size = sizeof(CapNo) + sizeof(ThreadID);
+ break;
+
+ case EVENT_SPARK_TO_THREAD: // (cap, thread, spark_thread)
+ eventTypes[t].size =
+ sizeof(CapNo) + sizeof(ThreadID) + sizeof(ThreadID);
break;
case EVENT_MIGRATE_THREAD: // (cap, thread, new_cap)
case EVENT_STEAL_SPARK: // (cap, thread, victim_cap)
case EVENT_THREAD_WAKEUP: // (cap, thread, other_cap)
eventTypes[t].size =
break;
case EVENT_MIGRATE_THREAD: // (cap, thread, new_cap)
case EVENT_STEAL_SPARK: // (cap, thread, victim_cap)
case EVENT_THREAD_WAKEUP: // (cap, thread, other_cap)
eventTypes[t].size =
- sizeof(CapabilityNum) + sizeof(ThreadID) +
- sizeof(CapabilityNum);
+ sizeof(CapNo) + sizeof(ThreadID) + sizeof(CapNo);
break;
case EVENT_STOP_THREAD: // (cap, thread, status)
eventTypes[t].size =
break;
case EVENT_STOP_THREAD: // (cap, thread, status)
eventTypes[t].size =
- sizeof(CapabilityNum) + sizeof(ThreadID) + sizeof(StgWord16);
+ sizeof(CapNo) + sizeof(ThreadID) + sizeof(StgWord16);
break;
case EVENT_SHUTDOWN: // (cap)
break;
case EVENT_SHUTDOWN: // (cap)
@@
-198,7
+208,7
@@
initEventLogging(void)
case EVENT_REQUEST_PAR_GC: // (cap)
case EVENT_GC_START: // (cap)
case EVENT_GC_END: // (cap)
case EVENT_REQUEST_PAR_GC: // (cap)
case EVENT_GC_START: // (cap)
case EVENT_GC_END: // (cap)
- eventTypes[t].size = sizeof(CapabilityNum);
+ eventTypes[t].size = sizeof(CapNo);
break;
}
break;
}
@@
-277,7
+287,7
@@
freeEventLogging(void)
* If the buffer is full, prints out the buffer and clears it.
*/
void
* If the buffer is full, prints out the buffer and clears it.
*/
void
-postEvent_(Capability *cap, EventTypeNum tag, StgThreadID thread, nat other_cap)
+postEvent_(Capability *cap, EventTypeNum tag, StgThreadID thread, StgWord64 other)
{
EventsBuf *eb;
{
EventsBuf *eb;
@@
-292,15
+302,23
@@
postEvent_(Capability *cap, EventTypeNum tag, StgThreadID thread, nat other_cap)
postEventTypeNum(eb, tag);
postTimestamp(eb, stat_getElapsedTime() * (1000000000LL/TICKS_PER_SECOND));
postEventTypeNum(eb, tag);
postTimestamp(eb, stat_getElapsedTime() * (1000000000LL/TICKS_PER_SECOND));
- postWord16(eb, cap->no);
+ postCapNo(eb, cap->no);
switch (tag) {
case EVENT_CREATE_THREAD: // (cap, thread)
case EVENT_RUN_THREAD: // (cap, thread)
case EVENT_THREAD_RUNNABLE: // (cap, thread)
switch (tag) {
case EVENT_CREATE_THREAD: // (cap, thread)
case EVENT_RUN_THREAD: // (cap, thread)
case EVENT_THREAD_RUNNABLE: // (cap, thread)
+ case EVENT_CREATE_SPARK: // (cap, thread)
case EVENT_RUN_SPARK: // (cap, thread)
{
case EVENT_RUN_SPARK: // (cap, thread)
{
- postWord64(eb,thread);
+ postThreadID(eb,thread);
+ break;
+ }
+
+ case EVENT_SPARK_TO_THREAD: // (cap, thread, spark_thread)
+ {
+ postThreadID(eb,thread);
+ postThreadID(eb,other /* spark_thread */);
break;
}
break;
}
@@
-308,15
+326,15
@@
postEvent_(Capability *cap, EventTypeNum tag, StgThreadID thread, nat other_cap)
case EVENT_STEAL_SPARK: // (cap, thread, victim_cap)
case EVENT_THREAD_WAKEUP: // (cap, thread, other_cap)
{
case EVENT_STEAL_SPARK: // (cap, thread, victim_cap)
case EVENT_THREAD_WAKEUP: // (cap, thread, other_cap)
{
- postWord64(eb,thread);
- postWord16(eb,other_cap);
+ postThreadID(eb,thread);
+ postCapNo(eb,other /* new_cap | victim_cap | other_cap */);
break;
}
case EVENT_STOP_THREAD: // (cap, thread, status)
{
break;
}
case EVENT_STOP_THREAD: // (cap, thread, status)
{
- postWord64(eb,thread);
- postWord16(eb,other_cap);
+ postThreadID(eb,thread);
+ postWord16(eb,other /* status */);
break;
}
break;
}