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: visit_target_symbol() for derived_probes


William Cohen wrote:
I have tried to replicate what the dwarf and mark probes do as far as handling target variable ($variable) for $counter in the perfmon probes. The perfmon probe needs a read only value indicating which counter is being used for that event. From what I understand discussing this with Frank and examining the code here are the things that need to be done:

-allocate space for the variable
-generate a declaration for the synthesized function
-generate C code for the synthesized function
-replace the $target var use with a call to the synthesized function

It appears that I am not getting the function built in the latest patch that is saved in bz#909. Where exactly does the creation of the synthesized function occur for the dwarf and mark probes? I seem to be missing the corresponding operation. Later the code gets a seg fault in symresolution_info::visit_symbol(). Thus, for the this short example:

I tracked down my problem to a missing '&' so the systemtap_session wasn't passed by reference to perfmon_var_expanding_copy_visitory constructor. It looks I have something that generates a $counter handle for each of the probes so the script writer doesn't need to know which registers are used.


-Will


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