|
From: <sv...@va...> - 2012-10-21 02:39:55
|
florian 2012-10-21 03:39:42 +0100 (Sun, 21 Oct 2012)
New Revision: 13068
Log:
Fix a few Char/HChar mixups for cachegrind.
Modified files:
trunk/cachegrind/cg-arch.c
trunk/cachegrind/cg_main.c
Modified: trunk/cachegrind/cg-arch.c (+6 -6)
===================================================================
--- trunk/cachegrind/cg-arch.c 2012-10-21 03:30:18 +01:00 (rev 13067)
+++ trunk/cachegrind/cg-arch.c 2012-10-21 03:39:42 +01:00 (rev 13068)
@@ -41,7 +41,7 @@
// Checks cache config is ok. Returns NULL if ok, or a pointer to an error
// string otherwise.
-static Char* check_cache(cache_t* cache)
+static const HChar* check_cache(cache_t* cache)
{
// Simulator requires set count to be a power of two.
if ((cache->size % (cache->line_size * cache->assoc) != 0) ||
@@ -80,7 +80,7 @@
{
Long i1, i2, i3;
Char* endptr;
- Char* checkRes;
+ const HChar* checkRes;
// Option argument looks like "65536,2,64". Extract them.
i1 = VG_(strtoll10)(optval, &endptr); if (*endptr != ',') goto bad;
@@ -133,7 +133,7 @@
return False;
}
-static void umsg_cache_img(Char* desc, cache_t* c)
+static void umsg_cache_img(const HChar* desc, cache_t* c)
{
VG_(umsg)(" %s: %'d B, %d-way, %d B lines\n", desc,
c->size, c->assoc, c->line_size);
@@ -141,9 +141,9 @@
// Verifies if c is a valid cache.
// An invalid value causes an assert, unless clo_redefined is True.
-static void check_cache_or_override(Char* desc, cache_t* c, Bool clo_redefined)
+static void check_cache_or_override(const HChar* desc, cache_t* c, Bool clo_redefined)
{
- Char* checkRes;
+ const HChar* checkRes;
checkRes = check_cache(c);
if (checkRes) {
@@ -416,7 +416,7 @@
#endif
if (!all_caches_clo_defined) {
- const char warning[] =
+ const HChar warning[] =
"Warning: Cannot auto-detect cache config, using defaults.\n"
" Run with -v to see.\n";
VG_(dmsg)("%s", warning);
Modified: trunk/cachegrind/cg_main.c (+4 -3)
===================================================================
--- trunk/cachegrind/cg_main.c 2012-10-21 03:30:18 +01:00 (rev 13067)
+++ trunk/cachegrind/cg_main.c 2012-10-21 03:39:42 +01:00 (rev 13068)
@@ -67,7 +67,7 @@
static Bool clo_cache_sim = True; /* do cache simulation? */
static Bool clo_branch_sim = False; /* do branch simulation? */
-static Char* clo_cachegrind_out_file = "cachegrind.out.%p";
+static HChar* clo_cachegrind_out_file = "cachegrind.out.%p";
/*------------------------------------------------------------*/
/*--- Cachesim configuration ---*/
@@ -667,7 +667,7 @@
static void flushEvents ( CgState* cgs )
{
Int i, regparms;
- Char* helperName;
+ const HChar* helperName;
void* helperAddr;
IRExpr** argv;
IRExpr* i_node_expr;
@@ -1464,7 +1464,8 @@
static void cg_fini(Int exitcode)
{
- static Char buf1[128], buf2[128], buf3[128], buf4[123], fmt[128];
+ static Char buf1[128], buf2[128], buf3[128], buf4[123];
+ static HChar fmt[128];
CacheCC D_total;
BranchCC B_total;
|