mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
Updates.
Mon Mar 27 23:04:30 2006 Soeren Sandmann <sandmann@redhat.com> * TODO: Updates. * sfile.c (handle_{begin,end}_element): Don't generate begin/end instructions for value elements. * sfile.c (build_instructions): Remove debugging spew.
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
6534ca13c0
commit
9e612d798a
@ -1,3 +1,12 @@
|
|||||||
|
Mon Mar 27 23:04:30 2006 Soeren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
|
* TODO: Updates.
|
||||||
|
|
||||||
|
* sfile.c (handle_{begin,end}_element): Don't generate begin/end
|
||||||
|
instructions for value elements.
|
||||||
|
|
||||||
|
* sfile.c (build_instructions): Remove debugging spew.
|
||||||
|
|
||||||
Mon Mar 27 21:44:04 2006 Soeren Sandmann <sandmann@redhat.com>
|
Mon Mar 27 21:44:04 2006 Soeren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
* sformat.[ch]: New files containing a simplified and sanitized
|
* sformat.[ch]: New files containing a simplified and sanitized
|
||||||
|
|||||||
32
TODO
32
TODO
@ -128,16 +128,6 @@ Before 1.2:
|
|||||||
|
|
||||||
- split out dfa in its own generic class
|
- split out dfa in its own generic class
|
||||||
|
|
||||||
- Formats should become first-class, stand-alone objects that offers
|
|
||||||
help with parsing and nothing else.
|
|
||||||
|
|
||||||
ParseContext* format_get_parse_context (format, err);
|
|
||||||
gboolean parse_context_begin (parse_context, name, err);
|
|
||||||
gboolean parse_context_end (parse_format, name, err);
|
|
||||||
|
|
||||||
basically, a Format encapsulates a DFA, and a ParseContext encapsulates
|
|
||||||
the current state.
|
|
||||||
|
|
||||||
- make a generic representation of xml files with quarks for strings:
|
- make a generic representation of xml files with quarks for strings:
|
||||||
struct item {
|
struct item {
|
||||||
int begin/end/text;
|
int begin/end/text;
|
||||||
@ -313,6 +303,18 @@ When the interrupt happens,
|
|||||||
|
|
||||||
Later:
|
Later:
|
||||||
|
|
||||||
|
- Find out if sysprof accurately reports time spent handling pagefaults.
|
||||||
|
There is evidence that it doesn't:
|
||||||
|
- a version of sysprof took 10 seconds to load a certain profile.
|
||||||
|
Profiling itself it appeared that most of the time was spent
|
||||||
|
in the GMarkup parser
|
||||||
|
- a newer version of sysprof with significantly more compact
|
||||||
|
Instructions took about 5 seconds, but the profile looked
|
||||||
|
about the same.
|
||||||
|
The difference between the two versions has to be in page faults/
|
||||||
|
memory speed, but the profiles looked identically.
|
||||||
|
Try and reproduce this result in a more controlled experiment.
|
||||||
|
|
||||||
- See if it is possible to group the X server activity under the process that
|
- See if it is possible to group the X server activity under the process that
|
||||||
generated it.
|
generated it.
|
||||||
|
|
||||||
@ -490,6 +492,16 @@ Later:
|
|||||||
|
|
||||||
DONE:
|
DONE:
|
||||||
|
|
||||||
|
- Formats should become first-class, stand-alone objects that offers
|
||||||
|
help with parsing and nothing else.
|
||||||
|
|
||||||
|
ParseContext* format_get_parse_context (format, err);
|
||||||
|
gboolean parse_context_begin (parse_context, name, err);
|
||||||
|
gboolean parse_context_end (parse_format, name, err);
|
||||||
|
|
||||||
|
basically, a Format encapsulates a DFA, and a ParseContext encapsulates
|
||||||
|
the current state.
|
||||||
|
|
||||||
- make stackstash ref counted
|
- make stackstash ref counted
|
||||||
|
|
||||||
- Charge 'self' properly to processes that don't get any stack trace at all
|
- Charge 'self' properly to processes that don't get any stack trace at all
|
||||||
|
|||||||
44
sfile.c
44
sfile.c
@ -210,10 +210,6 @@ sfile_get_pointer (SFileInput *file,
|
|||||||
{
|
{
|
||||||
Instruction *instruction;
|
Instruction *instruction;
|
||||||
|
|
||||||
instruction = file->current_instruction++;
|
|
||||||
g_return_if_fail (stype_is_pointer (instruction->type) &&
|
|
||||||
check_name (instruction, name));
|
|
||||||
|
|
||||||
instruction = file->current_instruction++;
|
instruction = file->current_instruction++;
|
||||||
g_return_if_fail (stype_is_pointer (instruction->type));
|
g_return_if_fail (stype_is_pointer (instruction->type));
|
||||||
|
|
||||||
@ -228,12 +224,7 @@ sfile_get_pointer (SFileInput *file,
|
|||||||
|
|
||||||
g_hash_table_insert (file->instructions_by_location, location, instruction);
|
g_hash_table_insert (file->instructions_by_location, location, instruction);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
instruction = file->current_instruction++;
|
|
||||||
g_return_if_fail (stype_is_pointer (instruction->type) &&
|
|
||||||
check_name (instruction, name));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
sfile_get_integer (SFileInput *file,
|
sfile_get_integer (SFileInput *file,
|
||||||
@ -242,19 +233,11 @@ sfile_get_integer (SFileInput *file,
|
|||||||
{
|
{
|
||||||
Instruction *instruction;
|
Instruction *instruction;
|
||||||
|
|
||||||
instruction = file->current_instruction++;
|
|
||||||
g_return_if_fail (stype_is_integer (instruction->type) &&
|
|
||||||
check_name (instruction, name));
|
|
||||||
|
|
||||||
instruction = file->current_instruction++;
|
instruction = file->current_instruction++;
|
||||||
g_return_if_fail (stype_is_integer (instruction->type));
|
g_return_if_fail (stype_is_integer (instruction->type));
|
||||||
|
|
||||||
if (integer)
|
if (integer)
|
||||||
*integer = instruction->u.integer.value;
|
*integer = instruction->u.integer.value;
|
||||||
|
|
||||||
instruction = file->current_instruction++;
|
|
||||||
g_return_if_fail (stype_is_integer (instruction->type) &&
|
|
||||||
check_name (instruction, name));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -264,19 +247,11 @@ sfile_get_string (SFileInput *file,
|
|||||||
{
|
{
|
||||||
Instruction *instruction;
|
Instruction *instruction;
|
||||||
|
|
||||||
instruction = file->current_instruction++;
|
|
||||||
g_return_if_fail (stype_is_string (instruction->type) &&
|
|
||||||
check_name (instruction, name));
|
|
||||||
|
|
||||||
instruction = file->current_instruction++;
|
instruction = file->current_instruction++;
|
||||||
g_return_if_fail (stype_is_string (instruction->type));
|
g_return_if_fail (stype_is_string (instruction->type));
|
||||||
|
|
||||||
if (string)
|
if (string)
|
||||||
*string = g_strdup (instruction->u.string.value);
|
*string = g_strdup (instruction->u.string.value);
|
||||||
|
|
||||||
instruction = file->current_instruction++;
|
|
||||||
g_return_if_fail (stype_is_string (instruction->type) &&
|
|
||||||
check_name (instruction, name));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -387,9 +362,11 @@ handle_begin_element (GMarkupParseContext *parse_context,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME - not10: is there really a reason to add begin/end instructions for values? */
|
if (stype_is_list (instruction.type) || stype_is_record (instruction.type))
|
||||||
instruction.kind = BEGIN;
|
{
|
||||||
g_array_append_val (build->instructions, instruction);
|
instruction.kind = BEGIN;
|
||||||
|
g_array_append_val (build->instructions, instruction);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -408,9 +385,12 @@ handle_end_element (GMarkupParseContext *context,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
instruction.kind = END;
|
if (stype_is_list (instruction.type) || stype_is_record (instruction.type))
|
||||||
|
{
|
||||||
|
instruction.kind = END;
|
||||||
|
|
||||||
g_array_append_val (build->instructions, instruction);
|
g_array_append_val (build->instructions, instruction);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -671,8 +651,6 @@ build_instructions (const char *contents, SFormat *format, int *n_instructions,
|
|||||||
|
|
||||||
*n_instructions = build.instructions->len;
|
*n_instructions = build.instructions->len;
|
||||||
|
|
||||||
g_print ("n instructions: %d\n", *n_instructions);
|
|
||||||
|
|
||||||
return (Instruction *)g_array_free (build.instructions, FALSE);
|
return (Instruction *)g_array_free (build.instructions, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user