This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: loc2-test and stap disagree with each other


Roland McGrath wrote:
Indeed, eventhough the variable is in scope, its value is not available.
I tried
./loc2c-test -k 0xc00000000036d048 prev pid
loc2c-test: not accessible at this address

Please file a bug about systemtap giving you the confusing error message for this. It should say something clearer.

It looks like a compiler issue, does it? I built my own kernel-debuginfo on a SLES10 box with gcc 4.1.0.

It is not necessarily any kind of bug at all. Optimization may have made the value unavailable at that PC location. We'd have to look at the source code and the assembly code and DWARF info it produced in detail to see if there is anything more useful for you that the compiler could have done.


Thanks, Roland

Here's the code fragment where I try to insert probe (middle of the schedule())

3021 switch_tasks:
3022 if (next == rq->idle)
3023 schedstat_inc(rq, sched_goidle);
3024 prefetch(next);
3025 prefetch_stack(next);
3026 clear_tsk_need_resched(prev);
3027 rcu_qsctr_inc(task_cpu(prev));
3028
3029 update_cpu_clock(prev, rq, now);
3030
3031 prev->sleep_avg -= run_time;
3032 if ((long)prev->sleep_avg <= 0)
3033 prev->sleep_avg = 0;
3034 prev->timestamp = prev->last_ran = now;
3035 <==== probe here
3036 sched_info_switch(prev, next);
3037 if (likely(prev != next)) {
3038 next->timestamp = now;
3039 rq->nr_switches++;
3040 rq->curr = next;
3041 ++*switch_count;
3042
3043 prepare_task_switch(rq, next);
3044 prev = context_switch(rq, prev, next);
3045 barrier();


Attached's the assembly for sched.o via objdump -D, the inserted probe is around line 9350 of the file (0xbb8 offset from the top of .schedule)


Sorry, I don't know how to gather the DWARF info. Please help.

Thanks, Hien.

Attachment: sched-objdump.tar.gz
Description: GNU Zip compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]