aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2011-10-13 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:19:24 -0800
commit24395bff3db9e12e6f406ad783ecc9bcde626253 (patch)
treef3b908ff6d8e25f28191fbaf040fd802670aa880
parentc5f78695067d4614bcb494d5f54bde4405c43609 (diff)
downloadgator-24395bff3db9e12e6f406ad783ecc9bcde626253.tar.gz
gator: Version 5.7a5.7a
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
-rw-r--r--driver/gator_main.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/driver/gator_main.c b/driver/gator_main.c
index 87e7f2a..91744ad 100644
--- a/driver/gator_main.c
+++ b/driver/gator_main.c
@@ -560,14 +560,15 @@ static int gator_start(void)
}
}
- if (gator_event_sampling_start())
- goto event_sampling_failure;
+ // cookies shall be initialized before trace_sched_start() and gator_timer_online()
+ if (cookies_initialize())
+ goto cookies_failure;
if (gator_annotate_start())
goto annotate_failure;
if (gator_trace_sched_start())
goto sched_failure;
- if (cookies_initialize())
- goto cookies_failure;
+ if (gator_event_sampling_start())
+ goto event_sampling_failure;
if (gator_timer_online(gator_timer_count))
goto timer_failure;
if (gator_notifier_start())
@@ -578,14 +579,14 @@ static int gator_start(void)
notifier_failure:
gator_timer_offline();
timer_failure:
- cookies_release();
-cookies_failure:
+ gator_event_sampling_stop();
+event_sampling_failure:
gator_trace_sched_stop();
sched_failure:
gator_annotate_stop();
annotate_failure:
- gator_event_sampling_stop();
-event_sampling_failure:
+ cookies_release();
+cookies_failure:
// stop all events
list_for_each_entry(gi, &gator_events, list)
if (gi->stop)
@@ -604,9 +605,9 @@ static void gator_stop(void)
if (gi->stop)
gi->stop();
- gator_event_sampling_stop();
gator_annotate_stop();
gator_trace_sched_stop();
+ gator_event_sampling_stop();
// stop all interrupt callback reads before tearing down other interfaces
gator_notifier_stop(); // should be called before gator_timer_offline to avoid re-enabling the hrtimer after it has been offlined