X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fretrace.hpp;h=6e6bf131c6dc82eed5710db6df6b5e8fb0328633;hb=8cf630712592eea93b1a1988a0875fe293e6aea8;hp=7c8dcd5229426743bf52a52c0609b5fb84e0fb0b;hpb=7e35dc93a0e7d6e2e1e53ca975e59a9ee956c77b;p=apitrace diff --git a/retrace/retrace.hpp b/retrace/retrace.hpp index 7c8dcd5..6e6bf13 100644 --- a/retrace/retrace.hpp +++ b/retrace/retrace.hpp @@ -1,6 +1,8 @@ /************************************************************************** * * Copyright 2011-2012 Jose Fonseca + * Copyright (C) 2013 Intel Corporation. All rights reversed. + * Author: Shuang He * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36,6 +38,7 @@ #include "trace_model.hpp" #include "trace_parser.hpp" #include "trace_profiler.hpp" +#include "trace_dump.hpp" #include "scoped_allocator.hpp" @@ -60,11 +63,11 @@ public: */ inline void * alloc(const trace::Value *value, size_t size) { - const trace::Array *array = dynamic_cast(value); + const trace::Array *array = value->toArray(); if (array) { return ::ScopedAllocator::alloc(array->size() * size); } - const trace::Null *null = dynamic_cast(value); + const trace::Null *null = value->toNull(); if (null) { return NULL; } @@ -92,6 +95,7 @@ extern bool profiling; extern bool profilingCpuTimes; extern bool profilingGpuTimes; extern bool profilingPixelsDrawn; +extern bool profilingMemoryUsage; /** * State dumping. @@ -117,6 +121,7 @@ extern bool coreProfile; extern unsigned frameNo; extern unsigned callNo; +extern trace::DumpFlags dumpFlags; std::ostream &warning(trace::Call &call);