[gomp4] Remove stray debugging code
diff mbox

Message ID 20141028164311.35968fed@octopus
State New
Headers show

Commit Message

Julian Brown Oct. 28, 2014, 4:43 p.m. UTC
Hi,

This patch removes some debugging code leftover from development. It's
probably not helpful to keep it around now.

OK for gomp4 branch?

Thanks,

Julian

ChangeLog

    libgomp/
    * oacc-host.c (DEBUG): Remove undefine.
    * plugin-nvptx.c (DEBUG, DISABLE_ASYNC): Remove comment-out macro
    definitions.
    * target.c (dump_mappings): Remove debugging function.

Comments

Thomas Schwinge Oct. 28, 2014, 7:32 p.m. UTC | #1
Hi Julian!

On Tue, 28 Oct 2014 16:43:11 +0000, Julian Brown <julian@codesourcery.com> wrote:
> This patch removes some debugging code leftover from development. It's
> probably not helpful to keep it around now.

Agreed.  It remains available in the revision control system, but I've
found that typically you'll need your own, bespoke debugging code anyway.
Or, :-) use GDB's dprintf!)

> OK for gomp4 branch?

Yes, thanks!  (Again, "obvious".)

>     libgomp/
>     * oacc-host.c (DEBUG): Remove undefine.
>     * plugin-nvptx.c (DEBUG, DISABLE_ASYNC): Remove comment-out macro
>     definitions.
>     * target.c (dump_mappings): Remove debugging function.


Grüße,
 Thomas

Patch
diff mbox

commit 13794d26fc95225268e05abf9912ab6eba3c7b3f
Author: Julian Brown <julian@codesourcery.com>
Date:   Tue Oct 28 06:49:19 2014 -0700

    Remove stray debugging code

diff --git a/libgomp/oacc-host.c b/libgomp/oacc-host.c
index 6fe8f6c..fc3e77c 100644
--- a/libgomp/oacc-host.c
+++ b/libgomp/oacc-host.c
@@ -45,8 +45,6 @@ 
 #include <string.h>
 #include <stdio.h>
 
-#undef DEBUG
-
 #ifdef HOST_NONSHM_PLUGIN
 #define STATIC
 #define GOMP(X) GOMP_PLUGIN_##X
diff --git a/libgomp/plugin-nvptx.c b/libgomp/plugin-nvptx.c
index c5bdf73..8d040fe 100644
--- a/libgomp/plugin-nvptx.c
+++ b/libgomp/plugin-nvptx.c
@@ -30,9 +30,6 @@ 
    is not clear as to what that state might be.  Or how one might
    propagate it from one thread to another.  */
 
-//#define DEBUG
-//#define DISABLE_ASYNC
-
 #include "openacc.h"
 #include "config.h"
 #include "libgomp.h"
diff --git a/libgomp/target.c b/libgomp/target.c
index bce8ca6..73a186b 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -110,34 +110,6 @@  resolve_device (int device_id)
   return &devices[device_id];
 }
 
-__attribute__((used)) static void
-dump_mappings (FILE *f, splay_tree_node node)
-{
-  int i;
-  
-  splay_tree_key k = &node->key;
-  
-  if (!k)
-    return;
-  
-  fprintf (f, "key %p: host_start %p, host_end %p, tgt_offset %p, refcount %d, "
-	   "copy_from %s\n", k, (void *) k->host_start,
-	   (void *) k->host_end, (void *) k->tgt_offset, (int) k->refcount,
-	   k->copy_from ? "true" : "false");
-  fprintf (f, "tgt->refcount %d, tgt->tgt_start %p, tgt->tgt_end %p, "
-	   "tgt->to_free %p, tgt->prev %p, tgt->list_count %d, "
-	   "tgt->device_descr %p\n", (int) k->tgt->refcount,
-	   (void *) k->tgt->tgt_start, (void *) k->tgt->tgt_end,
-	   k->tgt->to_free, k->tgt->prev, (int) k->tgt->list_count,
-	   k->tgt->device_descr);
-
-  for (i = 0; i < k->tgt->list_count; i++)
-    fprintf (f, "item %d: %p\n", i, k->tgt->list[i]);
-  
-  dump_mappings (f, node->left);
-  dump_mappings (f, node->right);
-}
-
 /* Handle the case where splay_tree_lookup found oldn for newn.
    Helper function of gomp_map_vars.  */