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]

[Bug uprobes/4738] UPROBES_SSOL and URETPROBES must depend on UPROBES in Kconfig


------- Additional Comments From jkenisto at us dot ibm dot com  2007-07-09 20:52 -------
(In reply to comment #2)
> In which case, we have one of two choices:
> 
> a> Make the dependency implicit as we do with kprobes (no KPROBES=y implies no
> kretprobes either);

That's pretty much what we're doing now.

> this will require that we don't touch the Kconfig files,
> except to add CONFIG_UPROBES.

No, it doesn't require that.  See advice from Dave Hansen, appended to this comment.


> b> If you want to retain the Kconfig entries for SSOL and URETPROBES, put in an
> explicit dependency for the two on UPROBES. Per Kconfig language semantics, you
> shouldn't be able to select a dependent feature without an explicit dependency
> specified in the Kconfig file.

Again, support for SSOL or uretprobes is not something we need/want the user to
select.

> 
> Need to choose one; You can't have both :-)

I disagree.  But I would be willing to consider the following modifications, if
you'll test them and verify that (1) they do what you want and (2) SSOL and
uretprobes do NOT show up as choices in make *config.  (I ask you cuz you've
already been experimenting with Kconfig changes.)

config UPROBES_SSOL
        bool
        default y
+       depends on UPROBES

config URETPROBES
        bool
        default y
+       depends on UPROBES

Note that there should be no reason for arch-specific code to test
CONFIG_UPROBES_SSOL or CONFIG_URETPROBES.

Jim

Advice from Dave Hansen, 4/24/07:
[even number of >s is Dave; odd number of >s is Jim]
-----
> > > > > +#define SS_OUT_OF_LINE
> > > >
> > > > This should be done in Kconfig instead of here.
> > >
> > > Defining this says that this architecture's implementation of uprobes
> > > supports single-stepping out of line (SSOL).  What we expect of a
> > > port to a new architecture is:
> > >
> > > 1) Support only single-stepping inline, which is pretty easy.  Debug
> > > that.  Leave SS_OUT_OF_LINE undefined.
> > >
> > > 2) Then, add support for SSOL -- e.g., add the fixups in
> > > uprobe_resume_execution().  Add the #define of SS_OUT_OF_LINE.
> > >
> > > We don't put this in Kconfig because it's not something the user can or
> > > should enable/disable.
> >
> > Kconfig is not just about what users can enable or disable.  It is about
> > expressing dependencies for the kernel, and does not always involve
> > prompting.  The architecture Kconfigs have all kinds of stuff that you
> > never see in the actual 'make menuconfig' menus.
>
> There are 1-2 dozen such macros that AREN'T defined in Kconfig files --
> stuff like ARCH_HAS_NMI_WATCHDOG, ARCH_HAS_SETUP_ADDITIONAL_PAGES,
> ARCH_SUPPORTS_KRETPROBES.  Are these mistakes, or is there documentation
> somewhere as to what goes in Kconfig and what doesn't?

They're bad form.  Everything goes in Kconfig unless you have a really,
really good excuse.
-----


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4738

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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