Functions, variables, structures and macros in the credit2 scheduler had partially the same names as in the credit scheduler. This makes it hard to find the correct functions in backtraces or cscope. Rename all names in credit2 from csched_*/CSCHED_* to csched2_*/CSCHED2_* Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> 1 file changed, 223 insertions(+), 223 deletions(-) xen/common/sched_credit2.c | 446 ++++++++++++++++++++++---------------------- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
>>> On 27.02.13 at 13:19, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote: > Functions, variables, structures and macros in the credit2 scheduler had > partially the same names as in the credit scheduler. This makes it hard to > find the correct functions in backtraces or cscope. > > Rename all names in credit2 from csched_*/CSCHED_* to csched2_*/CSCHED2_*I don''t think this is a suitable approach - if anything, we should aim at having printed static symbols (in backtraces etc) prefixed with their source file name. I would even question quite a few of the csched_ prefixes in credit1... Jan
On 27.02.2013 13:43, Jan Beulich wrote:>>>> On 27.02.13 at 13:19, Juergen Gross<juergen.gross@ts.fujitsu.com> wrote: >> Functions, variables, structures and macros in the credit2 scheduler had >> partially the same names as in the credit scheduler. This makes it hard to >> find the correct functions in backtraces or cscope. >> >> Rename all names in credit2 from csched_*/CSCHED_* to csched2_*/CSCHED2_* > > I don''t think this is a suitable approach - if anything, we should aim > at having printed static symbols (in backtraces etc) prefixed with > their source file name. I would even question quite a few of the > csched_ prefixes in credit1...Just one other thought: unique names would help for analyzing crash dumps, too. Juergen -- Juergen Gross Principal Developer Operating Systems PBG PDG ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
>>> On 01.03.13 at 07:06, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote: > On 27.02.2013 13:43, Jan Beulich wrote: >>>>> On 27.02.13 at 13:19, Juergen Gross<juergen.gross@ts.fujitsu.com> wrote: >>> Functions, variables, structures and macros in the credit2 scheduler had >>> partially the same names as in the credit scheduler. This makes it hard to >>> find the correct functions in backtraces or cscope. >>> >>> Rename all names in credit2 from csched_*/CSCHED_* to csched2_*/CSCHED2_* >> >> I don''t think this is a suitable approach - if anything, we should aim >> at having printed static symbols (in backtraces etc) prefixed with >> their source file name. I would even question quite a few of the >> csched_ prefixes in credit1... > > Just one other thought: unique names would help for analyzing crash dumps, > too.Only if the crash dump analyzing tool is dumb enough to also not properly qualify non-global names. ELF has all that is needed here, just the code consuming ELF symbol tables in the whole Linux world seems to be ignoring this capability. Jan
On 01.03.2013 09:20, Jan Beulich wrote:>>>> On 01.03.13 at 07:06, Juergen Gross<juergen.gross@ts.fujitsu.com> wrote: >> On 27.02.2013 13:43, Jan Beulich wrote: >>>>>> On 27.02.13 at 13:19, Juergen Gross<juergen.gross@ts.fujitsu.com> wrote: >>>> Functions, variables, structures and macros in the credit2 scheduler had >>>> partially the same names as in the credit scheduler. This makes it hard to >>>> find the correct functions in backtraces or cscope. >>>> >>>> Rename all names in credit2 from csched_*/CSCHED_* to csched2_*/CSCHED2_* >>> >>> I don''t think this is a suitable approach - if anything, we should aim >>> at having printed static symbols (in backtraces etc) prefixed with >>> their source file name. I would even question quite a few of the >>> csched_ prefixes in credit1... >> >> Just one other thought: unique names would help for analyzing crash dumps, >> too. > > Only if the crash dump analyzing tool is dumb enough to also > not properly qualify non-global names. ELF has all that is needed > here, just the code consuming ELF symbol tables in the whole > Linux world seems to be ignoring this capability.I completely agree with you. OTOH this does not help really very much for analyzing dumps, using cscope or interpreting backtraces of the hypervisor. Unless the tools are changed to include the file names (including paths, please!). Changing the hypervisor accordingly is in our hands. Using cscope (or similar tools) is possible with duplicate names, even if this isn''t optimal IMO. Changing the dump analyzing tool(s) might be possible, but requires potentially a longish discussion with the maintainer(s)... Up to the point when all of this is done, changing the names to be unique seems to be a sensible way to make life easier. Juergen -- Juergen Gross Principal Developer Operating Systems PBG PDG ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
On 01/03/13 08:47, Juergen Gross wrote:> On 01.03.2013 09:20, Jan Beulich wrote: >>>>> On 01.03.13 at 07:06, Juergen Gross<juergen.gross@ts.fujitsu.com> wrote: >>> On 27.02.2013 13:43, Jan Beulich wrote: >>>>>>> On 27.02.13 at 13:19, Juergen Gross<juergen.gross@ts.fujitsu.com> wrote: >>>>> Functions, variables, structures and macros in the credit2 scheduler had >>>>> partially the same names as in the credit scheduler. This makes it hard to >>>>> find the correct functions in backtraces or cscope. >>>>> >>>>> Rename all names in credit2 from csched_*/CSCHED_* to csched2_*/CSCHED2_* >>>> I don''t think this is a suitable approach - if anything, we should aim >>>> at having printed static symbols (in backtraces etc) prefixed with >>>> their source file name. I would even question quite a few of the >>>> csched_ prefixes in credit1... >>> Just one other thought: unique names would help for analyzing crash dumps, >>> too. >> Only if the crash dump analyzing tool is dumb enough to also >> not properly qualify non-global names. ELF has all that is needed >> here, just the code consuming ELF symbol tables in the whole >> Linux world seems to be ignoring this capability. > I completely agree with you. > > OTOH this does not help really very much for analyzing dumps, using cscope or > interpreting backtraces of the hypervisor. Unless the tools are changed to > include the file names (including paths, please!). > > Changing the hypervisor accordingly is in our hands. > > Using cscope (or similar tools) is possible with duplicate names, even if this > isn''t optimal IMO. > > Changing the dump analyzing tool(s) might be possible, but requires > potentially a longish discussion with the maintainer(s)... > > Up to the point when all of this is done, changing the names to be unique seems > to be a sensible way to make life easier. > > > Juergen >And for my crashdump analyser, all I have to go on is /boot/xen-$VERSION.map, which contains no de-duplication of similarly-named symbols. FWIW, I agree with the original patch, as I have fallen over exactly this issue with the credit scheduler before. ~Andrew
On Wed, Feb 27, 2013 at 12:19 PM, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote:> Functions, variables, structures and macros in the credit2 scheduler had > partially the same names as in the credit scheduler. This makes it hard to > find the correct functions in backtraces or cscope. > > Rename all names in credit2 from csched_*/CSCHED_* to csched2_*/CSCHED2_* > > Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>Acked-by: George Dunlap <george.dunlap@eu.citrix.com> In the future, could you use git e-mail or hg email to send this with the patch in-line, rather than as an attachment? It''s hard to comment on individual lines otherwise. -George