Re: missing data in traces
Mathieu Desnoyers <[email protected]> Thu, 20 Dec 2007 12:30:58 -0500
| Newsgroups | gmane.linux.kernel.tracing |
|---|---|
| Message-ID | <20071220173058.GA2386@Krystal> |
* Jan Altenberg ([email protected]) wrote: > > > Confirmation that it works fine for you would be appreciated :) > > Still seems to crash on my system. > Hi Pierre-Marc, This one seems to be caused by your new code that does not mix well with irq/trap/softirq tables resize while the trace is read. soft_irq_states irq_states trap_states should be updated upon softirq_entry irq_entry trap_entry and dump_softirq (dump irq and dump traps not implemented yet) A function that dynamically updates the name and state table sizes when required should be created. (that also includes syscall_entry and dump_syscalls) My current code that looks like if (unlikely(ts->nb_irqs <= irq)) { /* Fixup an incomplete irq table */ GQuark *old_names = ts->irq_names; guint new_nb_irqs = max(irq + 1, ts->nb_irqs * 2); guint i; GString *fe_name = g_string_new(""); ts->irq_names = g_new(GQuark, new_nb_irqs); memcpy(ts->irq_names, old_names, ts->nb_irqs * sizeof(GQuark)); for(i = ts->nb_irqs ; i < new_nb_irqs ; i++) { g_string_printf(fe_name, "irq %d", i); ts->irq_names[i] = g_quark_from_string(fe_name->str); } g_string_free(fe_name, TRUE); ts->nb_irqs = new_nb_irqs; } (that's the irq example) should be put in this function, along with syscall, softirq and traps table size updates, and with the *_states size updates too. Can you find time to look into this ? Mathieu > Program received signal SIGSEGV, Segmentation fault. > 0x000000000041482a in irq_entry (hook_data=<value optimized out>, call_data=<value optimized out>) > at state.c:1981 > 1981 g_array_set_size(irqst->mode_stack, irqst->mode_stack->len + 1); > (gdb) bt > #0 0x000000000041482a in irq_entry (hook_data=<value optimized out>, call_data=<value optimized out>) > at state.c:1981 > #1 0x000000000040c90f in lttv_hooks_call_merge (h1=0x7d8c60, call_data1=0x8d4550, h2=0x95cb00, > call_data2=0x8d4550) at hook.c:333 > #2 0x0000000000418cb3 in lttv_process_traceset_middle (self=0x82fb40, end= > {tv_sec = 12338, tv_nsec = 982591959}, nb_events=6000, end_position=0x0) at tracecontext.c:768 > #3 0x00002b2bf998a166 in execute_events_requests (tab=0x7e3060) at callbacks.c:1446 > #4 0x00000034eb02cf64 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 > #5 0x00000034eb02fd9d in g_main_context_check () from /lib64/libglib-2.0.so.0 > #6 0x00000034eb0300aa in g_main_loop_run () from /lib64/libglib-2.0.so.0 > #7 0x0000003c56f2dad3 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0 > #8 0x00002b2bf99867a6 in window_creation_hook (hook_data=<value optimized out>, > call_data=<value optimized out>) at init_module.c:129 > #9 0x000000000040c9aa in lttv_hooks_call (h=0x62bf40, call_data=0x0) at hook.c:272 > #10 0x000000000040af3d in main (argc=15, argv=0x7fffb158aa88) at main.c:219 > > Jan > -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68