{
struct ordered_events *oe = &s->ordered_events;
static const char * const str[] = {
+ "NONE",
"FINAL",
"ROUND",
"HALF ",
}
case OE_FLUSH__ROUND:
+ case OE_FLUSH__NONE:
default:
break;
};
if (!err) {
if (how == OE_FLUSH__ROUND)
oe->next_flush = oe->max_timestamp;
+
+ oe->last_flush_type = how;
}
pr_oe_time(oe->next_flush, "next_flush - ordered_events__flush POST %s, nr_events %u\n",
};
enum oe_flush {
+ OE_FLUSH__NONE,
OE_FLUSH__FINAL,
OE_FLUSH__ROUND,
OE_FLUSH__HALF,
struct ordered_event *last;
int buffer_idx;
unsigned int nr_events;
+ enum oe_flush last_flush_type;
};
struct ordered_event *ordered_events__new(struct ordered_events *oe, u64 timestamp);
#include "util.h"
#include "cpumap.h"
#include "perf_regs.h"
+#include "asm/bug.h"
static int perf_session__open(struct perf_session *session)
{
return -ETIME;
if (timestamp < oe->last_flush) {
- printf("Warning: Timestamp below last timeslice flush\n");
+ WARN_ONCE(1, "Timestamp below last timeslice flush\n");
+
pr_oe_time(timestamp, "out of order event");
- pr_oe_time(oe->last_flush, "last flush");
- return -EINVAL;
+ pr_oe_time(oe->last_flush, "last flush, last_flush_type %d\n",
+ oe->last_flush_type);
+
+ /* We could get out of order messages after forced flush. */
+ if (oe->last_flush_type != OE_FLUSH__HALF)
+ return -EINVAL;
}
new = ordered_events__new(oe, timestamp);