Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ExplorViz
explorviz-github-archive
analysis
Commits
5cbcdfeb
Commit
5cbcdfeb
authored
Jan 16, 2014
by
Florian Fittkau
Browse files
Options
Downloads
Patches
Plain Diff
added remote call processing
parent
d05ebcdf
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/explorviz/live_trace_processing/reader/TCPReaderOneClient.java
+71
-9
71 additions, 9 deletions
...rviz/live_trace_processing/reader/TCPReaderOneClient.java
with
71 additions
and
9 deletions
src/explorviz/live_trace_processing/reader/TCPReaderOneClient.java
+
71
−
9
View file @
5cbcdfeb
...
...
@@ -21,7 +21,9 @@ import explorviz.live_trace_processing.record.event.constructor.BeforeConstructo
import
explorviz.live_trace_processing.record.event.normal.AfterFailedOperationEventRecord
;
import
explorviz.live_trace_processing.record.event.normal.AfterOperationEventRecord
;
import
explorviz.live_trace_processing.record.event.normal.BeforeOperationEventRecord
;
import
explorviz.live_trace_processing.record.event.remote.RemoteCallBridgeRecord
;
import
explorviz.live_trace_processing.record.event.remote.ReceivedRemoteCallRecord
;
import
explorviz.live_trace_processing.record.event.remote.SentRemoteCallRecord
;
import
explorviz.live_trace_processing.record.event.remote.UnknownReceivedRemoteCallRecord
;
import
explorviz.live_trace_processing.record.event.statics.AfterFailedStaticOperationEventRecord
;
import
explorviz.live_trace_processing.record.event.statics.AfterStaticOperationEventRecord
;
import
explorviz.live_trace_processing.record.event.statics.BeforeStaticOperationEventRecord
;
...
...
@@ -141,6 +143,8 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
stringRegistry
.
putStringRecord
(
mapId
,
new
String
(
stringByteArray
));
System
.
out
.
println
(
new
String
(
stringByteArray
));
checkWaitingMessages
();
}
else
{
buffer
.
position
(
buffer
.
position
()
-
9
);
...
...
@@ -220,9 +224,9 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
buffer
.
compact
();
return
;
}
case
RemoteCall
Bridge
Record
.
CLAZZ_ID
:
{
if
(
buffer
.
remaining
()
>=
RemoteCall
Bridge
Record
.
COMPRESSED_BYTE_LENGTH
)
{
readInRemoteCall
Bridge
Event
(
buffer
);
case
Received
RemoteCallRecord
.
CLAZZ_ID
:
{
if
(
buffer
.
remaining
()
>=
Received
RemoteCallRecord
.
COMPRESSED_BYTE_LENGTH
)
{
readInRe
ceivedRe
moteCallEvent
(
buffer
);
break
;
}
buffer
.
position
(
buffer
.
position
()
-
1
);
...
...
@@ -256,6 +260,24 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
buffer
.
compact
();
return
;
}
case
SentRemoteCallRecord
.
CLAZZ_ID
:
{
if
(
buffer
.
remaining
()
>=
SentRemoteCallRecord
.
COMPRESSED_BYTE_LENGTH
)
{
readInSentRemoteCallEvent
(
buffer
);
break
;
}
buffer
.
position
(
buffer
.
position
()
-
1
);
buffer
.
compact
();
return
;
}
case
UnknownReceivedRemoteCallRecord
.
CLAZZ_ID
:
{
if
(
buffer
.
remaining
()
>=
UnknownReceivedRemoteCallRecord
.
COMPRESSED_BYTE_LENGTH
)
{
readInUnknownReceivedRemoteCallEvent
(
buffer
);
break
;
}
buffer
.
position
(
buffer
.
position
()
-
1
);
buffer
.
compact
();
return
;
}
default
:
{
System
.
out
.
println
(
"unknown class id "
+
clazzId
+
" at offset "
+
(
buffer
.
position
()
-
1
));
...
...
@@ -375,7 +397,7 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
hostApplicationMetadata
));
}
private
final
void
readInRemoteCall
Bridge
Event
(
final
ByteBuffer
buffer
)
{
private
final
void
readInRe
ceivedRe
moteCallEvent
(
final
ByteBuffer
buffer
)
{
final
int
callerHost
=
buffer
.
getInt
();
final
int
callerApplication
=
buffer
.
getInt
();
final
long
callerTraceId
=
buffer
.
getLong
();
...
...
@@ -386,13 +408,13 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
final
int
orderIndex
=
buffer
.
getInt
();
try
{
putInRingBuffer
(
new
RemoteCall
Bridge
Record
(
timestamp
,
putInRingBuffer
(
new
Received
RemoteCallRecord
(
timestamp
,
stringRegistry
.
getStringFromId
(
callerHost
),
stringRegistry
.
getStringFromId
(
callerApplication
),
callerTraceId
,
callerOrderIndex
,
traceId
,
orderIndex
,
hostApplicationMetadata
));
}
catch
(
final
IdNotAvailableException
e
)
{
putInWaitingMessages
(
buffer
,
RemoteCall
Bridge
Record
.
COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID
);
Received
RemoteCallRecord
.
COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID
);
}
}
...
...
@@ -439,6 +461,40 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
hostApplicationMetadata
));
}
private
final
void
readInSentRemoteCallEvent
(
final
ByteBuffer
buffer
)
{
final
long
timestamp
=
buffer
.
getLong
();
final
long
traceId
=
buffer
.
getLong
();
final
int
orderIndex
=
buffer
.
getInt
();
final
int
destinationId
=
0
;
try
{
putInRingBuffer
(
new
SentRemoteCallRecord
(
timestamp
,
stringRegistry
.
getStringFromId
(
destinationId
),
traceId
,
orderIndex
,
hostApplicationMetadata
));
}
catch
(
final
IdNotAvailableException
e
)
{
putInWaitingMessages
(
buffer
,
SentRemoteCallRecord
.
COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID
);
}
}
private
final
void
readInUnknownReceivedRemoteCallEvent
(
final
ByteBuffer
buffer
)
{
final
long
timestamp
=
buffer
.
getLong
();
final
long
traceId
=
buffer
.
getLong
();
final
int
orderIndex
=
buffer
.
getInt
();
final
int
senderId
=
buffer
.
getInt
();
final
int
destionationId
=
buffer
.
getInt
();
try
{
putInRingBuffer
(
new
UnknownReceivedRemoteCallRecord
(
timestamp
,
stringRegistry
.
getStringFromId
(
senderId
),
stringRegistry
.
getStringFromId
(
destionationId
),
traceId
,
orderIndex
,
hostApplicationMetadata
));
}
catch
(
final
IdNotAvailableException
e
)
{
putInWaitingMessages
(
buffer
,
UnknownReceivedRemoteCallRecord
.
COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID
);
}
}
private
final
void
putInWaitingMessages
(
final
ByteBuffer
buffer
,
final
int
length
)
{
final
byte
[]
message
=
new
byte
[
length
];
buffer
.
position
(
buffer
.
position
()
-
length
);
...
...
@@ -478,8 +534,8 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
case
AfterConstructorEventRecord
.
CLAZZ_ID
:
readInAfterConstructorEvent
(
buffer
);
break
;
case
RemoteCall
Bridge
Record
.
CLAZZ_ID
:
readInRemoteCall
Bridge
Event
(
buffer
);
case
Received
RemoteCallRecord
.
CLAZZ_ID
:
readInRe
ceivedRe
moteCallEvent
(
buffer
);
break
;
case
BeforeStaticOperationEventRecord
.
CLAZZ_ID
:
readInBeforeStaticOperationEvent
(
buffer
);
...
...
@@ -490,6 +546,12 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
case
AfterStaticOperationEventRecord
.
CLAZZ_ID
:
readInAfterStaticOperationEvent
(
buffer
);
break
;
case
SentRemoteCallRecord
.
CLAZZ_ID
:
readInSentRemoteCallEvent
(
buffer
);
break
;
case
UnknownReceivedRemoteCallRecord
.
CLAZZ_ID
:
readInUnknownReceivedRemoteCallEvent
(
buffer
);
break
;
default
:
break
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment