#ifndef _BEJAVACOAL_H
#define _BEJAVACOAL_H
-struct _java_coal_t;
-typedef struct _java_coal_t java_coal_t;
+struct _be_java_coal_t;
+typedef struct _be_java_coal_t be_java_coal_t;
#ifdef WITH_LIBCORE
/**
* Register libcore options.
*/
-void java_coal_register_options(lc_opt_entry_t *grp);
+void be_java_coal_register_options(lc_opt_entry_t *grp);
#endif /* WITH_LIBCORE */
* @param n first node id.
* @param m second node id.
*/
-void java_coal_add_int_edge(java_coal_t *c, int n, int m);
+void be_java_coal_add_int_edge(be_java_coal_t *c, int n, int m);
/**
* Add an affinity edge.
* @param m second node id.
* @param costs Costs for the edge.
*/
-void java_coal_add_aff_edge(java_coal_t *c, int n, int m, int costs);
+void be_java_coal_add_aff_edge(be_java_coal_t *c, int n, int m, int costs);
/**
* Set the color of a node.
* @param n The node.
* @param col The color.
*/
-void java_coal_set_color(java_coal_t *c, int n, int col);
+void be_java_coal_set_color(be_java_coal_t *c, int n, int col);
+
+/**
+ * Set debug information for a node.
+ * @param n The node.
+ * @param dbg Some string copied to Java.
+ */
+void be_java_coal_set_debug(be_java_coal_t *c, int n, const char *dbg);
/**
* Forbid a color for a node.
* @param n The node.
* @param col The color.
*/
-void java_coal_forbid_color(java_coal_t *c, int n, int col);
+void be_java_coal_forbid_color(be_java_coal_t *c, int n, int col);
/**
* Start the coalescing.
*/
-void java_coal_coalesce(java_coal_t *c);
+void be_java_coal_coalesce(be_java_coal_t *c);
/**
* Dump the graph into a dot file.
* @param fn Filename to dump to.
*/
-void java_coal_dump(java_coal_t *c, const char *fn);
+void be_java_coal_dump(be_java_coal_t *c, const char *fn);
/**
* Get the color of a node.
* @param n The node.
* @return The color of the node.
*/
-int java_coal_get_color(java_coal_t *c, int n);
+int be_java_coal_get_color(be_java_coal_t *c, int n);
/**
* Init the JAVA coalescer.
* @param dbg_level Te debug level for the coalescer. 0 means quiet. >0 more verbose.
* @return The coalescing object.
*/
-java_coal_t *java_coal_init(const char *graph_name, int n_nodes, int n_regs, int dbg_level);
+be_java_coal_t *be_java_coal_init(const char *graph_name, int n_nodes, int n_regs, int dbg_level);
/**
- * Destroy the coalescing object.
+ * Start the JVM.
+ * This is also done lazily by be_java_coal_init() but as that is called by
+ * the coalescing driver, it might tamper the runtime measurements. So here is
+ * an extra call.
*/
-void java_coal_destroy(java_coal_t *c);
+void be_java_coal_start_jvm(void);
+/**
+ * Destroy the coalescing object.
+ */
+void be_java_coal_destroy(be_java_coal_t *c);
#endif