Skip to content

Commit

Permalink
Fix/add recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
pron committed Jul 27, 2015
1 parent 6f3692a commit 0f65292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ record = setNumSlots(record, numSlots);
// dataLong[nextMethodIdx + i] = 0L;

if (fiber.isRecordingLevel(2))
fiber.record(2, "Stack", "pushMethod ", "%s %s %s %s %d", Thread.currentThread().getStackTrace()[2], entry, sp /*Arrays.toString(fiber.getStackTrace())*/);
fiber.record(2, "Stack", "pushMethod ", "%s %d %d", Thread.currentThread().getStackTrace()[2], entry, sp /*Arrays.toString(fiber.getStackTrace())*/);
}

public final void popMethod() {
Expand All @@ -174,7 +174,7 @@ final long record = dataLong[idx];
sp = newSP;

if (fiber.isRecordingLevel(2))
fiber.record(2, "Stack", "popMethod ", "%s %s %s", Thread.currentThread().getStackTrace()[2], sp /*Arrays.toString(fiber.getStackTrace())*/);
fiber.record(2, "Stack", "popMethod ", "%s %d", Thread.currentThread().getStackTrace()[2], sp /*Arrays.toString(fiber.getStackTrace())*/);
}

public final void postRestore() throws SuspendExecution, InterruptedException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ private static class VarFiber<T> extends Fiber<Void> {
}

void signalNewValue(Var var) {
Var.record("signalNewValue", "Fiber %s for var %s signalled by %s", this, this.var, var);
hasNewVal = true;
unpark(var);
}
Expand All @@ -254,6 +255,7 @@ protected Void run() throws SuspendExecution, InterruptedException {
if (v != null)
v.ch.close(t);
} finally {
Var.record("run", "Fiber %s for var %s terminated", this, var);
for (Var<?> v1 : registeredVars) {
v1.registeredFibers.remove(this);
v1.notifyRegistered();
Expand Down

0 comments on commit 0f65292

Please sign in to comment.