+Sat May 7 13:57:17 2005 Søren Sandmann <sandmann@redhat.com>
+
+ * sfile.c (sfile_output_free): Implement this function
+
+ * sfile.c (sfile_input_free): Implement this function
+
Fri May 6 23:38:48 2005 Søren Sandmann <sandmann@redhat.com>
* sysprof-module.c (do_generate): Another desparate hack to try
return crc == file_crc;
}
-/* FIXME: this should be detected by config.h */
+/* FIXME - not10: this should probably be detected by config.h -- find out what gdb does*/
static const char *debug_file_directory = "/usr/lib/debug";
static char *
sfile_begin_get_record (input, "profile");
sfile_get_integer (input, "size", &profile->size);
- sfile_get_pointer (input, "call_tree", &profile->call_tree);
+ sfile_get_pointer (input, "call_tree", (void **)&profile->call_tree);
n = sfile_begin_get_list (input, "objects");
for (i = 0; i < n; ++i)
static char *
generate_presentation_name (Process *process, gulong address)
{
- /* FIXME using 0 to indicate "process" is broken */
+ /* FIXME - not10 - using 0 to indicate "process" is broken */
if (address)
{
const Symbol *symbol = process_lookup_symbol (process, address);
{
return g_strdup_printf ("%s", process_get_cmdline (process));
}
-#if 0
- /* FIXME - don't return addresses and stuff */
- return generate_key (profile, process, address);
-#endif
}
static void
}
#endif
+#define RECORD_SHIFT (sizeof (SType) * 8 - 1)
+#define LIST_SHIFT (sizeof (SType) * 8 - 2)
+
static SType
define_type (SType *type, SType fallback)
{
return fallback;
}
+static gboolean
+is_record_type (SType type)
+{
+ /* FIMXE - not10 */
+ return TRUE;
+}
+
+static gboolean
+is_list_type (SType type)
+{
+ /* FIXME - not10 */
+ return TRUE;
+}
+
gpointer
sformat_new_record (const char * name,
SType *type,
GHashTable *instructions_by_location;
};
-static gboolean
-is_record_type (SType type)
-{
- /* FIXME */
- return TRUE;
-}
-
-static gboolean
-is_list_type (SType type)
-{
- /* FIXME */
- return TRUE;
-}
-
void
sfile_begin_get_record (SFileInput *file, const char *name)
{
void
sfile_input_free (SFileInput *file)
{
- /* FIXME */
+ free_instructions (file->instructions, file->n_instructions);
+
+ g_hash_table_destroy (file->instructions_by_location);
+
+ g_free (file);
}
void
sfile_output_free (SFileOutput *sfile)
{
- /* FIXME */
+ Instruction *instructions;
+ int n_instructions;
+
+ n_instructions = sfile->instructions->len;
+ instructions = g_array_free (sfile->instructions, FALSE);
+
+ free_instructions (instructions, n_instructions);
+
+ g_hash_table_destroy (sfile->objects);
+ g_free (sfile);
}
*
* Serializer *serializer_new (SerializerFormat *format);
*
- * SerializerReadContext *serializer_begin_read (serializer *serialize,
- * const char *filename,
- * GError *err);
+ * SerializerReadContext *serializer_begin_read_filename (serializer *serialize,
+ * const char *filename,
+ * GError *err);
* serializer_get_blah (SerializerReadContext *);
* void serialzier_end_read (...);
*
SFileInput * sfile_load (const char *filename,
SFormat *format,
GError **err);
-void sfile_begin_get_record (SFileInput *file, const char *name);
-int sfile_begin_get_list (SFileInput *file, const char *name);
+void sfile_begin_get_record (SFileInput *file,
+ const char *name);
+int sfile_begin_get_list (SFileInput *file,
+ const char *name);
void sfile_get_pointer (SFileInput *file,
const char *name,
gpointer *pointer);
/* - Writing - */
-/* FIXME: see if we can't get rid of the names. It should be
-= * possible to pass NULL to state_transition_check() and
- * have it interprete that as "whatever". We would need
+/* FIXME - not10: see if we can't get rid of the names. It
+ * should be possible to pass NULL to state_transition_check()
+ * and have it interprete that as "whatever". We would need
* a way to get the name back then, though.
*/