summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1d7277f)
Change-Id: I733ccd4e29c42fb3239c25f5e8dc6f7959000e13
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/7337
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
/* Adjust the timestamp depending on the trace's offset */
long currTimestamp = ctfLocationData.getTimestamp();
/* Adjust the timestamp depending on the trace's offset */
long currTimestamp = ctfLocationData.getTimestamp();
- final long offsetTimestamp = currTimestamp - this.getTrace().getOffset();
+ final long offsetTimestamp = this.getCtfTmfTrace().getCTFTrace().timestampNanoToCycles(currTimestamp);
if (offsetTimestamp < 0) {
ret = super.seek(0L);
} else {
if (offsetTimestamp < 0) {
ret = super.seek(0L);
} else {
* Check if there is already one or more events for that timestamp, and
* assign the location index correctly
*/
* Check if there is already one or more events for that timestamp, and
* assign the location index correctly
*/
- currTimestamp = this.getCurrentEvent().getTimestampValue();
- for (long i = 0; i < ctfLocationData.getIndex(); i++) {
- if (currTimestamp == this.getCurrentEvent().getTimestampValue()) {
- index++;
- } else {
- index = 0;
+ if (this.getCurrentEvent() != null) {
+ currTimestamp = this.getCurrentEvent().getTimestampValue();
+
+ for (long i = 0; i < ctfLocationData.getIndex(); i++) {
+ if (currTimestamp == this.getCurrentEvent().getTimestampValue()) {
+ index++;
+ } else {
+ index = 0;
+ }
+ this.advance();
/* Seek the current location accordingly */
if (ret) {
curLocation.setLocation(new CtfLocationData(getCurrentEvent().getTimestampValue(), index));
/* Seek the current location accordingly */
if (ret) {
curLocation.setLocation(new CtfLocationData(getCurrentEvent().getTimestampValue(), index));