/**************************************************************************
*
* Copyright 2011-2012 Jose Fonseca
+ * Copyright (C) 2013 Intel Corporation. All rights reversed.
+ * Author: Shuang He <shuang.he@intel.com>
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
#include "trace_model.hpp"
#include "trace_parser.hpp"
#include "trace_profiler.hpp"
+#include "trace_dump.hpp"
#include "scoped_allocator.hpp"
*/
inline void *
alloc(const trace::Value *value, size_t size) {
- const trace::Array *array = dynamic_cast<const trace::Array *>(value);
+ const trace::Array *array = value->toArray();
if (array) {
return ::ScopedAllocator::alloc(array->size() * size);
}
- const trace::Null *null = dynamic_cast<const trace::Null *>(value);
+ const trace::Null *null = value->toNull();
if (null) {
return NULL;
}
extern bool profilingCpuTimes;
extern bool profilingGpuTimes;
extern bool profilingPixelsDrawn;
+extern bool profilingMemoryUsage;
/**
* State dumping.
extern unsigned frameNo;
extern unsigned callNo;
+extern trace::DumpFlags dumpFlags;
std::ostream &warning(trace::Call &call);