Skip to content

Commit

Permalink
Use the new add milestone API
Browse files Browse the repository at this point in the history
  • Loading branch information
syifan committed Nov 25, 2024
1 parent b67a14b commit e70aaae
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
5 changes: 5 additions & 0 deletions samples/runner/dramtracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ func (t *dramTracer) StepTask(task tracing.Task) {
// Do nothing
}

// AddMilestone does nothing
func (t *dramTracer) AddMilestone(milestone tracing.Milestone) {
// Do nothing
}

// EndTask records the end of the task
func (t *dramTracer) EndTask(task tracing.Task) {
t.Lock()
Expand Down
4 changes: 4 additions & 0 deletions samples/runner/insttracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func (t *instTracer) StepTask(task tracing.Task) {
// Do nothing
}

func (t *instTracer) AddMilestone(milestone tracing.Milestone) {
// Do nothing
}

func (t *instTracer) EndTask(task tracing.Task) {
_, found := t.inflightInst[task.ID]
if !found {
Expand Down
3 changes: 1 addition & 2 deletions samples/runner/timingplatform.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
memtraces "github.com/sarchlab/akita/v4/mem/trace"

"github.com/sarchlab/akita/v4/analysis"
"github.com/sarchlab/akita/v4/datarecording"

Check failure on line 11 in samples/runner/timingplatform.go

View workflow job for this annotation

GitHub Actions / Compile

github.com/sarchlab/akita/v4@v4.0.0-alpha.5: replacement directory ../akita does not exist
"github.com/sarchlab/akita/v4/mem/mem"
"github.com/sarchlab/akita/v4/mem/vm"
"github.com/sarchlab/akita/v4/mem/vm/mmu"
"github.com/sarchlab/akita/v4/monitoring"
"github.com/sarchlab/akita/v4/noc/networking/pcie"
"github.com/sarchlab/akita/v4/sim"
"github.com/sarchlab/akita/v4/tracing"
"github.com/sarchlab/akita/v4/datarecording"
"github.com/sarchlab/mgpusim/v4/driver"
)

Expand Down Expand Up @@ -237,7 +237,6 @@ func (b *R9NanoPlatformBuilder) setupVisTracing() {
// }

visTracer := tracing.NewDBTracer(b.engine, be)
tracing.SetTracer(visTracer)
visTracer.SetTimeRange(b.traceVisStartTime, b.traceVisEndTime)

b.visTracer = visTracer
Expand Down
5 changes: 5 additions & 0 deletions timing/cu/cpistacktracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ func (h *CPIStackTracer) StepTask(task tracing.Task) {
// Do nothing
}

// AddMilestone does nothing.
func (h *CPIStackTracer) AddMilestone(milestone tracing.Milestone) {
// Do nothing
}

// EndTask is called when a task is ended.
func (h *CPIStackTracer) EndTask(task tracing.Task) {
originalTask, found := h.inflightTasks[task.ID]
Expand Down
4 changes: 4 additions & 0 deletions timing/cu/isa_debugger.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (h *ISADebugger) StepTask(task tracing.Task) {
// Do nothing.
}

func (h *ISADebugger) AddMilestone(milestone tracing.Milestone) {
// Do nothing.
}

// EndTask marks the end of an instruction.
func (h *ISADebugger) EndTask(task tracing.Task) {
originalTask, found := h.executingInst[task.ID]
Expand Down
3 changes: 0 additions & 3 deletions timing/rob/rob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/sarchlab/akita/v4/datarecording"
"github.com/sarchlab/akita/v4/mem/mem"
"github.com/sarchlab/akita/v4/sim"
"github.com/sarchlab/akita/v4/tracing"
)

var dataRecorder *datarecording.SQLiteWriter
Expand All @@ -28,8 +27,6 @@ var _ = BeforeSuite(func() {
dataRecorder = datarecording.NewSQLiteWriter("")
dataRecorder.Init()
engine = sim.NewSerialEngine()
tracer := tracing.NewDBTracer(engine, dataRecorder)
tracing.SetTracer(tracer)
})

var _ = AfterSuite(func() {
Expand Down

0 comments on commit e70aaae

Please sign in to comment.