pax_global_header00006660000000000000000000000064126056157060014522gustar00rootroot0000000000000052 comment=7009f2f782e52d6105fe68d6ea2a9820a1099c06 systemtap-2.9/000077500000000000000000000000001260561570600134255ustar00rootroot00000000000000systemtap-2.9/.gitignore000066400000000000000000000006101260561570600154120ustar00rootroot00000000000000*~ #* *# .#* autom4te.* cscope.files cscope*out gmon.out config.h config.log config.status .deps loc2c-test run-stap run-staprun stamp-h1 stap staprun/staprun testresults staprun/stapio stap_merge CVS .checkstyle .cproject .metadata .project .settings .autotools SNAPSHOT *.o git_version.h Makefile build-elfutils include-elfutils lib-elfutils stamp-elfutils dtrace stappaths.7 .zanata-cache systemtap-2.9/.mailmap000066400000000000000000000041311260561570600150450ustar00rootroot00000000000000# Early history did not include userid->full-name mappings, so we do # that explicitly here. Ananth N Mavinakayanahalli Anil Keshavamurthy bibo mao Brad Chen Charles Spirakis Dave Brolley Dave Nomura David Smith David J. Wilder Denys Vlasenko Don Domingo Elliott Baron Eugene Teo Frank Ch. Eigler Frederic Turgis Graydon Hoare Hien Nguyen Jim Keniston Josh Stone Kai Meyer Kent Sebastian Kevin Stafford K.Prasad Li Guanglei Mark McLoughlin Martin Hunt Masami Hiramatsu Maynard Johnson Michael Behm Mike Mason Prasanna S Panchamukhi Prerna Saxena Rajan Arora Roland McGrath Rusty Lynch Shaohua Li Srikar Dronamraju Srinivasa DS Thang Nguyen Tom Zanussi Wenji Huang William Cohen Zhaolei Zhaolei # Normalize a few git commit names too Anithra Janakiraman Breno Leitao Bryn M. Reeves Dave Nomura Don Domingo K.Prasad K.Prasad Kent Sebastian Maran Pakkirisamy Mark Wielaard Negreanu Marius Adrian Negreanu Marius Adrian Prerna Saxena Przemysław Pawełczyk Przemysław Pawełczyk Srinivasa DS Wenji Huang Wenji Huang William Cohen William Cohen Rayson Ho Rayson Ho Tomoki Sekiyama systemtap-2.9/ABOUT-NLS000066400000000000000000002671331260561570600146700ustar00rootroot000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls will _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl' library and will decide to use it. If not, you may have to to use the `--with-libintl-prefix' option to tell `configure' where to look for it. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of June 2010. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca +--------------------------------------------------+ a2ps | [] [] | aegis | | ant-phone | | anubis | | aspell | [] [] | bash | | bfd | | bibshelf | [] | binutils | | bison | | bison-runtime | [] | bluez-pin | [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | | dfarc | | dialog | [] [] | dico | | diffutils | [] | dink | | doodle | | e2fsprogs | [] | enscript | [] | exif | | fetchmail | [] | findutils | [] | flex | [] | freedink | | gas | | gawk | [] [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] [] | gettext-tools | [] [] | gip | [] | gjay | | gliv | [] | glunarclock | [] [] | gnubiff | | gnucash | [] | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | | gold | | gpe-aerial | | gpe-beam | | gpe-bluetooth | | gpe-calendar | | gpe-clock | [] | gpe-conf | | gpe-contacts | | gpe-edit | | gpe-filemanager | | gpe-go | | gpe-login | | gpe-ownerinfo | [] | gpe-package | | gpe-sketchbook | | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | [] [] | gsasl | | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] [] [] | gtick | | gtkam | [] | gtkorphan | [] | gtkspell | [] [] [] | gutenprint | | hello | [] | help2man | | hylafax | | idutils | | indent | [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | | iso_639 | [] [] [] [] | iso_639_3 | | jwhois | | kbd | | keytouch | [] | keytouch-editor | | keytouch-keyboa... | [] | klavaro | [] | latrine | | ld | [] | leafpad | [] [] | libc | [] [] | libexif | () | libextractor | | libgnutls | | libgpewidget | | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | [] | libidn | | lifelines | | liferea | [] [] | lilypond | | linkdr | [] | lordsawar | | lprng | | lynx | [] | m4 | | mailfromd | | mailutils | | make | | man-db | | man-db-manpages | | minicom | | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | | psmisc | | pspp | [] | pwdutils | | radius | [] | recode | [] [] | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] [] | sed | [] [] | sharutils | [] [] | shishi | | skencil | | solfege | | solfege-manual | | soundtracker | | sp | | sysstat | | tar | [] | texinfo | | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] [] | wyslij-po | | xchat | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] | +--------------------------------------------------+ af am an ar as ast az be be@latin bg bn_IN bs ca 6 0 1 2 3 19 1 10 3 28 3 1 38 crh cs da de el en en_GB en_ZA eo es et eu fa +-------------------------------------------------+ a2ps | [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] () | anubis | [] [] | aspell | [] [] [] [] [] | bash | [] [] [] | bfd | [] | bibshelf | [] [] [] | binutils | [] | bison | [] [] | bison-runtime | [] [] [] [] | bluez-pin | [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] [] [] | cflow | [] [] | clisp | [] [] [] [] | coreutils | [] [] [] [] | cpio | | cppi | | cpplib | [] [] [] | cryptsetup | [] | dfarc | [] [] [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] | dink | [] [] [] | doodle | [] | e2fsprogs | [] [] [] | enscript | [] [] [] | exif | () [] [] | fetchmail | [] [] () [] [] [] | findutils | [] [] [] | flex | [] [] | freedink | [] [] [] | gas | [] | gawk | [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] [] | gip | [] [] [] [] | gjay | [] | gliv | [] [] [] | glunarclock | [] [] | gnubiff | () | gnucash | [] () () () () | gnuedu | [] [] | gnulib | [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] [] [] | gpe-edit | [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] () [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] | grub | [] [] | gsasl | [] | gss | | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] () [] | gtkam | [] [] () [] [] | gtkorphan | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] [] [] | hello | [] [] [] [] | help2man | [] | hylafax | [] [] | idutils | [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] [] [] [] () [] [] [] () | iso_3166_2 | () | iso_4217 | [] [] [] () [] [] | iso_639 | [] [] [] [] () [] [] | iso_639_3 | [] | jwhois | [] | kbd | [] [] [] [] [] | keytouch | [] [] | keytouch-editor | [] [] | keytouch-keyboa... | [] | klavaro | [] [] [] [] | latrine | [] () | ld | [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | [] [] | libgphoto2 | [] () | libgphoto2_port | [] () [] | libgsasl | | libiconv | [] [] [] [] [] | libidn | [] [] [] | lifelines | [] () | liferea | [] [] [] [] [] | lilypond | [] [] [] | linkdr | [] [] [] | lordsawar | [] | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] [] | man-db | | man-db-manpages | | minicom | [] [] [] [] | mkisofs | | myserver | | nano | [] [] [] | opcodes | [] [] | parted | [] [] | pies | | popt | [] [] [] [] [] | psmisc | [] [] [] | pspp | [] | pwdutils | [] | radius | [] | recode | [] [] [] [] [] [] | rosegarden | () () () | rpm | [] [] [] | rush | | sarg | | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | | skencil | [] () [] | solfege | [] [] [] | solfege-manual | [] [] | soundtracker | [] [] [] | sp | [] | sysstat | [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] | tin | [] [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] | vice | () () | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] | wyslij-po | | xchat | [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ crh cs da de el en en_GB en_ZA eo es et eu fa 5 64 105 117 18 1 8 0 28 89 18 19 0 fi fr ga gl gu he hi hr hu hy id is it ja ka kn +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | [] [] | ant-phone | [] [] | anubis | [] [] [] [] | aspell | [] [] [] [] | bash | [] [] [] [] | bfd | [] [] [] | bibshelf | [] [] [] [] [] | binutils | [] [] [] | bison | [] [] [] [] | bison-runtime | [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] | cflow | [] [] [] | clisp | [] | coreutils | [] [] [] [] [] | cpio | [] [] [] [] | cppi | [] [] | cpplib | [] [] [] | cryptsetup | [] [] [] | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] [] [] | dink | [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] | freedink | [] [] [] | gas | [] [] | gawk | [] [] [] [] () [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] [] [] | gjay | [] | gliv | [] () | glunarclock | [] [] [] [] | gnubiff | () [] () | gnucash | () () () () () [] | gnuedu | [] [] | gnulib | [] [] [] [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] [] | gpe-aerial | [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] [] [] | gpe-calendar | [] [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] [] | gpe-go | [] [] [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] [] | grub | [] [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] | gtkorphan | [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] | gutenprint | [] [] [] [] | hello | [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | () [] [] [] | iso_4217 | [] () [] [] [] [] | iso_639 | [] () [] [] [] [] [] [] [] | iso_639_3 | () [] [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] [] [] [] | keytouch-editor | [] [] [] [] [] | keytouch-keyboa... | [] [] [] [] [] | klavaro | [] [] | latrine | [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] () | libc | [] [] [] [] [] | libexif | [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] [] | libidn | [] [] [] [] | lifelines | () | liferea | [] [] [] [] | lilypond | [] [] | linkdr | [] [] [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] [] [] | m4 | [] [] [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] [] | man-db | [] [] | man-db-manpages | [] | minicom | [] [] [] [] [] | mkisofs | [] [] [] [] | myserver | | nano | [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] [] | pies | | popt | [] [] [] [] [] [] [] [] [] | psmisc | [] [] [] | pspp | | pwdutils | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () () () () | rpm | [] [] | rush | | sarg | [] | screem | [] [] | scrollkeeper | [] [] [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] | shishi | [] | skencil | [] | solfege | [] [] [] [] | solfege-manual | [] [] | soundtracker | [] [] | sp | [] () | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux-ng | [] [] [] [] [] [] | vice | () () () | vmm | [] | vorbis-tools | [] | wastesedge | () () | wdiff | [] | wget | [] [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] | +----------------------------------------------------+ fi fr ga gl gu he hi hr hu hy id is it ja ka kn 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne +-----------------------------------------------+ a2ps | [] | aegis | | ant-phone | | anubis | [] [] | aspell | [] | bash | | bfd | | bibshelf | [] [] | binutils | | bison | [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] | cpio | | cppi | | cpplib | | cryptsetup | | dfarc | [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] | dink | | doodle | | e2fsprogs | | enscript | | exif | [] | fetchmail | | findutils | | flex | | freedink | [] | gas | | gawk | | gcal | | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] | gettext-tools | [] | gip | [] [] | gjay | | gliv | | glunarclock | [] | gnubiff | | gnucash | () () () () | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | [] | gold | | gpe-aerial | [] | gpe-beam | [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] | gpe-timesheet | [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | | gsasl | | gss | | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | | gtick | | gtkam | [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | | hello | [] [] [] | help2man | | hylafax | | idutils | | indent | | iso_15924 | [] [] | iso_3166 | [] [] () [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] | iso_639 | [] [] | iso_639_3 | [] | jwhois | [] | kbd | | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | klavaro | [] | latrine | [] | ld | | leafpad | [] [] [] | libc | [] | libexif | | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | | libidn | | lifelines | | liferea | | lilypond | | linkdr | | lordsawar | | lprng | | lynx | | m4 | | mailfromd | | mailutils | | make | [] | man-db | | man-db-manpages | | minicom | [] | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | [] [] [] | psmisc | | pspp | | pwdutils | | radius | | recode | | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] | sed | | sharutils | | shishi | | skencil | | solfege | [] | solfege-manual | | soundtracker | | sp | | sysstat | [] | tar | [] | texinfo | [] | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] | wyslij-po | | xchat | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +-----------------------------------------------+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +---------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] | bfd | [] | bibshelf | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] () | buzztard | [] [] | cflow | [] | clisp | [] [] | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] | cryptsetup | [] | dfarc | [] | dialog | [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] [] | dink | () | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | exif | [] [] [] () [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] | gas | | gawk | [] [] [] [] | gcal | | gcc | [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | [] () | gnucash | [] () () () | gnuedu | [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gnutls | [] [] | gold | | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] [] | gphoto2 | [] [] [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | gutenprint | [] [] | hello | [] [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] [] [] [] | iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] [] | klavaro | [] [] | latrine | [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] | libgphoto2_port | [] [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] | lifelines | [] [] | liferea | [] [] [] [] [] () () [] | lilypond | [] | linkdr | [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | pies | [] | popt | [] [] [] [] | psmisc | [] [] [] | pspp | [] [] | pwdutils | [] | radius | [] [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () | rpm | [] [] [] | rush | [] [] | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] [] [] [] | solfege-manual | [] [] [] | soundtracker | [] | sp | | sysstat | [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | [] | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ a2ps | [] [] [] [] [] | 27 aegis | [] | 9 ant-phone | [] [] [] [] | 9 anubis | [] [] [] [] | 15 aspell | [] [] [] | 20 bash | [] [] [] | 12 bfd | [] | 6 bibshelf | [] [] [] | 16 binutils | [] [] | 8 bison | [] [] | 12 bison-runtime | [] [] [] [] [] [] | 29 bluez-pin | [] [] [] [] [] [] [] [] | 37 bombono-dvd | [] | 4 buzztard | [] | 7 cflow | [] [] [] | 9 clisp | | 10 coreutils | [] [] [] [] | 22 cpio | [] [] [] [] [] [] | 13 cppi | [] [] | 5 cpplib | [] [] [] [] [] [] | 14 cryptsetup | [] [] | 7 dfarc | [] | 9 dialog | [] [] [] [] [] [] [] | 30 dico | [] | 2 diffutils | [] [] [] [] [] [] | 30 dink | | 4 doodle | [] [] | 7 e2fsprogs | [] [] [] | 11 enscript | [] [] [] [] | 17 exif | [] [] [] | 16 fetchmail | [] [] [] | 17 findutils | [] [] [] [] [] | 20 flex | [] [] [] [] | 15 freedink | [] | 10 gas | [] | 4 gawk | [] [] [] [] | 18 gcal | [] [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] [] | 34 gettext-runtime | [] [] [] [] [] [] [] | 29 gettext-tools | [] [] [] [] [] [] | 22 gip | [] [] [] [] | 22 gjay | [] | 3 gliv | [] [] [] | 14 glunarclock | [] [] [] [] [] | 19 gnubiff | [] [] | 4 gnucash | () [] () [] () | 10 gnuedu | [] [] | 7 gnulib | [] [] [] [] | 16 gnunet | [] | 1 gnunet-gtk | [] [] [] | 5 gnutls | [] [] [] | 10 gold | [] | 4 gpe-aerial | [] [] [] | 18 gpe-beam | [] [] [] | 19 gpe-bluetooth | [] [] [] | 13 gpe-calendar | [] [] [] [] | 12 gpe-clock | [] [] [] [] [] | 28 gpe-conf | [] [] [] [] | 20 gpe-contacts | [] [] [] | 17 gpe-edit | [] [] [] | 12 gpe-filemanager | [] [] [] [] | 16 gpe-go | [] [] [] [] [] | 25 gpe-login | [] [] [] | 11 gpe-ownerinfo | [] [] [] [] [] | 25 gpe-package | [] [] [] | 13 gpe-sketchbook | [] [] [] | 20 gpe-su | [] [] [] [] [] | 30 gpe-taskmanager | [] [] [] [] [] | 29 gpe-timesheet | [] [] [] [] [] | 25 gpe-today | [] [] [] [] [] [] | 30 gpe-todo | [] [] [] [] | 17 gphoto2 | [] [] [] [] [] | 24 gprof | [] [] [] | 15 gpsdrive | [] [] [] | 11 gramadoir | [] [] [] | 11 grep | [] [] [] | 10 grub | [] [] [] | 14 gsasl | [] [] [] [] | 14 gss | [] [] [] | 11 gst-plugins-bad | [] [] [] [] | 26 gst-plugins-base | [] [] [] [] [] | 24 gst-plugins-good | [] [] [] [] | 24 gst-plugins-ugly | [] [] [] [] [] | 29 gstreamer | [] [] [] [] | 22 gtick | [] [] [] | 13 gtkam | [] [] [] | 20 gtkorphan | [] [] [] | 14 gtkspell | [] [] [] [] [] [] [] [] [] | 45 gutenprint | [] | 10 hello | [] [] [] [] [] [] | 21 help2man | [] [] | 7 hylafax | [] | 5 idutils | [] [] [] [] | 17 indent | [] [] [] [] [] [] | 30 iso_15924 | () [] () [] [] | 16 iso_3166 | [] [] () [] [] () [] [] [] () | 53 iso_3166_2 | () [] () [] | 9 iso_4217 | [] () [] [] () [] [] | 26 iso_639 | [] [] [] () [] () [] [] [] [] | 38 iso_639_3 | [] () | 8 jwhois | [] [] [] [] [] | 16 kbd | [] [] [] [] [] | 15 keytouch | [] [] [] | 16 keytouch-editor | [] [] [] | 14 keytouch-keyboa... | [] [] [] | 14 klavaro | [] | 11 latrine | [] [] [] | 10 ld | [] [] [] [] | 11 leafpad | [] [] [] [] [] [] | 33 libc | [] [] [] [] [] | 21 libexif | [] () | 7 libextractor | [] | 1 libgnutls | [] [] [] | 9 libgpewidget | [] [] [] | 14 libgpg-error | [] [] [] | 9 libgphoto2 | [] [] | 8 libgphoto2_port | [] [] [] [] | 14 libgsasl | [] [] [] | 13 libiconv | [] [] [] [] | 21 libidn | () [] [] | 11 lifelines | [] | 4 liferea | [] [] [] | 21 lilypond | [] | 7 linkdr | [] [] [] [] [] | 17 lordsawar | | 1 lprng | [] | 3 lynx | [] [] [] [] | 17 m4 | [] [] [] [] | 19 mailfromd | [] [] | 3 mailutils | [] | 5 make | [] [] [] [] | 21 man-db | [] [] [] | 8 man-db-manpages | | 4 minicom | [] [] | 16 mkisofs | [] [] | 9 myserver | | 0 nano | [] [] [] [] | 21 opcodes | [] [] [] | 11 parted | [] [] [] [] [] | 15 pies | [] [] | 3 popt | [] [] [] [] [] [] | 27 psmisc | [] [] | 11 pspp | | 4 pwdutils | [] [] | 6 radius | [] [] | 9 recode | [] [] [] [] | 28 rosegarden | () | 0 rpm | [] [] [] | 11 rush | [] [] | 4 sarg | | 1 screem | [] | 3 scrollkeeper | [] [] [] [] [] | 27 sed | [] [] [] [] [] | 30 sharutils | [] [] [] [] [] | 22 shishi | [] | 3 skencil | [] [] | 7 solfege | [] [] [] [] | 16 solfege-manual | [] | 8 soundtracker | [] [] [] | 9 sp | [] | 3 sysstat | [] [] | 15 tar | [] [] [] [] [] [] | 23 texinfo | [] [] [] [] [] | 17 tin | | 4 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux-ng | [] [] [] [] | 20 vice | () () | 1 vmm | [] | 4 vorbis-tools | [] | 6 wastesedge | | 2 wdiff | [] [] | 7 wget | [] [] [] [] [] | 26 wyslij-po | [] [] | 8 xchat | [] [] [] [] [] [] | 36 xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 xkeyboard-config | [] [] [] | 22 +---------------------------------------------------+ 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If June 2010 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.5 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. systemtap-2.9/AUTHORS000066400000000000000000000044571260561570600145070ustar00rootroot00000000000000Aaron Tomlin Abegail Jakop Adrien Kunysz Alexander Lochmann Alexander Y. Fomichev Alfred Landrum Ananth N Mavinakayanahalli Andre Detsch Andreas Müller Andy Fitzsimon Anil Keshavamurthy Anithra Janakiraman Anton Vorontsov Athira Atsushi Tsuji Brendan Gregg Breno Leitao Brent Baude Brian Chrisman Bryn M. Reeves Casey Dahlin Charles Spirakis Charley Wang Chris Meek Chung-Lin Tang Dan Horak Daniel Migault Daniel Tschan Dave Brolley Dave Nomura David J. Wilder David Juran David Smith Dennis Gilmore Diego Elio Pettenò Don Domingo Elliott Baron Erick Tryzelaar Eugene Teo Eugeniy Meshcheryakov Fabio Olive Leite Fahad Arshad Felix Lin Felix Lu Frank Ch. Eigler Frederic Turgis Fredrik Östman Grant Edwards Graydon Hoare Han Pingtian Hemant Kumar Hien Nguyen Hilko Bengen Honggyu Kim Hushan Jia Ivan Diorditsa James Bottomley Jan Kratochvil Jeff Moyer Jim Keniston Jiri Horky Jiri Slaby JoeLynn Keniston Jonathan Lebon Jose Castillo Josh Stone Jóhann B. Guðmundsson K.Prasad Kai Meyer Kapileshwar Singh (KP) Keiichi KII Kent Sebastian Kevin Stafford Kim van der Riet Kiran Prakesh Lars R. Damerow Li Guanglei Lubomir Rintel Lukas Berk Lukas Czerner Lukáš Hejtmánek Mahesh J Salgaonkar Malte Nuhn Maran Pakkirisamy Marc Milgram Mark McLoughlin Mark Wielaard Martin Cermak Martin Hunt Martin Lazar Masami Hiramatsu Masanari Iida Masatake YAMATO Maynard Johnson Michael Meeks Mike Mason Mikhail Kulemin Miroslav Franc Naresh Kamboju Nathan Scott Negreanu Marius Adrian Nicolas Brito Nitin A Kamble Nobuhiro Tachino Oleksandr Chumachenko Otavio Pontes Paddie O'Brien Peter Feiner Peter Kjellström Peter Robinson Petr Muller Phil Muldoon Prerna Saxena Przemysław Pawełczyk Qiao Nuohan Quentin Barnes Rajan Arora Rajasekhar Duddu Raphaël Beamonte Rayson Ho Rich Megginson Robb Romans Robin Hack Robin Lee Roland Grunberg Roland McGrath Rüdiger Sonderfeld Santosh Shukla Serguei Makarov Shaohua Li Siddhesh Poyarekar Snehal Phule Srikar Dronamraju Srinivasa DS Stan Cox Stefan Hajnoczi Steve Dickson Sunzen Wang Tetsuo Handa Thang Nguyen Theodore Ts'o Tim Moore Timo Juhani Lindfors Tom Callaway Tom Tromey Tom Zanussi Tomoki Sekiyama Tony Jones Torsten Polle Varun Chandramohan Victor Kamensky Vincent Bernat Wade Farnsworth Wenji Huang William Cohen Yaakov Selkowitz Yang Wen Yichun Zhang (agentzh) Yoshihide Sonoda Zhaolei Zifei Tong ch huang systemtap-2.9/AUTHORS.sh000077500000000000000000000004651260561570600151160ustar00rootroot00000000000000#! /bin/sh # Create the AUTHORS file, by searching the git history. # Run as "AUTHORS.sh" to get complete history # Run with "AUTHORS.sh commitish..commitish" for history between tags # shortlog will canonicalize the names using the file .mailmap git shortlog -s ${1-} | cut -b8- # strip the commit counts systemtap-2.9/COPYING000066400000000000000000000432541260561570600144700ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. systemtap-2.9/EXAMPLES000077700000000000000000000000001260561570600224032testsuite/systemtap.examplesustar00rootroot00000000000000systemtap-2.9/HACKING000066400000000000000000000177331260561570600144270ustar00rootroot00000000000000This text describes contribution procedures to systemtap. Please read and understand them before jumping in. Discussions take place on the mailing list. - general Submissions should be in an easy-to-read diff/patch form, unless this is inappropriate due to size, relevance, or fraction of novel content. They should be accompanied by an explanation. The relevant test suites should be run before and after your changes, and regressions avoided, explained, or corrected. Established contributors may be considered for direct GIT write access. Other contributors should simply pack up the goods into a plain text email message to the mailing list. - obvious changes Trivial, obvious patches may be posted or committed without other formalities. - copyright You must designate the appropriate copyright holder for your contribution. If not already there, this name should be added by your patch to the copyright header in the affected files. The copyright holder is assumed to agree with the general licensing terms (GPLv2+). - coding style Abide by the general formatting of the code you are modifying. The code base generally follows the GNU standards in usermode code and the Linux kernel standards in runtime code. - commit messages In the git commit message, make the first line a brief (<=50 char) summary of the patch, and leave the second line blank. If you have trouble coming up with a concise summary, consider whether your patch might be better broken into smaller commits. For trivial changes, the summary alone may be sufficient, but most commits should include a paragraph or two giving more details about what the change is and why it is needed. Extra information like bugzilla numbers and mailing-list discussion links are appreciated as a supplement, but they are not a replacement for a real description. - test suites As far as practicable, changes should be accompanied by test cases to prevent future regressions. Tests should be run on at least x86, and ideally also on some 64-bit platform. The test suite is located under /src/testsuite and is based on dejagnu. "make check" runs unprivileged tests only against an uninstalled build tree. "make installcheck" runs all tests against an installed tree. Tests that don't require probe execution should go into new or modified files under the *{ok,ko} directories, which are scanned by corresponding systemtap.pass1-4/*.exp files. The "ko" tests are for expected (deliberate) errors. Tests that execute probes (pass 5) should include their own .exp/.stp files under any other appropriate systemtap.* testsuite subdirectory. To run a particular test or set of tests, do: cd testsuite make check RUNTESTFLAGS=testname.exp or make installcheck RUNTESTFLAGS=testname.exp To disambiguate among multiple tests with the same name, specify the directory as well -- for example: make installcheck RUNTESTFLAGS=systemtap.base/print.exp - translator Translator changes can easily invalidate tapsets and user script code. One must tread carefully and run regression tests rigorously. Both positive and negative polarity (expect-pass / expect-fail) test cases may need to be written to assert a bug fix. Script language changes should be documented in the stap.1 man page and emphasized in the NEWS file. - tapsets Tapset script files should demonstrate effective economy, and avoid conflicts with user and other tapset code. It may be necessary to prefix symbols with the tapset name to ensure systemtap-wide uniqueness. All "external interfaces" expected to be used by user scripts (or perhaps other tapsets) should be documented -- either in stapprobes.3stap if they are built into the language or otherwise somehow essential; or in kernel-doc style comments if they are defined in a tapset (see almost any existing tapset for an example of how this is done); any new tapset should be mentioned in doc/SystemTap_Tapset_Reference/tapsets.tmpl. Major or incompatible changes should be mentioned in the NEWS file; see also the deprecation section below. Internal function, variable, probe identifiers should be prefixed with "_" for extra uniqueness, and not documented in the man pages. Tapsets should come with a tests cases that provide good test coverage. Every alias definition should be tested for pass-2 correctness. Every embedded-C routine should be tested for pass-4 buildability. As they are a security hazard, every tapset embedded-C routine should be pass-5 stress-tested for response to erroneous inputs. This applies doubly to /* unprivileged */ ones. The platforms/architectures against which the tapset was tested should be published, and ideally asserted by code. Embedded-C code should avoid making references to the runtime or other code possibly generated by the translator. Embedded-C code that dereferences pointers should use deref() type functions to check each individual operation if there exists a possibility that the function may be called with invalid pointers or pointer chains. - deprecation Try to remain compatible with existing valid scripts, with respect to changes in the script language or the tapset. Where this is not practicable, preserve the old functionality using the %( systemtap_v %) preprocessor conditional in the tapset and systemtap_session.compatible in the translator. If needed, after several major releases, deprecated functionality may be dropped outright. Note both pending and final deprecation in NEWS and the permanent DEPRECATION section in stap.1. The intent is to protect old scripts for a year or longer. Tapset functions to be deprecated should be kept for at least one major release. For example, if we're in development between versions 1.2 and 1.3, wrap to-be-deprecated tapset functions or probes in %( systemtap_v <= "1.3" %? function foo() {} %) so as to preserve the tapset function during the life of the 1.3 release. Script language changes that cause earlier valid scripts to become invalid should be opt-in (requiring --compatible=NEWVERSION) for at least one major release before becoming default. For example, test strverscmp(s.compatible.c_str(), "1.4") >= 0 in the 1.3 release sources in order to activate the change. - runtime Changes to the runtime can cause problems on different architectures or kernel versions. Luckily, many code mistakes show up easily in the pass-4 tests. - i18n We use the zanata [1] system for managing translations of runtime strings. If interested, create yourself a zanata account, and help translate online! In addition, you can ship systemtap sources to/from zanata by installing the zanata-cli and getting a $HOME/.config/zanata.ini file, thereafter following the advice [2][3] of "make update-po" (invoked from the top of the build tree). [1] https://translate.zanata.org/zanata/iteration/view/systemtap/master [2] http://zanata.org/help/cli/cli-push [3] http://zanata.org/help/cli/cli-pull - meta Proposed changes to these guidelines should be discussed on the mailing list. - git basics git clone ssh://sourceware.org/git/systemtap.git # OR: use git://sourceware.org/git/systemtap.git then add to .git/config: # [remote "origin"] # pushurl=ssh://sourceware.org/git/systemtap.git # build ; hack hack hack; test git add FILE1 FILE2 # enumerate all modified or new files git status # to confirm that needed local changes are "staged" git commit # to your local repository, add nice commit message git show # to check that the last commit included all changes git pull # to make sure your copy is up to date & merged # last minute rebuild; retest git rebase origin/master # clean git commit of merge history git diff origin/master # final visual check git push # to the central one, if you have access OR git format-patch -s origin/master.. then email the resulting files to the mailing list systemtap-2.9/INSTALL000066400000000000000000000224501260561570600144610ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. Often, you can also type `make uninstall' to remove the installed files again. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. systemtap-2.9/INTERNALS000066400000000000000000000135271260561570600147170ustar00rootroot00000000000000The Systemtap Translator - a tour on the inside Outline: - general principles - main data structures - pass 1: parsing - pass 2: semantic analysis (parts 1, 2, 3) - pass 3: translation (parts 1, 2) - pass 4: compilation - pass 5: run ------------------------------------------------------------------------ Translator general principles - written in standard C++ - mildly O-O, sparing use of C++ features - uses "visitor" concept for type-dependent (virtual) traversal ------------------------------------------------------------------------ Main data structures - abstract syntax tree - family of types and subtypes for language parts: expressions, literals, statements - includes outermost constructs: probes, aliases, functions - an instance of "stapfile" represents an entire script file - each annotated with a token (script source coordinates) - data persists throughout run - session - contains run-time parameters from command line - contains all globals - passed by reference to many functions ------------------------------------------------------------------------ Pass 1 - parsing - hand-written recursive-descent - language specified in man page - reads user-specified script file - also searches path for all <*.stp> files, parses them too - => syntax errors are caught immediately, throughout tapset - now includes baby preprocessor probe kernel. %( kernel_v == "2.6.9" %? inline("foo") %: function("bar") %) { } - enforces guru mode for embedded code %{ C %} ------------------------------------------------------------------------ Pass 2 - semantic analysis - step 1: resolve symbols - code in - want to know all global and per-probe/function local variables - one "vardecl" instance interned per variable - fills in "referent" field in AST for nodes that refer to it - collect "needed" probe/global/function list in session variable - loop over file queue, starting with user script "stapfile" - add to "needed" list this file's globals, functions, probes - resolve any symbols used in this file (function calls, variables) against "needed" list - if not resolved, search through all tapset "stapfile" instances; add to file queue if matched - if still not resolved, create as local scalar, or signal an error ------------------------------------------------------------------------ Pass 2 - semantic analysis - step 2: resolve types - fills in "type" field in AST - iterate along all probes and functions, until convergence - infer types of variables from usage context / operators: a = 5 # a is a pe_long b["foo",a]++ # b is a pe_long array with indexes pe_string and pe_long - loop until no further variable types can be inferred - signal error if any still unresolved ------------------------------------------------------------------------ Pass 2 - semantic analysis - step 3: resolve probes - probe points turned to "derived_probe" instances by code in - derived_probes know how to talk to kernel API for registration/callbacks - aliases get expanded at this point - some probe points ("begin", "end", "timer*") are very simple - dwarf ("kernel*", "module*") implementation very complicated - target-variables "$foo" expanded to getter/setter functions with synthesized embedded-C ------------------------------------------------------------------------ Pass 3 - translation - step 1: data - - we now know all types, all variables - strings are everywhere copied by value (MAXSTRINGLEN bytes) - emit data storage mega-struct "context" for all probes/functions - array instantiated per-CPU, per-nesting-level - can be pretty big static data ------------------------------------------------------------------------ Pass 3 - translation - step 2: code - map script functions to C functions taking a context pointer - map probes to two C functions: - one to interface with the probe point infrastructure (kprobes, kernel timer): reserves per-cpu context - one to implement probe body, just like a script function - emit global startup/shutdown routine to manage orderly registration/deregistration of probes - expressions/statements emitted in "natural" evaluation sequence - emit code to enforce activity-count limits, simple safety tests - global variables protected by locks global k function foo () { k ++ } # write lock around increment probe bar { if (k>5) ... } # read lock around read - same thing for arrays, except foreach/sort take longer-duration locks ------------------------------------------------------------------------ Pass 4 - compilation - - write out C code in a temporary directory - call into kbuild makefile to build module ------------------------------------------------------------------------ Pass 5 - running - run "staprun" - clean up temporary directory - nothing to it! ------------------------------------------------------------------------ Peculiarities - We tend to use visitor idioms for polymorphic traversals of parse trees, in preference to dynamic_cast<> et al. The former is a little more future-proof and harder to break accidentally. {reinterpret,static}_cast<> should definitely be avoided. - We use our interned_string type (a derivative of boost::string_ref) to use shareable references to strings that may be used in duplicate many times. It can slide in for std::string most of the time. It can save RAM and maybe even CPU, if used judiciously: such as for frequently duplicated strings, duplicated strings, duplicated strings, duplicated. OTOH, it costs CPU (for management of the interned string set, or if copied between std::string and interned_string unnecessarily), and RAM (2 pointers when empty, vs. 1 for std::string), and its instances are not modifiable, so tradeoffs must be confirmed with tools like memusage, massif, perf-stat, etc. systemtap-2.9/Makefile.am000066400000000000000000000353131260561570600154660ustar00rootroot00000000000000# Makefile.am --- automake input file for systemtap ## process this file with automake to produce Makefile.in # we don't maintain a ChangeLog, which makes us non-GNU -> foreign AUTOMAKE_OPTIONS = no-dist foreign pkglibexecdir = ${libexecdir}/${PACKAGE} oldincludedir = ${includedir}/sys AM_CPPFLAGS = -DBINDIR='"$(bindir)"' \ -DSYSCONFDIR='"$(sysconfdir)"' \ -DPKGDATADIR='"$(pkgdatadir)"' \ -DPKGLIBDIR='"$(pkglibexecdir)"' \ -DLOCALEDIR='"$(localedir)"' \ -I$(srcdir)/includes -I$(builddir)/includes/sys AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W AM_CXXFLAGS = -Wall -Werror bin_SCRIPTS = stap-report pkglibexec_SCRIPTS = stap-env oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h bin_PROGRAMS = if BUILD_TRANSLATOR bin_PROGRAMS += stap bin_SCRIPTS += dtrace pkglibexec_PROGRAMS = if HAVE_NSS pkglibexec_PROGRAMS += stap-sign-module stap-authorize-cert if BUILD_SERVER pkglibexec_PROGRAMS += stap-serverd stap-gen-cert bin_SCRIPTS += stap-server pkglibexec_SCRIPTS += stap-start-server stap-stop-server endif endif stap_SOURCES = main.cxx session.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \ cache.cxx util.cxx coveragedb.cxx dwarf_wrappers.cxx \ tapset-been.cxx tapset-procfs.cxx tapset-timers.cxx tapset-netfilter.cxx \ tapset-perfmon.cxx tapset-mark.cxx tapset-itrace.cxx \ tapset-utrace.cxx task_finder.cxx dwflpp.cxx rpm_finder.cxx \ setupdwfl.cxx remote.cxx privilege.cxx cmdline.cxx \ tapset-dynprobe.cxx tapset-method.cxx translator-output.cxx \ stapregex.cxx stapregex-tree.cxx stapregex-parse.cxx \ stapregex-dfa.cxx stringtable.cxx noinst_HEADERS = sdt_types.h stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ @LIBINTL@ -lpthread stap_DEPENDENCIES = if BUILD_VIRT bin_PROGRAMS += stapvirt stapvirt_SOURCES = stapvirt.c stapvirt_CFLAGS = $(AM_CFLAGS) stapvirt_CFLAGS += $(libvirt_CFLAGS) $(libxml2_CFLAGS) stapvirt_LDFLAGS = $(AM_LDFLAGS) stapvirt_LDADD = $(libvirt_LIBS) $(libxml2_LIBS) endif endif install: all $(MAKE) $(AM_MAKEFLAGS) install-recursive BUILT_SOURCES = CLEANFILES = # Arrange for git_version.h to be regenerated at every "make". # Code fragment is based upon RadeonHD.am. # The stamp file which is never created ensures that git_version.h is updated # before every build. Having git_version.h in foo_SOURCES ensures a recompile # of foo-bar.c if it is newer than the foo-bar.o file. Using noinst_foo_SOURCES # instead of foo_SOURCES prevents shipping git_version.h in dist tarballs, # which may cause false GIT_FOO readings. BUILT_SOURCES += git_version.stamp CLEANFILES += git_version.h GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh git_version.stamp: @if test -f "$(srcdir)/git_version.h"; then \ if test -f "git_version.h"; then :; \ else \ cp "$(srcdir)/git_version.h" "git_version.h"; \ fi; \ fi $(GIT_VERSION_CMD) -k -s $(top_srcdir) -o git_version.h @if test -s "$(srcdir)/git_version.h"; then \ if cmp "$(srcdir)/git_version.h" "git_version.h"; then :; \ else \ echo "Error: $(srcdir)/git_version.h and git_version.h differ."; \ echo " You probably want to remove the former."; \ exit 1; \ fi; \ fi git_version.h: $(srcdir)/git_version.sh -k --srcdir $(srcdir) -o git_version.h cscope: cd $(srcdir) && \ (echo -q ; git ls-files '*.cxx' '*.c' '*.h' | grep -v '^testsuite' ) > cscope.files && \ cscope -b -q @DYNINST_CXXFLAGS@ PHONIES = if BUILD_TRANSLATOR stap_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ @cxx11@ stap_CPPFLAGS = $(AM_CPPFLAGS) -DSTAP_SDT_V2 stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ if HAVE_AVAHI stap_CXXFLAGS += $(avahi_CFLAGS) stap_CPPFLAGS += $(avahi_CFLAGS) stap_LDADD += $(avahi_LIBS) endif if HAVE_NSS stap_SOURCES += nsscommon.cxx csclient.cxx cscommon.cxx stap_CFLAGS += $(nss_CFLAGS) -DSTAP stap_CXXFLAGS += $(nss_CFLAGS) stap_CPPFLAGS += $(nss_CFLAGS) stap_LDADD += $(nss_LIBS) install-exec-local: install-scripts PHONIES += install-scripts # scripts must be installed before this rule is run install-scripts: install-binSCRIPTS install-pkglibexecSCRIPTS for f in $(bin_SCRIPTS); do \ sed -i -e "s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(bindir)/$$f; \ done for f in $(pkglibexec_SCRIPTS); do \ sed -i -e "/INSTALL-HOOK/d;s,sysconfdir=.*,sysconfdir=$(sysconfdir),;s,pkglibexecdir=.*,pkglibexecdir=$(pkglibexecdir)/,;s,localstatedir=.*,localstatedir=$(localstatedir),;s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(pkglibexecdir)/$$f; \ done endif if BUILD_ELFUTILS stap_CPPFLAGS += -Iinclude-elfutils stap_LDFLAGS += -Llib-elfutils -Wl,-rpath-link,lib-elfutils \ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) BUILT_SOURCES += stamp-elfutils CLEANFILES += stamp-elfutils stamp-elfutils: config.status $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils all bin_PROGRAMS= for dir in libelf libebl libdw libdwfl backends; do \ $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils/$$dir bin_PROGRAMS= install; \ done $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils install-pkgincludeHEADERS; touch $@ stap_DEPENDENCIES += lib-elfutils/libdw.so lib-elfutils/libdw.so: stamp-elfutils ; PHONIES += install-elfutils install-elfutils: mkdir -p $(DESTDIR)$(pkglibdir) for file in lib-elfutils/*.so* lib-elfutils/${PACKAGE_NAME}/*.so*; do \ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(pkglibdir); \ done install-exec-local: install-elfutils endif endif CLEANFILES += $(pkglibexec_PROGRAMS) if BUILD_TRANSLATOR if HAVE_NSS stap_sign_module_SOURCES = stap-sign-module.cxx nsscommon.cxx util.cxx stap_sign_module_CPPFLAGS = $(AM_CPPFLAGS) stap_sign_module_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) stap_sign_module_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) stap_sign_module_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ stap_sign_module_LDADD = $(nss_LIBS) stap_authorize_cert_SOURCES = stap-authorize-cert.cxx nsscommon.cxx util.cxx stap_authorize_cert_CPPFLAGS = $(AM_CPPFLAGS) stap_authorize_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) stap_authorize_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) stap_authorize_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ stap_authorize_cert_LDADD = $(nss_LIBS) if BUILD_SERVER stap_serverd_SOURCES = stap-serverd.cxx cscommon.cxx util.cxx privilege.cxx nsscommon.cxx cmdline.cxx stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) stap_serverd_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) stap_serverd_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ stap_serverd_LDADD = $(nss_LIBS) -lpthread if HAVE_AVAHI stap_serverd_CFLAGS += $(avahi_CFLAGS) stap_serverd_CXXFLAGS += $(avahi_CFLAGS) stap_serverd_LDADD += $(avahi_LIBS) endif stap_gen_cert_SOURCES = stap-gen-cert.cxx util.cxx nsscommon.cxx stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) stap_gen_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) stap_gen_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ stap_gen_cert_LDADD = $(nss_LIBS) endif endif noinst_PROGRAMS = loc2c-test loc2c_test_SOURCES = loc2c-test.c loc2c.c loc2c_test_CFLAGS = $(stap_CFLAGS) loc2c_test_CPPFLAGS = $(stap_CPPFLAGS) loc2c_test_LDFLAGS = $(stap_LDFLAGS) loc2c_test_LDADD = $(stap_LDADD) endif # crash(8) extension if BUILD_CRASHMOD STAPLOG=staplog.so $(STAPLOG): staplog.c $(CC) $(staplog_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -shared -rdynamic \ $(AM_LDFLAGS) $(LDFLAGS) -fPIC -o $@ $< all-local: $(STAPLOG) example_index install-exec-local: $(STAPLOG) $(MKDIR_P) $(DESTDIR)$(pkglibdir) $(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir) else all-local: example_index endif # Get extra libs as needed LDADD = EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples EXAMPLE_META_FILES = $(EXAMPLE_SOURCE_DIR)/*/*.meta example_index: $(EXAMPLE_SOURCE_DIR)/index.html $(EXAMPLE_SOURCE_DIR)/index.html: $(EXAMPLE_META_FILES) $(EXAMPLE_INDEX_GEN) @echo "The script example index is outdated, run" @echo " cd $(EXAMPLE_SOURCE_DIR) && \\ " @echo " perl examples-index-gen.pl" @echo "to regenerate it." install-data-local: (cd $(srcdir)/runtime; for f in *.[ch]; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/$$f; done) if HAVE_DYNINST (cd $(srcdir)/runtime/dyninst; find . \( -name '*.[ch]' \) -print \ | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/dyninst/$$f; done) endif (cd $(srcdir)/runtime/unwind; find . \( -name '*.[ch]' \) -print \ | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/unwind/$$f; done) (cd $(srcdir)/runtime/transport; for f in *.[ch]; \ do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/transport/$$f; done) (cd $(srcdir)/runtime/linux; for f in *.[ch]; \ do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/$$f; done) (cd $(srcdir)/runtime/linux/uprobes; for f in Makefile *.[ch]; \ do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/uprobes/$$f; done) (cd $(srcdir)/runtime/linux/uprobes2; for f in *.[ch]; \ do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/uprobes2/$$f; done) (cd $(srcdir)/tapset; find . \( -name '*.stp' -o -name '*.stpm' -o -name README \) -print \ | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/tapset/$$f; done) (cd $(srcdir)/testsuite/systemtap.examples; find . -type f -print \ | egrep -v 'check.exp|ChangeLog|examples-index-gen.pl|html/.*\.tmpl$$' \ | while read f; do if test -x $$f; then \ i_cmd="$(INSTALL_PROGRAM)"; else \ i_cmd="$(INSTALL_DATA)"; fi; \ $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done) test -e $(DESTDIR)$(sysconfdir)/systemtap || mkdir -p $(DESTDIR)$(sysconfdir)/systemtap if BUILD_SERVER test -e $(DESTDIR)$(localstatedir)/run/stap-server || mkdir -p $(DESTDIR)$(localstatedir)/run/stap-server test -e $(DESTDIR)$(localstatedir)/log || mkdir -p $(DESTDIR)$(localstatedir)/log endif TEST_COV_DIR = coverage gcov: find . -name '*.gc*' | xargs rm -f $(MAKE) clean CXXFLAGS="-g -fprofile-arcs -ftest-coverage" CFLAGS="-g -fprofile-arcs -ftest-coverage" all install -sudo $(MAKE) installcheck $${RUNTESTFLAGS+RUNTESTFLAGS=$${RUNTESTFLAGS}} for dir in $(SUBDIRS); do \ (cd $$dir; gcov *.gcno > SUMMARY.gcov 2>&1 || true); \ done find . -name '*.gcov' clean-local: rm -rf ${PACKAGE_TARNAME}-*.tar.gz rm -rf ${PACKAGE_TARNAME}-${PACKAGE_VERSION} rm -rf $(TEST_COV_DIR) rm -rf stap.info rm -rf staplog.so distclean-local: rm -rf build-elfutils include-elfutils lib-elfutils rm -f doc/beginners/en-US doc/beginners/build/en-US/testsuite uninstall-local: rm -rf $(DESTDIR)$(pkgdatadir) rm -rf $(DESTDIR)$(libdir)/$(PACKAGE) -rm -rf $(DESTDIR)$(localstatedir)/cache/$(PACKAGE) @list='$(EXAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \ echo " rm -f '$(EXAMPLE_INSTALL_DIR)/$$p'"; \ rm -f "$(EXAMPLE_INSTALL_DIR)/$$p"; \ done @list='$(DEMO_SRC)'; for f in $$list; do p=`basename $$f`; \ echo " rm -f '$(DEMO_INSTALL_DIR)/$$p'"; \ rm -f "$(DEMO_INSTALL_DIR)/$$p"; \ done @list='$(SAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \ echo " rm -f '$(SAMPLE_INSTALL_DIR)/$$p'"; \ rm -f "$(SAMPLE_INSTALL_DIR)/$$p"; \ done rm -rf $(DESTDIR)$(sysconfdir)/systemtap rm -rf $(DESTDIR)$(docdir)/examples if BUILD_SERVER rm -rf $(DESTDIR)$(localstatedir)/run/stap-server rm -f $(DESTDIR)$(localstatedir)/log/stap-server/log endif SUBDIRS = . java stapdyn staprun doc man po # NB: the gcov target above uses this to enumarate linked binaries' build directories DIST_SUBDIRS = testsuite $(SUBDIRS) EXTRA_DIST = m4/ChangeLog check-local: SRCDIR=`cd $(srcdir); pwd`; \ PWD=`pwd`; \ $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$$LD_LIBRARY_PATH$${LD_LIBRARY_PATH:+:}$$PWD/lib-elfutils:$$PWD/lib-elfutils/systemtap SYSTEMTAP_PATH=$$PWD SYSTEMTAP_INCLUDES=$$PWD/includes RUNTESTFLAGS="$(RUNTESTFLAGS)" PKGLIBDIR="$(pkglibexecdir)"; installcheck: if test \! -e $(DESTDIR)$(bindir)/stap; then \ echo $(DESTDIR)$(bindir)/stap doesn\'t exist, run make install; \ exit -1; \ fi; \ if test $(builddir)/stap -nt $(DESTDIR)$(bindir)/stap; then \ echo "$(DESTDIR)$(bindir)/stap is not recent, run make install"; \ exit -1; \ fi; $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)" PHONIES += runcheck # All the variables are overridden by run-stap, but SYSTEMTAP_RUNTIME # is used by the testsuite scripts themselves. runcheck: testsuite/stap testsuite/dtrace $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)" \ SYSTEMTAP_PATH="`cd testsuite; pwd`" \ SYSTEMTAP_RUNTIME="`cd $(srcdir)/runtime; pwd`" testsuite/stap: run-stap (echo '#!/bin/sh'; echo "exec `pwd`/run-stap" '$${1+"$$@"}') > $@.new chmod 555 $@.new mv -f $@.new $@ testsuite/dtrace: dtrace (echo '#!/bin/sh'; echo "exec `pwd`/dtrace" '$${1+"$$@"}') > $@.new chmod 555 $@.new mv -f $@.new $@ PHONIES += update-po update-po: (cd $(srcdir); ls -1d *.c *.cxx *.h staprun/*.c staprun/*.h) \ | grep -v loc2c-test.c \ | grep -v config.h \ | grep -v git_version.h \ | grep -v staprun/config.h \ | sort > $(srcdir)/po/POTFILES.in $(MAKE) -C po update-po @echo @echo if systemtam.pot is shown as modified ... @echo (cd $(srcdir)/po; git status *.pot) @echo @echo ... then check in with zanata ... @echo @echo % cd $(srcdir) @echo % zanata-cli -B push -s po -t po @echo % zanata-cli -B pull -s po -t po @echo @echo if the .po files are shown as modified ... @echo (cd $(srcdir)/po; git status *.po) @echo @echo ... regenerate just once ... @echo @echo % $(MAKE) -C `pwd` update-po # Any extra flags, such as: # --define "with_docs 0" # --define "with_bundled_elfutils 1" --define "elfutils_version 0.135" RPMBUILDFLAGS= PHONIES += dist-gzip rpm srpm PHONIES += uprobes install-uprobes uprobes: $(MAKE) -C $(srcdir)/runtime/uprobes clean default install-uprobes: $(MAKE) -C $(DESTDIR)$(pkgdatadir)/runtime/uprobes clean default .PHONY: $(PHONIES) dist-gzip: cd $(srcdir); git status | grep working.directory.clean || (echo "You should commit your changes before 'make rpm'.") (cd $(srcdir); git archive --prefix=systemtap-$(VERSION)/ --format=tar HEAD) | gzip > systemtap-$(VERSION).tar.gz rpm: dist-gzip if [ `id -u` = 0 ]; then echo NOTE: do not run this as root; exit 1; fi if [ ! -w `rpm --eval %_topdir` ]; then \ echo WARNING: you do not have access to `rpm --eval %_topdir`; \ echo WARNING: you may receive a permission denied error; \ echo WARNING: consider adding \'%_topdir $(HOME)/rpmbuild\' to $(HOME)/.rpmmacros; \ fi mkdir -p `rpm --eval %_specdir` mkdir -p `rpm --eval %_srcrpmdir` mkdir -p `rpm --eval %_rpmdir` mkdir -p `rpm --eval %_builddir` mkdir -p `rpm --eval %_buildroot` rpmbuild --define "_sourcedir $(PWD)/" -ta systemtap-$(VERSION).tar.gz $(RPMBUILDFLAGS) srpm: dist-gzip mkdir -p `rpm --eval %_srcrpmdir` rpmbuild --define "_sourcedir $(PWD)/" -ts systemtap-$(VERSION).tar.gz $(RPMBUILDFLAGS) ACLOCAL_AMFLAGS = -I m4 systemtap-2.9/Makefile.in000066400000000000000000005370371260561570600155110ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am --- automake input file for systemtap VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) @BUILD_TRANSLATOR_TRUE@am__append_1 = stap @BUILD_TRANSLATOR_TRUE@am__append_2 = dtrace @BUILD_TRANSLATOR_TRUE@pkglibexec_PROGRAMS = $(am__EXEEXT_3) \ @BUILD_TRANSLATOR_TRUE@ $(am__EXEEXT_4) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_3 = stap-sign-module stap-authorize-cert @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_4 = stap-serverd stap-gen-cert @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_5 = stap-server @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_6 = stap-start-server stap-stop-server @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@am__append_7 = stapvirt @BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_8 = $(avahi_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_9 = $(avahi_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_10 = $(avahi_LIBS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_11 = nsscommon.cxx csclient.cxx cscommon.cxx @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_12 = $(nss_CFLAGS) -DSTAP @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_13 = $(nss_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_14 = $(nss_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_15 = $(nss_LIBS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_16 = install-scripts @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_17 = -Iinclude-elfutils @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_18 = -Llib-elfutils -Wl,-rpath-link,lib-elfutils \ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_19 = stamp-elfutils @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_20 = stamp-elfutils @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_21 = lib-elfutils/libdw.so @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_22 = install-elfutils @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_23 = $(avahi_CFLAGS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_24 = $(avahi_CFLAGS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_25 = $(avahi_LIBS) @BUILD_TRANSLATOR_TRUE@noinst_PROGRAMS = loc2c-test$(EXEEXT) subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.in $(top_srcdir)/includes/sys/sdt-config.h.in \ $(top_srcdir)/initscript/config.systemtap.in \ $(top_srcdir)/initscript/config.stap-server.in \ $(top_srcdir)/initscript/systemtap.in \ $(top_srcdir)/initscript/stap-server.in \ $(top_srcdir)/initscript/99stap/module-setup.sh.in \ $(srcdir)/run-stap.in $(srcdir)/dtrace.in \ $(top_srcdir)/staprun/guest/stapshd.in \ $(top_srcdir)/staprun/guest/stapsh-daemon.in \ $(top_srcdir)/staprun/guest/stapsh@.service.in depcomp \ $(am__noinst_HEADERS_DIST) $(oldinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = includes/sys/sdt-config.h \ initscript/config.systemtap initscript/config.stap-server \ initscript/systemtap initscript/stap-server \ initscript/99stap/module-setup.sh run-stap dtrace \ staprun/guest/stapshd staprun/guest/stapsh-daemon \ staprun/guest/stapsh@.service CONFIG_CLEAN_VPATH_FILES = @BUILD_TRANSLATOR_TRUE@am__EXEEXT_1 = stap$(EXEEXT) @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@am__EXEEXT_2 = \ @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ stapvirt$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(oldincludedir)" @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__EXEEXT_3 = stap-sign-module$(EXEEXT) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-authorize-cert$(EXEEXT) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__EXEEXT_4 = stap-serverd$(EXEEXT) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-gen-cert$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglibexec_PROGRAMS) @BUILD_TRANSLATOR_TRUE@am_loc2c_test_OBJECTS = \ @BUILD_TRANSLATOR_TRUE@ loc2c_test-loc2c-test.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ loc2c_test-loc2c.$(OBJEXT) loc2c_test_OBJECTS = $(am_loc2c_test_OBJECTS) am__DEPENDENCIES_1 = @BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__DEPENDENCIES_2 = \ @BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@ $(am__DEPENDENCIES_1) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__DEPENDENCIES_3 = \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__DEPENDENCIES_1) @BUILD_TRANSLATOR_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_2) \ @BUILD_TRANSLATOR_TRUE@ $(am__DEPENDENCIES_3) @BUILD_TRANSLATOR_TRUE@loc2c_test_DEPENDENCIES = \ @BUILD_TRANSLATOR_TRUE@ $(am__DEPENDENCIES_4) loc2c_test_LINK = $(CCLD) $(loc2c_test_CFLAGS) $(CFLAGS) \ $(loc2c_test_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__objects_1 = stap-nsscommon.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-csclient.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-cscommon.$(OBJEXT) @BUILD_TRANSLATOR_TRUE@am_stap_OBJECTS = stap-main.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-session.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-parse.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-staptree.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-elaborate.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-translate.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapsets.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-buildrun.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-loc2c.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-hash.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-mdfour.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-cache.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-util.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-coveragedb.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-dwarf_wrappers.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-been.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-procfs.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-timers.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-netfilter.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-perfmon.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-mark.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-itrace.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-utrace.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-task_finder.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-dwflpp.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-rpm_finder.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-setupdwfl.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-remote.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-privilege.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-cmdline.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-dynprobe.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-tapset-method.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-translator-output.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-stapregex.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-stapregex-tree.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-stapregex-parse.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-stapregex-dfa.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-stringtable.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ $(am__objects_1) stap_OBJECTS = $(am_stap_OBJECTS) stap_LINK = $(CXXLD) $(stap_CXXFLAGS) $(CXXFLAGS) $(stap_LDFLAGS) \ $(LDFLAGS) -o $@ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_authorize_cert_OBJECTS = stap_authorize_cert-stap-authorize-cert.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_authorize_cert-nsscommon.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_authorize_cert-util.$(OBJEXT) stap_authorize_cert_OBJECTS = $(am_stap_authorize_cert_OBJECTS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_DEPENDENCIES = \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__DEPENDENCIES_1) stap_authorize_cert_LINK = $(CXXLD) $(stap_authorize_cert_CXXFLAGS) \ $(CXXFLAGS) $(stap_authorize_cert_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_gen_cert_OBJECTS = stap_gen_cert-stap-gen-cert.$(OBJEXT) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_gen_cert-util.$(OBJEXT) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_gen_cert-nsscommon.$(OBJEXT) stap_gen_cert_OBJECTS = $(am_stap_gen_cert_OBJECTS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_DEPENDENCIES = $(am__DEPENDENCIES_1) stap_gen_cert_LINK = $(CXXLD) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) \ $(stap_gen_cert_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_serverd_OBJECTS = stap_serverd-stap-serverd.$(OBJEXT) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_serverd-cscommon.$(OBJEXT) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_serverd-util.$(OBJEXT) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_serverd-privilege.$(OBJEXT) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_serverd-nsscommon.$(OBJEXT) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_serverd-cmdline.$(OBJEXT) stap_serverd_OBJECTS = $(am_stap_serverd_OBJECTS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__DEPENDENCIES_5) stap_serverd_LINK = $(CXXLD) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) \ $(stap_serverd_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_sign_module_OBJECTS = stap_sign_module-stap-sign-module.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_sign_module-nsscommon.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_sign_module-util.$(OBJEXT) stap_sign_module_OBJECTS = $(am_stap_sign_module_OBJECTS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_DEPENDENCIES = \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__DEPENDENCIES_1) stap_sign_module_LINK = $(CXXLD) $(stap_sign_module_CXXFLAGS) \ $(CXXFLAGS) $(stap_sign_module_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@am_stapvirt_OBJECTS = stapvirt-stapvirt.$(OBJEXT) stapvirt_OBJECTS = $(am_stapvirt_OBJECTS) @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_DEPENDENCIES = \ @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(am__DEPENDENCIES_1) stapvirt_LINK = $(CCLD) $(stapvirt_CFLAGS) $(CFLAGS) \ $(stapvirt_LDFLAGS) $(LDFLAGS) -o $@ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(bin_SCRIPTS) $(pkglibexec_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(loc2c_test_SOURCES) $(stap_SOURCES) \ $(stap_authorize_cert_SOURCES) $(stap_gen_cert_SOURCES) \ $(stap_serverd_SOURCES) $(stap_sign_module_SOURCES) \ $(stapvirt_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__noinst_HEADERS_DIST = sdt_types.h HEADERS = $(noinst_HEADERS) $(oldinclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope pkglibexecdir = ${libexecdir}/${PACKAGE} ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DYNINST_CXXFLAGS = @DYNINST_CXXFLAGS@ DYNINST_LDFLAGS = @DYNINST_LDFLAGS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAVADIR = @JAVADIR@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LOCALEDIR = @LOCALEDIR@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIECFLAGS = @PIECFLAGS@ PIECXXFLAGS = @PIECXXFLAGS@ PIELDFLAGS = @PIELDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STAP_EXTRA_VERSION = @STAP_EXTRA_VERSION@ STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ avahi_CFLAGS = @avahi_CFLAGS@ avahi_LIBS = @avahi_LIBS@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxx11 = @cxx11@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dracutstap = @dracutstap@ dvidir = @dvidir@ elfutils_abs_srcdir = @elfutils_abs_srcdir@ exec_prefix = @exec_prefix@ have_dvips = @have_dvips@ have_fop = @have_fop@ have_jar = @have_jar@ have_javac = @have_javac@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_xmlto = @have_xmlto@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libvirt_CFLAGS = @libvirt_CFLAGS@ libvirt_LIBS = @libvirt_LIBS@ libxml2_CFLAGS = @libxml2_CFLAGS@ libxml2_LIBS = @libxml2_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ nss_CFLAGS = @nss_CFLAGS@ nss_LIBS = @nss_LIBS@ oldincludedir = ${includedir}/sys pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ python = @python@ sbindir = @sbindir@ selinux_CFLAGS = @selinux_CFLAGS@ selinux_LIBS = @selinux_LIBS@ sharedstatedir = @sharedstatedir@ sqlite3_LIBS = @sqlite3_LIBS@ srcdir = @srcdir@ stap_LIBS = @stap_LIBS@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ staprun_LIBS = @staprun_LIBS@ subdirs = @subdirs@ support_section_question = @support_section_question@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # we don't maintain a ChangeLog, which makes us non-GNU -> foreign AUTOMAKE_OPTIONS = no-dist foreign AM_CPPFLAGS = -DBINDIR='"$(bindir)"' \ -DSYSCONFDIR='"$(sysconfdir)"' \ -DPKGDATADIR='"$(pkgdatadir)"' \ -DPKGLIBDIR='"$(pkglibexecdir)"' \ -DLOCALEDIR='"$(localedir)"' \ -I$(srcdir)/includes -I$(builddir)/includes/sys AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W AM_CXXFLAGS = -Wall -Werror bin_SCRIPTS = stap-report $(am__append_2) $(am__append_5) pkglibexec_SCRIPTS = stap-env $(am__append_6) oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h @BUILD_TRANSLATOR_TRUE@stap_SOURCES = main.cxx session.cxx parse.cxx \ @BUILD_TRANSLATOR_TRUE@ staptree.cxx elaborate.cxx \ @BUILD_TRANSLATOR_TRUE@ translate.cxx tapsets.cxx buildrun.cxx \ @BUILD_TRANSLATOR_TRUE@ loc2c.c hash.cxx mdfour.c cache.cxx \ @BUILD_TRANSLATOR_TRUE@ util.cxx coveragedb.cxx \ @BUILD_TRANSLATOR_TRUE@ dwarf_wrappers.cxx tapset-been.cxx \ @BUILD_TRANSLATOR_TRUE@ tapset-procfs.cxx tapset-timers.cxx \ @BUILD_TRANSLATOR_TRUE@ tapset-netfilter.cxx tapset-perfmon.cxx \ @BUILD_TRANSLATOR_TRUE@ tapset-mark.cxx tapset-itrace.cxx \ @BUILD_TRANSLATOR_TRUE@ tapset-utrace.cxx task_finder.cxx \ @BUILD_TRANSLATOR_TRUE@ dwflpp.cxx rpm_finder.cxx setupdwfl.cxx \ @BUILD_TRANSLATOR_TRUE@ remote.cxx privilege.cxx cmdline.cxx \ @BUILD_TRANSLATOR_TRUE@ tapset-dynprobe.cxx tapset-method.cxx \ @BUILD_TRANSLATOR_TRUE@ translator-output.cxx stapregex.cxx \ @BUILD_TRANSLATOR_TRUE@ stapregex-tree.cxx stapregex-parse.cxx \ @BUILD_TRANSLATOR_TRUE@ stapregex-dfa.cxx stringtable.cxx \ @BUILD_TRANSLATOR_TRUE@ $(am__append_11) @BUILD_TRANSLATOR_TRUE@noinst_HEADERS = sdt_types.h @BUILD_TRANSLATOR_TRUE@stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ \ @BUILD_TRANSLATOR_TRUE@ @LIBINTL@ -lpthread $(am__append_10) \ @BUILD_TRANSLATOR_TRUE@ $(am__append_15) @BUILD_TRANSLATOR_TRUE@stap_DEPENDENCIES = $(am__append_21) @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_SOURCES = stapvirt.c @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_CFLAGS = \ @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(AM_CFLAGS) \ @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(libvirt_CFLAGS) \ @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(libxml2_CFLAGS) @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_LDFLAGS = $(AM_LDFLAGS) @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_LDADD = $(libvirt_LIBS) $(libxml2_LIBS) # Arrange for git_version.h to be regenerated at every "make". # Code fragment is based upon RadeonHD.am. # The stamp file which is never created ensures that git_version.h is updated # before every build. Having git_version.h in foo_SOURCES ensures a recompile # of foo-bar.c if it is newer than the foo-bar.o file. Using noinst_foo_SOURCES # instead of foo_SOURCES prevents shipping git_version.h in dist tarballs, # which may cause false GIT_FOO readings. BUILT_SOURCES = git_version.stamp $(am__append_19) CLEANFILES = git_version.h $(am__append_20) $(pkglibexec_PROGRAMS) GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh PHONIES = $(am__append_16) $(am__append_22) runcheck update-po \ dist-gzip rpm srpm uprobes install-uprobes @BUILD_TRANSLATOR_TRUE@stap_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ \ @BUILD_TRANSLATOR_TRUE@ $(am__append_12) @BUILD_TRANSLATOR_TRUE@stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ \ @BUILD_TRANSLATOR_TRUE@ @cxx11@ $(am__append_8) \ @BUILD_TRANSLATOR_TRUE@ $(am__append_13) @BUILD_TRANSLATOR_TRUE@stap_CPPFLAGS = $(AM_CPPFLAGS) -DSTAP_SDT_V2 \ @BUILD_TRANSLATOR_TRUE@ $(am__append_9) $(am__append_14) \ @BUILD_TRANSLATOR_TRUE@ $(am__append_17) @BUILD_TRANSLATOR_TRUE@stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ \ @BUILD_TRANSLATOR_TRUE@ $(am__append_18) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_SOURCES = stap-sign-module.cxx nsscommon.cxx util.cxx @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CPPFLAGS = $(AM_CPPFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_LDADD = $(nss_LIBS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_SOURCES = stap-authorize-cert.cxx nsscommon.cxx util.cxx @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_CPPFLAGS = $(AM_CPPFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_LDADD = $(nss_LIBS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_SOURCES = stap-serverd.cxx cscommon.cxx util.cxx privilege.cxx nsscommon.cxx cmdline.cxx @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ @PIECXXFLAGS@ \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(nss_CFLAGS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_24) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_CFLAGS = $(AM_CFLAGS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ @PIECFLAGS@ \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(nss_CFLAGS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_23) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_LDADD = $(nss_LIBS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ -lpthread \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_25) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_SOURCES = stap-gen-cert.cxx util.cxx nsscommon.cxx @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_LDADD = $(nss_LIBS) @BUILD_TRANSLATOR_TRUE@loc2c_test_SOURCES = loc2c-test.c loc2c.c @BUILD_TRANSLATOR_TRUE@loc2c_test_CFLAGS = $(stap_CFLAGS) @BUILD_TRANSLATOR_TRUE@loc2c_test_CPPFLAGS = $(stap_CPPFLAGS) @BUILD_TRANSLATOR_TRUE@loc2c_test_LDFLAGS = $(stap_LDFLAGS) @BUILD_TRANSLATOR_TRUE@loc2c_test_LDADD = $(stap_LDADD) # crash(8) extension @BUILD_CRASHMOD_TRUE@STAPLOG = staplog.so # Get extra libs as needed LDADD = EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples EXAMPLE_META_FILES = $(EXAMPLE_SOURCE_DIR)/*/*.meta TEST_COV_DIR = coverage SUBDIRS = . java stapdyn staprun doc man po # NB: the gcov target above uses this to enumarate linked binaries' build directories DIST_SUBDIRS = testsuite $(SUBDIRS) EXTRA_DIST = m4/ChangeLog # Any extra flags, such as: # --define "with_docs 0" # --define "with_bundled_elfutils 1" --define "elfutils_version 0.135" RPMBUILDFLAGS = ACLOCAL_AMFLAGS = -I m4 all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .cxx .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 includes/sys/sdt-config.h: $(top_builddir)/config.status $(top_srcdir)/includes/sys/sdt-config.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ initscript/config.systemtap: $(top_builddir)/config.status $(top_srcdir)/initscript/config.systemtap.in cd $(top_builddir) && $(SHELL) ./config.status $@ initscript/config.stap-server: $(top_builddir)/config.status $(top_srcdir)/initscript/config.stap-server.in cd $(top_builddir) && $(SHELL) ./config.status $@ initscript/systemtap: $(top_builddir)/config.status $(top_srcdir)/initscript/systemtap.in cd $(top_builddir) && $(SHELL) ./config.status $@ initscript/stap-server: $(top_builddir)/config.status $(top_srcdir)/initscript/stap-server.in cd $(top_builddir) && $(SHELL) ./config.status $@ initscript/99stap/module-setup.sh: $(top_builddir)/config.status $(top_srcdir)/initscript/99stap/module-setup.sh.in cd $(top_builddir) && $(SHELL) ./config.status $@ run-stap: $(top_builddir)/config.status $(srcdir)/run-stap.in cd $(top_builddir) && $(SHELL) ./config.status $@ dtrace: $(top_builddir)/config.status $(srcdir)/dtrace.in cd $(top_builddir) && $(SHELL) ./config.status $@ staprun/guest/stapshd: $(top_builddir)/config.status $(top_srcdir)/staprun/guest/stapshd.in cd $(top_builddir) && $(SHELL) ./config.status $@ staprun/guest/stapsh-daemon: $(top_builddir)/config.status $(top_srcdir)/staprun/guest/stapsh-daemon.in cd $(top_builddir) && $(SHELL) ./config.status $@ staprun/guest/stapsh@.service: $(top_builddir)/config.status $(top_srcdir)/staprun/guest/stapsh@.service.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-pkglibexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkglibexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkglibexecdir)" && rm -f $$files clean-pkglibexecPROGRAMS: -test -z "$(pkglibexec_PROGRAMS)" || rm -f $(pkglibexec_PROGRAMS) loc2c-test$(EXEEXT): $(loc2c_test_OBJECTS) $(loc2c_test_DEPENDENCIES) $(EXTRA_loc2c_test_DEPENDENCIES) @rm -f loc2c-test$(EXEEXT) $(AM_V_CCLD)$(loc2c_test_LINK) $(loc2c_test_OBJECTS) $(loc2c_test_LDADD) $(LIBS) stap$(EXEEXT): $(stap_OBJECTS) $(stap_DEPENDENCIES) $(EXTRA_stap_DEPENDENCIES) @rm -f stap$(EXEEXT) $(AM_V_CXXLD)$(stap_LINK) $(stap_OBJECTS) $(stap_LDADD) $(LIBS) stap-authorize-cert$(EXEEXT): $(stap_authorize_cert_OBJECTS) $(stap_authorize_cert_DEPENDENCIES) $(EXTRA_stap_authorize_cert_DEPENDENCIES) @rm -f stap-authorize-cert$(EXEEXT) $(AM_V_CXXLD)$(stap_authorize_cert_LINK) $(stap_authorize_cert_OBJECTS) $(stap_authorize_cert_LDADD) $(LIBS) stap-gen-cert$(EXEEXT): $(stap_gen_cert_OBJECTS) $(stap_gen_cert_DEPENDENCIES) $(EXTRA_stap_gen_cert_DEPENDENCIES) @rm -f stap-gen-cert$(EXEEXT) $(AM_V_CXXLD)$(stap_gen_cert_LINK) $(stap_gen_cert_OBJECTS) $(stap_gen_cert_LDADD) $(LIBS) stap-serverd$(EXEEXT): $(stap_serverd_OBJECTS) $(stap_serverd_DEPENDENCIES) $(EXTRA_stap_serverd_DEPENDENCIES) @rm -f stap-serverd$(EXEEXT) $(AM_V_CXXLD)$(stap_serverd_LINK) $(stap_serverd_OBJECTS) $(stap_serverd_LDADD) $(LIBS) stap-sign-module$(EXEEXT): $(stap_sign_module_OBJECTS) $(stap_sign_module_DEPENDENCIES) $(EXTRA_stap_sign_module_DEPENDENCIES) @rm -f stap-sign-module$(EXEEXT) $(AM_V_CXXLD)$(stap_sign_module_LINK) $(stap_sign_module_OBJECTS) $(stap_sign_module_LDADD) $(LIBS) stapvirt$(EXEEXT): $(stapvirt_OBJECTS) $(stapvirt_DEPENDENCIES) $(EXTRA_stapvirt_DEPENDENCIES) @rm -f stapvirt$(EXEEXT) $(AM_V_CCLD)$(stapvirt_LINK) $(stapvirt_OBJECTS) $(stapvirt_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) install-pkglibexecSCRIPTS: $(pkglibexec_SCRIPTS) @$(NORMAL_INSTALL) @list='$(pkglibexec_SCRIPTS)'; test -n "$(pkglibexecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-pkglibexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_SCRIPTS)'; test -n "$(pkglibexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(pkglibexecdir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loc2c_test-loc2c-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loc2c_test-loc2c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-buildrun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-coveragedb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-csclient.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-cscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-dwarf_wrappers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-dwflpp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-elaborate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-loc2c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-mdfour.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-nsscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-privilege.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-remote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-rpm_finder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-session.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-setupdwfl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-stapregex-dfa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-stapregex-parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-stapregex-tree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-stapregex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-staptree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-stringtable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-been.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-dynprobe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-itrace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-mark.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-method.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-netfilter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-perfmon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-procfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-timers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-utrace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapsets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-task_finder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-translate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-translator-output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_authorize_cert-nsscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_authorize_cert-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_gen_cert-nsscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_gen_cert-stap-gen-cert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_gen_cert-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-cscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-nsscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-privilege.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-stap-serverd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_sign_module-nsscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_sign_module-stap-sign-module.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_sign_module-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapvirt-stapvirt.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` loc2c_test-loc2c-test.o: loc2c-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -MT loc2c_test-loc2c-test.o -MD -MP -MF $(DEPDIR)/loc2c_test-loc2c-test.Tpo -c -o loc2c_test-loc2c-test.o `test -f 'loc2c-test.c' || echo '$(srcdir)/'`loc2c-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/loc2c_test-loc2c-test.Tpo $(DEPDIR)/loc2c_test-loc2c-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loc2c-test.c' object='loc2c_test-loc2c-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -c -o loc2c_test-loc2c-test.o `test -f 'loc2c-test.c' || echo '$(srcdir)/'`loc2c-test.c loc2c_test-loc2c-test.obj: loc2c-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -MT loc2c_test-loc2c-test.obj -MD -MP -MF $(DEPDIR)/loc2c_test-loc2c-test.Tpo -c -o loc2c_test-loc2c-test.obj `if test -f 'loc2c-test.c'; then $(CYGPATH_W) 'loc2c-test.c'; else $(CYGPATH_W) '$(srcdir)/loc2c-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/loc2c_test-loc2c-test.Tpo $(DEPDIR)/loc2c_test-loc2c-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loc2c-test.c' object='loc2c_test-loc2c-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -c -o loc2c_test-loc2c-test.obj `if test -f 'loc2c-test.c'; then $(CYGPATH_W) 'loc2c-test.c'; else $(CYGPATH_W) '$(srcdir)/loc2c-test.c'; fi` loc2c_test-loc2c.o: loc2c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -MT loc2c_test-loc2c.o -MD -MP -MF $(DEPDIR)/loc2c_test-loc2c.Tpo -c -o loc2c_test-loc2c.o `test -f 'loc2c.c' || echo '$(srcdir)/'`loc2c.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/loc2c_test-loc2c.Tpo $(DEPDIR)/loc2c_test-loc2c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loc2c.c' object='loc2c_test-loc2c.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -c -o loc2c_test-loc2c.o `test -f 'loc2c.c' || echo '$(srcdir)/'`loc2c.c loc2c_test-loc2c.obj: loc2c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -MT loc2c_test-loc2c.obj -MD -MP -MF $(DEPDIR)/loc2c_test-loc2c.Tpo -c -o loc2c_test-loc2c.obj `if test -f 'loc2c.c'; then $(CYGPATH_W) 'loc2c.c'; else $(CYGPATH_W) '$(srcdir)/loc2c.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/loc2c_test-loc2c.Tpo $(DEPDIR)/loc2c_test-loc2c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loc2c.c' object='loc2c_test-loc2c.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -c -o loc2c_test-loc2c.obj `if test -f 'loc2c.c'; then $(CYGPATH_W) 'loc2c.c'; else $(CYGPATH_W) '$(srcdir)/loc2c.c'; fi` stap-loc2c.o: loc2c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -MT stap-loc2c.o -MD -MP -MF $(DEPDIR)/stap-loc2c.Tpo -c -o stap-loc2c.o `test -f 'loc2c.c' || echo '$(srcdir)/'`loc2c.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-loc2c.Tpo $(DEPDIR)/stap-loc2c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loc2c.c' object='stap-loc2c.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-loc2c.o `test -f 'loc2c.c' || echo '$(srcdir)/'`loc2c.c stap-loc2c.obj: loc2c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -MT stap-loc2c.obj -MD -MP -MF $(DEPDIR)/stap-loc2c.Tpo -c -o stap-loc2c.obj `if test -f 'loc2c.c'; then $(CYGPATH_W) 'loc2c.c'; else $(CYGPATH_W) '$(srcdir)/loc2c.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-loc2c.Tpo $(DEPDIR)/stap-loc2c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loc2c.c' object='stap-loc2c.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-loc2c.obj `if test -f 'loc2c.c'; then $(CYGPATH_W) 'loc2c.c'; else $(CYGPATH_W) '$(srcdir)/loc2c.c'; fi` stap-mdfour.o: mdfour.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -MT stap-mdfour.o -MD -MP -MF $(DEPDIR)/stap-mdfour.Tpo -c -o stap-mdfour.o `test -f 'mdfour.c' || echo '$(srcdir)/'`mdfour.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-mdfour.Tpo $(DEPDIR)/stap-mdfour.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mdfour.c' object='stap-mdfour.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-mdfour.o `test -f 'mdfour.c' || echo '$(srcdir)/'`mdfour.c stap-mdfour.obj: mdfour.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -MT stap-mdfour.obj -MD -MP -MF $(DEPDIR)/stap-mdfour.Tpo -c -o stap-mdfour.obj `if test -f 'mdfour.c'; then $(CYGPATH_W) 'mdfour.c'; else $(CYGPATH_W) '$(srcdir)/mdfour.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-mdfour.Tpo $(DEPDIR)/stap-mdfour.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mdfour.c' object='stap-mdfour.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-mdfour.obj `if test -f 'mdfour.c'; then $(CYGPATH_W) 'mdfour.c'; else $(CYGPATH_W) '$(srcdir)/mdfour.c'; fi` stapvirt-stapvirt.o: stapvirt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapvirt_CFLAGS) $(CFLAGS) -MT stapvirt-stapvirt.o -MD -MP -MF $(DEPDIR)/stapvirt-stapvirt.Tpo -c -o stapvirt-stapvirt.o `test -f 'stapvirt.c' || echo '$(srcdir)/'`stapvirt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapvirt-stapvirt.Tpo $(DEPDIR)/stapvirt-stapvirt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stapvirt.c' object='stapvirt-stapvirt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapvirt_CFLAGS) $(CFLAGS) -c -o stapvirt-stapvirt.o `test -f 'stapvirt.c' || echo '$(srcdir)/'`stapvirt.c stapvirt-stapvirt.obj: stapvirt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapvirt_CFLAGS) $(CFLAGS) -MT stapvirt-stapvirt.obj -MD -MP -MF $(DEPDIR)/stapvirt-stapvirt.Tpo -c -o stapvirt-stapvirt.obj `if test -f 'stapvirt.c'; then $(CYGPATH_W) 'stapvirt.c'; else $(CYGPATH_W) '$(srcdir)/stapvirt.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapvirt-stapvirt.Tpo $(DEPDIR)/stapvirt-stapvirt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stapvirt.c' object='stapvirt-stapvirt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapvirt_CFLAGS) $(CFLAGS) -c -o stapvirt-stapvirt.obj `if test -f 'stapvirt.c'; then $(CYGPATH_W) 'stapvirt.c'; else $(CYGPATH_W) '$(srcdir)/stapvirt.c'; fi` .cxx.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` stap-main.o: main.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-main.o -MD -MP -MF $(DEPDIR)/stap-main.Tpo -c -o stap-main.o `test -f 'main.cxx' || echo '$(srcdir)/'`main.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-main.Tpo $(DEPDIR)/stap-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cxx' object='stap-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-main.o `test -f 'main.cxx' || echo '$(srcdir)/'`main.cxx stap-main.obj: main.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-main.obj -MD -MP -MF $(DEPDIR)/stap-main.Tpo -c -o stap-main.obj `if test -f 'main.cxx'; then $(CYGPATH_W) 'main.cxx'; else $(CYGPATH_W) '$(srcdir)/main.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-main.Tpo $(DEPDIR)/stap-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cxx' object='stap-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-main.obj `if test -f 'main.cxx'; then $(CYGPATH_W) 'main.cxx'; else $(CYGPATH_W) '$(srcdir)/main.cxx'; fi` stap-session.o: session.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-session.o -MD -MP -MF $(DEPDIR)/stap-session.Tpo -c -o stap-session.o `test -f 'session.cxx' || echo '$(srcdir)/'`session.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-session.Tpo $(DEPDIR)/stap-session.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='session.cxx' object='stap-session.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-session.o `test -f 'session.cxx' || echo '$(srcdir)/'`session.cxx stap-session.obj: session.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-session.obj -MD -MP -MF $(DEPDIR)/stap-session.Tpo -c -o stap-session.obj `if test -f 'session.cxx'; then $(CYGPATH_W) 'session.cxx'; else $(CYGPATH_W) '$(srcdir)/session.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-session.Tpo $(DEPDIR)/stap-session.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='session.cxx' object='stap-session.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-session.obj `if test -f 'session.cxx'; then $(CYGPATH_W) 'session.cxx'; else $(CYGPATH_W) '$(srcdir)/session.cxx'; fi` stap-parse.o: parse.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-parse.o -MD -MP -MF $(DEPDIR)/stap-parse.Tpo -c -o stap-parse.o `test -f 'parse.cxx' || echo '$(srcdir)/'`parse.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-parse.Tpo $(DEPDIR)/stap-parse.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse.cxx' object='stap-parse.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-parse.o `test -f 'parse.cxx' || echo '$(srcdir)/'`parse.cxx stap-parse.obj: parse.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-parse.obj -MD -MP -MF $(DEPDIR)/stap-parse.Tpo -c -o stap-parse.obj `if test -f 'parse.cxx'; then $(CYGPATH_W) 'parse.cxx'; else $(CYGPATH_W) '$(srcdir)/parse.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-parse.Tpo $(DEPDIR)/stap-parse.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse.cxx' object='stap-parse.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-parse.obj `if test -f 'parse.cxx'; then $(CYGPATH_W) 'parse.cxx'; else $(CYGPATH_W) '$(srcdir)/parse.cxx'; fi` stap-staptree.o: staptree.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-staptree.o -MD -MP -MF $(DEPDIR)/stap-staptree.Tpo -c -o stap-staptree.o `test -f 'staptree.cxx' || echo '$(srcdir)/'`staptree.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-staptree.Tpo $(DEPDIR)/stap-staptree.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='staptree.cxx' object='stap-staptree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-staptree.o `test -f 'staptree.cxx' || echo '$(srcdir)/'`staptree.cxx stap-staptree.obj: staptree.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-staptree.obj -MD -MP -MF $(DEPDIR)/stap-staptree.Tpo -c -o stap-staptree.obj `if test -f 'staptree.cxx'; then $(CYGPATH_W) 'staptree.cxx'; else $(CYGPATH_W) '$(srcdir)/staptree.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-staptree.Tpo $(DEPDIR)/stap-staptree.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='staptree.cxx' object='stap-staptree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-staptree.obj `if test -f 'staptree.cxx'; then $(CYGPATH_W) 'staptree.cxx'; else $(CYGPATH_W) '$(srcdir)/staptree.cxx'; fi` stap-elaborate.o: elaborate.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-elaborate.o -MD -MP -MF $(DEPDIR)/stap-elaborate.Tpo -c -o stap-elaborate.o `test -f 'elaborate.cxx' || echo '$(srcdir)/'`elaborate.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-elaborate.Tpo $(DEPDIR)/stap-elaborate.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='elaborate.cxx' object='stap-elaborate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-elaborate.o `test -f 'elaborate.cxx' || echo '$(srcdir)/'`elaborate.cxx stap-elaborate.obj: elaborate.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-elaborate.obj -MD -MP -MF $(DEPDIR)/stap-elaborate.Tpo -c -o stap-elaborate.obj `if test -f 'elaborate.cxx'; then $(CYGPATH_W) 'elaborate.cxx'; else $(CYGPATH_W) '$(srcdir)/elaborate.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-elaborate.Tpo $(DEPDIR)/stap-elaborate.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='elaborate.cxx' object='stap-elaborate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-elaborate.obj `if test -f 'elaborate.cxx'; then $(CYGPATH_W) 'elaborate.cxx'; else $(CYGPATH_W) '$(srcdir)/elaborate.cxx'; fi` stap-translate.o: translate.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-translate.o -MD -MP -MF $(DEPDIR)/stap-translate.Tpo -c -o stap-translate.o `test -f 'translate.cxx' || echo '$(srcdir)/'`translate.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-translate.Tpo $(DEPDIR)/stap-translate.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='translate.cxx' object='stap-translate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-translate.o `test -f 'translate.cxx' || echo '$(srcdir)/'`translate.cxx stap-translate.obj: translate.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-translate.obj -MD -MP -MF $(DEPDIR)/stap-translate.Tpo -c -o stap-translate.obj `if test -f 'translate.cxx'; then $(CYGPATH_W) 'translate.cxx'; else $(CYGPATH_W) '$(srcdir)/translate.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-translate.Tpo $(DEPDIR)/stap-translate.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='translate.cxx' object='stap-translate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-translate.obj `if test -f 'translate.cxx'; then $(CYGPATH_W) 'translate.cxx'; else $(CYGPATH_W) '$(srcdir)/translate.cxx'; fi` stap-tapsets.o: tapsets.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapsets.o -MD -MP -MF $(DEPDIR)/stap-tapsets.Tpo -c -o stap-tapsets.o `test -f 'tapsets.cxx' || echo '$(srcdir)/'`tapsets.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapsets.Tpo $(DEPDIR)/stap-tapsets.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapsets.cxx' object='stap-tapsets.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapsets.o `test -f 'tapsets.cxx' || echo '$(srcdir)/'`tapsets.cxx stap-tapsets.obj: tapsets.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapsets.obj -MD -MP -MF $(DEPDIR)/stap-tapsets.Tpo -c -o stap-tapsets.obj `if test -f 'tapsets.cxx'; then $(CYGPATH_W) 'tapsets.cxx'; else $(CYGPATH_W) '$(srcdir)/tapsets.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapsets.Tpo $(DEPDIR)/stap-tapsets.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapsets.cxx' object='stap-tapsets.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapsets.obj `if test -f 'tapsets.cxx'; then $(CYGPATH_W) 'tapsets.cxx'; else $(CYGPATH_W) '$(srcdir)/tapsets.cxx'; fi` stap-buildrun.o: buildrun.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-buildrun.o -MD -MP -MF $(DEPDIR)/stap-buildrun.Tpo -c -o stap-buildrun.o `test -f 'buildrun.cxx' || echo '$(srcdir)/'`buildrun.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-buildrun.Tpo $(DEPDIR)/stap-buildrun.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='buildrun.cxx' object='stap-buildrun.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-buildrun.o `test -f 'buildrun.cxx' || echo '$(srcdir)/'`buildrun.cxx stap-buildrun.obj: buildrun.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-buildrun.obj -MD -MP -MF $(DEPDIR)/stap-buildrun.Tpo -c -o stap-buildrun.obj `if test -f 'buildrun.cxx'; then $(CYGPATH_W) 'buildrun.cxx'; else $(CYGPATH_W) '$(srcdir)/buildrun.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-buildrun.Tpo $(DEPDIR)/stap-buildrun.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='buildrun.cxx' object='stap-buildrun.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-buildrun.obj `if test -f 'buildrun.cxx'; then $(CYGPATH_W) 'buildrun.cxx'; else $(CYGPATH_W) '$(srcdir)/buildrun.cxx'; fi` stap-hash.o: hash.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-hash.o -MD -MP -MF $(DEPDIR)/stap-hash.Tpo -c -o stap-hash.o `test -f 'hash.cxx' || echo '$(srcdir)/'`hash.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-hash.Tpo $(DEPDIR)/stap-hash.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='hash.cxx' object='stap-hash.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-hash.o `test -f 'hash.cxx' || echo '$(srcdir)/'`hash.cxx stap-hash.obj: hash.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-hash.obj -MD -MP -MF $(DEPDIR)/stap-hash.Tpo -c -o stap-hash.obj `if test -f 'hash.cxx'; then $(CYGPATH_W) 'hash.cxx'; else $(CYGPATH_W) '$(srcdir)/hash.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-hash.Tpo $(DEPDIR)/stap-hash.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='hash.cxx' object='stap-hash.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-hash.obj `if test -f 'hash.cxx'; then $(CYGPATH_W) 'hash.cxx'; else $(CYGPATH_W) '$(srcdir)/hash.cxx'; fi` stap-cache.o: cache.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-cache.o -MD -MP -MF $(DEPDIR)/stap-cache.Tpo -c -o stap-cache.o `test -f 'cache.cxx' || echo '$(srcdir)/'`cache.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-cache.Tpo $(DEPDIR)/stap-cache.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cache.cxx' object='stap-cache.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-cache.o `test -f 'cache.cxx' || echo '$(srcdir)/'`cache.cxx stap-cache.obj: cache.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-cache.obj -MD -MP -MF $(DEPDIR)/stap-cache.Tpo -c -o stap-cache.obj `if test -f 'cache.cxx'; then $(CYGPATH_W) 'cache.cxx'; else $(CYGPATH_W) '$(srcdir)/cache.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-cache.Tpo $(DEPDIR)/stap-cache.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cache.cxx' object='stap-cache.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-cache.obj `if test -f 'cache.cxx'; then $(CYGPATH_W) 'cache.cxx'; else $(CYGPATH_W) '$(srcdir)/cache.cxx'; fi` stap-util.o: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-util.o -MD -MP -MF $(DEPDIR)/stap-util.Tpo -c -o stap-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-util.Tpo $(DEPDIR)/stap-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx stap-util.obj: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-util.obj -MD -MP -MF $(DEPDIR)/stap-util.Tpo -c -o stap-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-util.Tpo $(DEPDIR)/stap-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` stap-coveragedb.o: coveragedb.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-coveragedb.o -MD -MP -MF $(DEPDIR)/stap-coveragedb.Tpo -c -o stap-coveragedb.o `test -f 'coveragedb.cxx' || echo '$(srcdir)/'`coveragedb.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-coveragedb.Tpo $(DEPDIR)/stap-coveragedb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='coveragedb.cxx' object='stap-coveragedb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-coveragedb.o `test -f 'coveragedb.cxx' || echo '$(srcdir)/'`coveragedb.cxx stap-coveragedb.obj: coveragedb.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-coveragedb.obj -MD -MP -MF $(DEPDIR)/stap-coveragedb.Tpo -c -o stap-coveragedb.obj `if test -f 'coveragedb.cxx'; then $(CYGPATH_W) 'coveragedb.cxx'; else $(CYGPATH_W) '$(srcdir)/coveragedb.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-coveragedb.Tpo $(DEPDIR)/stap-coveragedb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='coveragedb.cxx' object='stap-coveragedb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-coveragedb.obj `if test -f 'coveragedb.cxx'; then $(CYGPATH_W) 'coveragedb.cxx'; else $(CYGPATH_W) '$(srcdir)/coveragedb.cxx'; fi` stap-dwarf_wrappers.o: dwarf_wrappers.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-dwarf_wrappers.o -MD -MP -MF $(DEPDIR)/stap-dwarf_wrappers.Tpo -c -o stap-dwarf_wrappers.o `test -f 'dwarf_wrappers.cxx' || echo '$(srcdir)/'`dwarf_wrappers.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-dwarf_wrappers.Tpo $(DEPDIR)/stap-dwarf_wrappers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dwarf_wrappers.cxx' object='stap-dwarf_wrappers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-dwarf_wrappers.o `test -f 'dwarf_wrappers.cxx' || echo '$(srcdir)/'`dwarf_wrappers.cxx stap-dwarf_wrappers.obj: dwarf_wrappers.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-dwarf_wrappers.obj -MD -MP -MF $(DEPDIR)/stap-dwarf_wrappers.Tpo -c -o stap-dwarf_wrappers.obj `if test -f 'dwarf_wrappers.cxx'; then $(CYGPATH_W) 'dwarf_wrappers.cxx'; else $(CYGPATH_W) '$(srcdir)/dwarf_wrappers.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-dwarf_wrappers.Tpo $(DEPDIR)/stap-dwarf_wrappers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dwarf_wrappers.cxx' object='stap-dwarf_wrappers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-dwarf_wrappers.obj `if test -f 'dwarf_wrappers.cxx'; then $(CYGPATH_W) 'dwarf_wrappers.cxx'; else $(CYGPATH_W) '$(srcdir)/dwarf_wrappers.cxx'; fi` stap-tapset-been.o: tapset-been.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-been.o -MD -MP -MF $(DEPDIR)/stap-tapset-been.Tpo -c -o stap-tapset-been.o `test -f 'tapset-been.cxx' || echo '$(srcdir)/'`tapset-been.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-been.Tpo $(DEPDIR)/stap-tapset-been.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-been.cxx' object='stap-tapset-been.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-been.o `test -f 'tapset-been.cxx' || echo '$(srcdir)/'`tapset-been.cxx stap-tapset-been.obj: tapset-been.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-been.obj -MD -MP -MF $(DEPDIR)/stap-tapset-been.Tpo -c -o stap-tapset-been.obj `if test -f 'tapset-been.cxx'; then $(CYGPATH_W) 'tapset-been.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-been.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-been.Tpo $(DEPDIR)/stap-tapset-been.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-been.cxx' object='stap-tapset-been.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-been.obj `if test -f 'tapset-been.cxx'; then $(CYGPATH_W) 'tapset-been.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-been.cxx'; fi` stap-tapset-procfs.o: tapset-procfs.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-procfs.o -MD -MP -MF $(DEPDIR)/stap-tapset-procfs.Tpo -c -o stap-tapset-procfs.o `test -f 'tapset-procfs.cxx' || echo '$(srcdir)/'`tapset-procfs.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-procfs.Tpo $(DEPDIR)/stap-tapset-procfs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-procfs.cxx' object='stap-tapset-procfs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-procfs.o `test -f 'tapset-procfs.cxx' || echo '$(srcdir)/'`tapset-procfs.cxx stap-tapset-procfs.obj: tapset-procfs.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-procfs.obj -MD -MP -MF $(DEPDIR)/stap-tapset-procfs.Tpo -c -o stap-tapset-procfs.obj `if test -f 'tapset-procfs.cxx'; then $(CYGPATH_W) 'tapset-procfs.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-procfs.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-procfs.Tpo $(DEPDIR)/stap-tapset-procfs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-procfs.cxx' object='stap-tapset-procfs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-procfs.obj `if test -f 'tapset-procfs.cxx'; then $(CYGPATH_W) 'tapset-procfs.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-procfs.cxx'; fi` stap-tapset-timers.o: tapset-timers.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-timers.o -MD -MP -MF $(DEPDIR)/stap-tapset-timers.Tpo -c -o stap-tapset-timers.o `test -f 'tapset-timers.cxx' || echo '$(srcdir)/'`tapset-timers.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-timers.Tpo $(DEPDIR)/stap-tapset-timers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-timers.cxx' object='stap-tapset-timers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-timers.o `test -f 'tapset-timers.cxx' || echo '$(srcdir)/'`tapset-timers.cxx stap-tapset-timers.obj: tapset-timers.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-timers.obj -MD -MP -MF $(DEPDIR)/stap-tapset-timers.Tpo -c -o stap-tapset-timers.obj `if test -f 'tapset-timers.cxx'; then $(CYGPATH_W) 'tapset-timers.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-timers.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-timers.Tpo $(DEPDIR)/stap-tapset-timers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-timers.cxx' object='stap-tapset-timers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-timers.obj `if test -f 'tapset-timers.cxx'; then $(CYGPATH_W) 'tapset-timers.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-timers.cxx'; fi` stap-tapset-netfilter.o: tapset-netfilter.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-netfilter.o -MD -MP -MF $(DEPDIR)/stap-tapset-netfilter.Tpo -c -o stap-tapset-netfilter.o `test -f 'tapset-netfilter.cxx' || echo '$(srcdir)/'`tapset-netfilter.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-netfilter.Tpo $(DEPDIR)/stap-tapset-netfilter.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-netfilter.cxx' object='stap-tapset-netfilter.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-netfilter.o `test -f 'tapset-netfilter.cxx' || echo '$(srcdir)/'`tapset-netfilter.cxx stap-tapset-netfilter.obj: tapset-netfilter.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-netfilter.obj -MD -MP -MF $(DEPDIR)/stap-tapset-netfilter.Tpo -c -o stap-tapset-netfilter.obj `if test -f 'tapset-netfilter.cxx'; then $(CYGPATH_W) 'tapset-netfilter.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-netfilter.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-netfilter.Tpo $(DEPDIR)/stap-tapset-netfilter.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-netfilter.cxx' object='stap-tapset-netfilter.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-netfilter.obj `if test -f 'tapset-netfilter.cxx'; then $(CYGPATH_W) 'tapset-netfilter.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-netfilter.cxx'; fi` stap-tapset-perfmon.o: tapset-perfmon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-perfmon.o -MD -MP -MF $(DEPDIR)/stap-tapset-perfmon.Tpo -c -o stap-tapset-perfmon.o `test -f 'tapset-perfmon.cxx' || echo '$(srcdir)/'`tapset-perfmon.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-perfmon.Tpo $(DEPDIR)/stap-tapset-perfmon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-perfmon.cxx' object='stap-tapset-perfmon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-perfmon.o `test -f 'tapset-perfmon.cxx' || echo '$(srcdir)/'`tapset-perfmon.cxx stap-tapset-perfmon.obj: tapset-perfmon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-perfmon.obj -MD -MP -MF $(DEPDIR)/stap-tapset-perfmon.Tpo -c -o stap-tapset-perfmon.obj `if test -f 'tapset-perfmon.cxx'; then $(CYGPATH_W) 'tapset-perfmon.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-perfmon.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-perfmon.Tpo $(DEPDIR)/stap-tapset-perfmon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-perfmon.cxx' object='stap-tapset-perfmon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-perfmon.obj `if test -f 'tapset-perfmon.cxx'; then $(CYGPATH_W) 'tapset-perfmon.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-perfmon.cxx'; fi` stap-tapset-mark.o: tapset-mark.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-mark.o -MD -MP -MF $(DEPDIR)/stap-tapset-mark.Tpo -c -o stap-tapset-mark.o `test -f 'tapset-mark.cxx' || echo '$(srcdir)/'`tapset-mark.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-mark.Tpo $(DEPDIR)/stap-tapset-mark.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-mark.cxx' object='stap-tapset-mark.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-mark.o `test -f 'tapset-mark.cxx' || echo '$(srcdir)/'`tapset-mark.cxx stap-tapset-mark.obj: tapset-mark.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-mark.obj -MD -MP -MF $(DEPDIR)/stap-tapset-mark.Tpo -c -o stap-tapset-mark.obj `if test -f 'tapset-mark.cxx'; then $(CYGPATH_W) 'tapset-mark.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-mark.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-mark.Tpo $(DEPDIR)/stap-tapset-mark.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-mark.cxx' object='stap-tapset-mark.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-mark.obj `if test -f 'tapset-mark.cxx'; then $(CYGPATH_W) 'tapset-mark.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-mark.cxx'; fi` stap-tapset-itrace.o: tapset-itrace.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-itrace.o -MD -MP -MF $(DEPDIR)/stap-tapset-itrace.Tpo -c -o stap-tapset-itrace.o `test -f 'tapset-itrace.cxx' || echo '$(srcdir)/'`tapset-itrace.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-itrace.Tpo $(DEPDIR)/stap-tapset-itrace.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-itrace.cxx' object='stap-tapset-itrace.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-itrace.o `test -f 'tapset-itrace.cxx' || echo '$(srcdir)/'`tapset-itrace.cxx stap-tapset-itrace.obj: tapset-itrace.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-itrace.obj -MD -MP -MF $(DEPDIR)/stap-tapset-itrace.Tpo -c -o stap-tapset-itrace.obj `if test -f 'tapset-itrace.cxx'; then $(CYGPATH_W) 'tapset-itrace.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-itrace.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-itrace.Tpo $(DEPDIR)/stap-tapset-itrace.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-itrace.cxx' object='stap-tapset-itrace.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-itrace.obj `if test -f 'tapset-itrace.cxx'; then $(CYGPATH_W) 'tapset-itrace.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-itrace.cxx'; fi` stap-tapset-utrace.o: tapset-utrace.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-utrace.o -MD -MP -MF $(DEPDIR)/stap-tapset-utrace.Tpo -c -o stap-tapset-utrace.o `test -f 'tapset-utrace.cxx' || echo '$(srcdir)/'`tapset-utrace.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-utrace.Tpo $(DEPDIR)/stap-tapset-utrace.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-utrace.cxx' object='stap-tapset-utrace.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-utrace.o `test -f 'tapset-utrace.cxx' || echo '$(srcdir)/'`tapset-utrace.cxx stap-tapset-utrace.obj: tapset-utrace.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-utrace.obj -MD -MP -MF $(DEPDIR)/stap-tapset-utrace.Tpo -c -o stap-tapset-utrace.obj `if test -f 'tapset-utrace.cxx'; then $(CYGPATH_W) 'tapset-utrace.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-utrace.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-utrace.Tpo $(DEPDIR)/stap-tapset-utrace.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-utrace.cxx' object='stap-tapset-utrace.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-utrace.obj `if test -f 'tapset-utrace.cxx'; then $(CYGPATH_W) 'tapset-utrace.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-utrace.cxx'; fi` stap-task_finder.o: task_finder.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-task_finder.o -MD -MP -MF $(DEPDIR)/stap-task_finder.Tpo -c -o stap-task_finder.o `test -f 'task_finder.cxx' || echo '$(srcdir)/'`task_finder.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-task_finder.Tpo $(DEPDIR)/stap-task_finder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='task_finder.cxx' object='stap-task_finder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-task_finder.o `test -f 'task_finder.cxx' || echo '$(srcdir)/'`task_finder.cxx stap-task_finder.obj: task_finder.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-task_finder.obj -MD -MP -MF $(DEPDIR)/stap-task_finder.Tpo -c -o stap-task_finder.obj `if test -f 'task_finder.cxx'; then $(CYGPATH_W) 'task_finder.cxx'; else $(CYGPATH_W) '$(srcdir)/task_finder.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-task_finder.Tpo $(DEPDIR)/stap-task_finder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='task_finder.cxx' object='stap-task_finder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-task_finder.obj `if test -f 'task_finder.cxx'; then $(CYGPATH_W) 'task_finder.cxx'; else $(CYGPATH_W) '$(srcdir)/task_finder.cxx'; fi` stap-dwflpp.o: dwflpp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-dwflpp.o -MD -MP -MF $(DEPDIR)/stap-dwflpp.Tpo -c -o stap-dwflpp.o `test -f 'dwflpp.cxx' || echo '$(srcdir)/'`dwflpp.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-dwflpp.Tpo $(DEPDIR)/stap-dwflpp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dwflpp.cxx' object='stap-dwflpp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-dwflpp.o `test -f 'dwflpp.cxx' || echo '$(srcdir)/'`dwflpp.cxx stap-dwflpp.obj: dwflpp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-dwflpp.obj -MD -MP -MF $(DEPDIR)/stap-dwflpp.Tpo -c -o stap-dwflpp.obj `if test -f 'dwflpp.cxx'; then $(CYGPATH_W) 'dwflpp.cxx'; else $(CYGPATH_W) '$(srcdir)/dwflpp.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-dwflpp.Tpo $(DEPDIR)/stap-dwflpp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dwflpp.cxx' object='stap-dwflpp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-dwflpp.obj `if test -f 'dwflpp.cxx'; then $(CYGPATH_W) 'dwflpp.cxx'; else $(CYGPATH_W) '$(srcdir)/dwflpp.cxx'; fi` stap-rpm_finder.o: rpm_finder.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-rpm_finder.o -MD -MP -MF $(DEPDIR)/stap-rpm_finder.Tpo -c -o stap-rpm_finder.o `test -f 'rpm_finder.cxx' || echo '$(srcdir)/'`rpm_finder.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-rpm_finder.Tpo $(DEPDIR)/stap-rpm_finder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rpm_finder.cxx' object='stap-rpm_finder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-rpm_finder.o `test -f 'rpm_finder.cxx' || echo '$(srcdir)/'`rpm_finder.cxx stap-rpm_finder.obj: rpm_finder.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-rpm_finder.obj -MD -MP -MF $(DEPDIR)/stap-rpm_finder.Tpo -c -o stap-rpm_finder.obj `if test -f 'rpm_finder.cxx'; then $(CYGPATH_W) 'rpm_finder.cxx'; else $(CYGPATH_W) '$(srcdir)/rpm_finder.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-rpm_finder.Tpo $(DEPDIR)/stap-rpm_finder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rpm_finder.cxx' object='stap-rpm_finder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-rpm_finder.obj `if test -f 'rpm_finder.cxx'; then $(CYGPATH_W) 'rpm_finder.cxx'; else $(CYGPATH_W) '$(srcdir)/rpm_finder.cxx'; fi` stap-setupdwfl.o: setupdwfl.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-setupdwfl.o -MD -MP -MF $(DEPDIR)/stap-setupdwfl.Tpo -c -o stap-setupdwfl.o `test -f 'setupdwfl.cxx' || echo '$(srcdir)/'`setupdwfl.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-setupdwfl.Tpo $(DEPDIR)/stap-setupdwfl.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='setupdwfl.cxx' object='stap-setupdwfl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-setupdwfl.o `test -f 'setupdwfl.cxx' || echo '$(srcdir)/'`setupdwfl.cxx stap-setupdwfl.obj: setupdwfl.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-setupdwfl.obj -MD -MP -MF $(DEPDIR)/stap-setupdwfl.Tpo -c -o stap-setupdwfl.obj `if test -f 'setupdwfl.cxx'; then $(CYGPATH_W) 'setupdwfl.cxx'; else $(CYGPATH_W) '$(srcdir)/setupdwfl.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-setupdwfl.Tpo $(DEPDIR)/stap-setupdwfl.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='setupdwfl.cxx' object='stap-setupdwfl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-setupdwfl.obj `if test -f 'setupdwfl.cxx'; then $(CYGPATH_W) 'setupdwfl.cxx'; else $(CYGPATH_W) '$(srcdir)/setupdwfl.cxx'; fi` stap-remote.o: remote.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-remote.o -MD -MP -MF $(DEPDIR)/stap-remote.Tpo -c -o stap-remote.o `test -f 'remote.cxx' || echo '$(srcdir)/'`remote.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-remote.Tpo $(DEPDIR)/stap-remote.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='remote.cxx' object='stap-remote.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-remote.o `test -f 'remote.cxx' || echo '$(srcdir)/'`remote.cxx stap-remote.obj: remote.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-remote.obj -MD -MP -MF $(DEPDIR)/stap-remote.Tpo -c -o stap-remote.obj `if test -f 'remote.cxx'; then $(CYGPATH_W) 'remote.cxx'; else $(CYGPATH_W) '$(srcdir)/remote.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-remote.Tpo $(DEPDIR)/stap-remote.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='remote.cxx' object='stap-remote.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-remote.obj `if test -f 'remote.cxx'; then $(CYGPATH_W) 'remote.cxx'; else $(CYGPATH_W) '$(srcdir)/remote.cxx'; fi` stap-privilege.o: privilege.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-privilege.o -MD -MP -MF $(DEPDIR)/stap-privilege.Tpo -c -o stap-privilege.o `test -f 'privilege.cxx' || echo '$(srcdir)/'`privilege.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-privilege.Tpo $(DEPDIR)/stap-privilege.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='privilege.cxx' object='stap-privilege.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-privilege.o `test -f 'privilege.cxx' || echo '$(srcdir)/'`privilege.cxx stap-privilege.obj: privilege.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-privilege.obj -MD -MP -MF $(DEPDIR)/stap-privilege.Tpo -c -o stap-privilege.obj `if test -f 'privilege.cxx'; then $(CYGPATH_W) 'privilege.cxx'; else $(CYGPATH_W) '$(srcdir)/privilege.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-privilege.Tpo $(DEPDIR)/stap-privilege.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='privilege.cxx' object='stap-privilege.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-privilege.obj `if test -f 'privilege.cxx'; then $(CYGPATH_W) 'privilege.cxx'; else $(CYGPATH_W) '$(srcdir)/privilege.cxx'; fi` stap-cmdline.o: cmdline.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-cmdline.o -MD -MP -MF $(DEPDIR)/stap-cmdline.Tpo -c -o stap-cmdline.o `test -f 'cmdline.cxx' || echo '$(srcdir)/'`cmdline.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-cmdline.Tpo $(DEPDIR)/stap-cmdline.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cmdline.cxx' object='stap-cmdline.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-cmdline.o `test -f 'cmdline.cxx' || echo '$(srcdir)/'`cmdline.cxx stap-cmdline.obj: cmdline.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-cmdline.obj -MD -MP -MF $(DEPDIR)/stap-cmdline.Tpo -c -o stap-cmdline.obj `if test -f 'cmdline.cxx'; then $(CYGPATH_W) 'cmdline.cxx'; else $(CYGPATH_W) '$(srcdir)/cmdline.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-cmdline.Tpo $(DEPDIR)/stap-cmdline.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cmdline.cxx' object='stap-cmdline.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-cmdline.obj `if test -f 'cmdline.cxx'; then $(CYGPATH_W) 'cmdline.cxx'; else $(CYGPATH_W) '$(srcdir)/cmdline.cxx'; fi` stap-tapset-dynprobe.o: tapset-dynprobe.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-dynprobe.o -MD -MP -MF $(DEPDIR)/stap-tapset-dynprobe.Tpo -c -o stap-tapset-dynprobe.o `test -f 'tapset-dynprobe.cxx' || echo '$(srcdir)/'`tapset-dynprobe.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-dynprobe.Tpo $(DEPDIR)/stap-tapset-dynprobe.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-dynprobe.cxx' object='stap-tapset-dynprobe.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-dynprobe.o `test -f 'tapset-dynprobe.cxx' || echo '$(srcdir)/'`tapset-dynprobe.cxx stap-tapset-dynprobe.obj: tapset-dynprobe.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-dynprobe.obj -MD -MP -MF $(DEPDIR)/stap-tapset-dynprobe.Tpo -c -o stap-tapset-dynprobe.obj `if test -f 'tapset-dynprobe.cxx'; then $(CYGPATH_W) 'tapset-dynprobe.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-dynprobe.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-dynprobe.Tpo $(DEPDIR)/stap-tapset-dynprobe.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-dynprobe.cxx' object='stap-tapset-dynprobe.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-dynprobe.obj `if test -f 'tapset-dynprobe.cxx'; then $(CYGPATH_W) 'tapset-dynprobe.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-dynprobe.cxx'; fi` stap-tapset-method.o: tapset-method.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-method.o -MD -MP -MF $(DEPDIR)/stap-tapset-method.Tpo -c -o stap-tapset-method.o `test -f 'tapset-method.cxx' || echo '$(srcdir)/'`tapset-method.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-method.Tpo $(DEPDIR)/stap-tapset-method.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-method.cxx' object='stap-tapset-method.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-method.o `test -f 'tapset-method.cxx' || echo '$(srcdir)/'`tapset-method.cxx stap-tapset-method.obj: tapset-method.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-method.obj -MD -MP -MF $(DEPDIR)/stap-tapset-method.Tpo -c -o stap-tapset-method.obj `if test -f 'tapset-method.cxx'; then $(CYGPATH_W) 'tapset-method.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-method.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-tapset-method.Tpo $(DEPDIR)/stap-tapset-method.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tapset-method.cxx' object='stap-tapset-method.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-method.obj `if test -f 'tapset-method.cxx'; then $(CYGPATH_W) 'tapset-method.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-method.cxx'; fi` stap-translator-output.o: translator-output.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-translator-output.o -MD -MP -MF $(DEPDIR)/stap-translator-output.Tpo -c -o stap-translator-output.o `test -f 'translator-output.cxx' || echo '$(srcdir)/'`translator-output.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-translator-output.Tpo $(DEPDIR)/stap-translator-output.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='translator-output.cxx' object='stap-translator-output.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-translator-output.o `test -f 'translator-output.cxx' || echo '$(srcdir)/'`translator-output.cxx stap-translator-output.obj: translator-output.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-translator-output.obj -MD -MP -MF $(DEPDIR)/stap-translator-output.Tpo -c -o stap-translator-output.obj `if test -f 'translator-output.cxx'; then $(CYGPATH_W) 'translator-output.cxx'; else $(CYGPATH_W) '$(srcdir)/translator-output.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-translator-output.Tpo $(DEPDIR)/stap-translator-output.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='translator-output.cxx' object='stap-translator-output.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-translator-output.obj `if test -f 'translator-output.cxx'; then $(CYGPATH_W) 'translator-output.cxx'; else $(CYGPATH_W) '$(srcdir)/translator-output.cxx'; fi` stap-stapregex.o: stapregex.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stapregex.o -MD -MP -MF $(DEPDIR)/stap-stapregex.Tpo -c -o stap-stapregex.o `test -f 'stapregex.cxx' || echo '$(srcdir)/'`stapregex.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stapregex.Tpo $(DEPDIR)/stap-stapregex.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stapregex.cxx' object='stap-stapregex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stapregex.o `test -f 'stapregex.cxx' || echo '$(srcdir)/'`stapregex.cxx stap-stapregex.obj: stapregex.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stapregex.obj -MD -MP -MF $(DEPDIR)/stap-stapregex.Tpo -c -o stap-stapregex.obj `if test -f 'stapregex.cxx'; then $(CYGPATH_W) 'stapregex.cxx'; else $(CYGPATH_W) '$(srcdir)/stapregex.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stapregex.Tpo $(DEPDIR)/stap-stapregex.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stapregex.cxx' object='stap-stapregex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stapregex.obj `if test -f 'stapregex.cxx'; then $(CYGPATH_W) 'stapregex.cxx'; else $(CYGPATH_W) '$(srcdir)/stapregex.cxx'; fi` stap-stapregex-tree.o: stapregex-tree.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stapregex-tree.o -MD -MP -MF $(DEPDIR)/stap-stapregex-tree.Tpo -c -o stap-stapregex-tree.o `test -f 'stapregex-tree.cxx' || echo '$(srcdir)/'`stapregex-tree.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stapregex-tree.Tpo $(DEPDIR)/stap-stapregex-tree.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stapregex-tree.cxx' object='stap-stapregex-tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stapregex-tree.o `test -f 'stapregex-tree.cxx' || echo '$(srcdir)/'`stapregex-tree.cxx stap-stapregex-tree.obj: stapregex-tree.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stapregex-tree.obj -MD -MP -MF $(DEPDIR)/stap-stapregex-tree.Tpo -c -o stap-stapregex-tree.obj `if test -f 'stapregex-tree.cxx'; then $(CYGPATH_W) 'stapregex-tree.cxx'; else $(CYGPATH_W) '$(srcdir)/stapregex-tree.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stapregex-tree.Tpo $(DEPDIR)/stap-stapregex-tree.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stapregex-tree.cxx' object='stap-stapregex-tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stapregex-tree.obj `if test -f 'stapregex-tree.cxx'; then $(CYGPATH_W) 'stapregex-tree.cxx'; else $(CYGPATH_W) '$(srcdir)/stapregex-tree.cxx'; fi` stap-stapregex-parse.o: stapregex-parse.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stapregex-parse.o -MD -MP -MF $(DEPDIR)/stap-stapregex-parse.Tpo -c -o stap-stapregex-parse.o `test -f 'stapregex-parse.cxx' || echo '$(srcdir)/'`stapregex-parse.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stapregex-parse.Tpo $(DEPDIR)/stap-stapregex-parse.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stapregex-parse.cxx' object='stap-stapregex-parse.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stapregex-parse.o `test -f 'stapregex-parse.cxx' || echo '$(srcdir)/'`stapregex-parse.cxx stap-stapregex-parse.obj: stapregex-parse.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stapregex-parse.obj -MD -MP -MF $(DEPDIR)/stap-stapregex-parse.Tpo -c -o stap-stapregex-parse.obj `if test -f 'stapregex-parse.cxx'; then $(CYGPATH_W) 'stapregex-parse.cxx'; else $(CYGPATH_W) '$(srcdir)/stapregex-parse.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stapregex-parse.Tpo $(DEPDIR)/stap-stapregex-parse.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stapregex-parse.cxx' object='stap-stapregex-parse.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stapregex-parse.obj `if test -f 'stapregex-parse.cxx'; then $(CYGPATH_W) 'stapregex-parse.cxx'; else $(CYGPATH_W) '$(srcdir)/stapregex-parse.cxx'; fi` stap-stapregex-dfa.o: stapregex-dfa.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stapregex-dfa.o -MD -MP -MF $(DEPDIR)/stap-stapregex-dfa.Tpo -c -o stap-stapregex-dfa.o `test -f 'stapregex-dfa.cxx' || echo '$(srcdir)/'`stapregex-dfa.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stapregex-dfa.Tpo $(DEPDIR)/stap-stapregex-dfa.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stapregex-dfa.cxx' object='stap-stapregex-dfa.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stapregex-dfa.o `test -f 'stapregex-dfa.cxx' || echo '$(srcdir)/'`stapregex-dfa.cxx stap-stapregex-dfa.obj: stapregex-dfa.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stapregex-dfa.obj -MD -MP -MF $(DEPDIR)/stap-stapregex-dfa.Tpo -c -o stap-stapregex-dfa.obj `if test -f 'stapregex-dfa.cxx'; then $(CYGPATH_W) 'stapregex-dfa.cxx'; else $(CYGPATH_W) '$(srcdir)/stapregex-dfa.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stapregex-dfa.Tpo $(DEPDIR)/stap-stapregex-dfa.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stapregex-dfa.cxx' object='stap-stapregex-dfa.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stapregex-dfa.obj `if test -f 'stapregex-dfa.cxx'; then $(CYGPATH_W) 'stapregex-dfa.cxx'; else $(CYGPATH_W) '$(srcdir)/stapregex-dfa.cxx'; fi` stap-stringtable.o: stringtable.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stringtable.o -MD -MP -MF $(DEPDIR)/stap-stringtable.Tpo -c -o stap-stringtable.o `test -f 'stringtable.cxx' || echo '$(srcdir)/'`stringtable.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stringtable.Tpo $(DEPDIR)/stap-stringtable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringtable.cxx' object='stap-stringtable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stringtable.o `test -f 'stringtable.cxx' || echo '$(srcdir)/'`stringtable.cxx stap-stringtable.obj: stringtable.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-stringtable.obj -MD -MP -MF $(DEPDIR)/stap-stringtable.Tpo -c -o stap-stringtable.obj `if test -f 'stringtable.cxx'; then $(CYGPATH_W) 'stringtable.cxx'; else $(CYGPATH_W) '$(srcdir)/stringtable.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stringtable.Tpo $(DEPDIR)/stap-stringtable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringtable.cxx' object='stap-stringtable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-stringtable.obj `if test -f 'stringtable.cxx'; then $(CYGPATH_W) 'stringtable.cxx'; else $(CYGPATH_W) '$(srcdir)/stringtable.cxx'; fi` stap-nsscommon.o: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-nsscommon.o -MD -MP -MF $(DEPDIR)/stap-nsscommon.Tpo -c -o stap-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-nsscommon.Tpo $(DEPDIR)/stap-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap-nsscommon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx stap-nsscommon.obj: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap-nsscommon.Tpo -c -o stap-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-nsscommon.Tpo $(DEPDIR)/stap-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` stap-csclient.o: csclient.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-csclient.o -MD -MP -MF $(DEPDIR)/stap-csclient.Tpo -c -o stap-csclient.o `test -f 'csclient.cxx' || echo '$(srcdir)/'`csclient.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-csclient.Tpo $(DEPDIR)/stap-csclient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='csclient.cxx' object='stap-csclient.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-csclient.o `test -f 'csclient.cxx' || echo '$(srcdir)/'`csclient.cxx stap-csclient.obj: csclient.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-csclient.obj -MD -MP -MF $(DEPDIR)/stap-csclient.Tpo -c -o stap-csclient.obj `if test -f 'csclient.cxx'; then $(CYGPATH_W) 'csclient.cxx'; else $(CYGPATH_W) '$(srcdir)/csclient.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-csclient.Tpo $(DEPDIR)/stap-csclient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='csclient.cxx' object='stap-csclient.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-csclient.obj `if test -f 'csclient.cxx'; then $(CYGPATH_W) 'csclient.cxx'; else $(CYGPATH_W) '$(srcdir)/csclient.cxx'; fi` stap-cscommon.o: cscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-cscommon.o -MD -MP -MF $(DEPDIR)/stap-cscommon.Tpo -c -o stap-cscommon.o `test -f 'cscommon.cxx' || echo '$(srcdir)/'`cscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-cscommon.Tpo $(DEPDIR)/stap-cscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cscommon.cxx' object='stap-cscommon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-cscommon.o `test -f 'cscommon.cxx' || echo '$(srcdir)/'`cscommon.cxx stap-cscommon.obj: cscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-cscommon.obj -MD -MP -MF $(DEPDIR)/stap-cscommon.Tpo -c -o stap-cscommon.obj `if test -f 'cscommon.cxx'; then $(CYGPATH_W) 'cscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/cscommon.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-cscommon.Tpo $(DEPDIR)/stap-cscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cscommon.cxx' object='stap-cscommon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-cscommon.obj `if test -f 'cscommon.cxx'; then $(CYGPATH_W) 'cscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/cscommon.cxx'; fi` stap_authorize_cert-stap-authorize-cert.o: stap-authorize-cert.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-stap-authorize-cert.o -MD -MP -MF $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Tpo -c -o stap_authorize_cert-stap-authorize-cert.o `test -f 'stap-authorize-cert.cxx' || echo '$(srcdir)/'`stap-authorize-cert.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Tpo $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stap-authorize-cert.cxx' object='stap_authorize_cert-stap-authorize-cert.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-stap-authorize-cert.o `test -f 'stap-authorize-cert.cxx' || echo '$(srcdir)/'`stap-authorize-cert.cxx stap_authorize_cert-stap-authorize-cert.obj: stap-authorize-cert.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-stap-authorize-cert.obj -MD -MP -MF $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Tpo -c -o stap_authorize_cert-stap-authorize-cert.obj `if test -f 'stap-authorize-cert.cxx'; then $(CYGPATH_W) 'stap-authorize-cert.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-authorize-cert.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Tpo $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stap-authorize-cert.cxx' object='stap_authorize_cert-stap-authorize-cert.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-stap-authorize-cert.obj `if test -f 'stap-authorize-cert.cxx'; then $(CYGPATH_W) 'stap-authorize-cert.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-authorize-cert.cxx'; fi` stap_authorize_cert-nsscommon.o: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_authorize_cert-nsscommon.Tpo -c -o stap_authorize_cert-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-nsscommon.Tpo $(DEPDIR)/stap_authorize_cert-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap_authorize_cert-nsscommon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx stap_authorize_cert-nsscommon.obj: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_authorize_cert-nsscommon.Tpo -c -o stap_authorize_cert-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-nsscommon.Tpo $(DEPDIR)/stap_authorize_cert-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap_authorize_cert-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` stap_authorize_cert-util.o: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-util.o -MD -MP -MF $(DEPDIR)/stap_authorize_cert-util.Tpo -c -o stap_authorize_cert-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-util.Tpo $(DEPDIR)/stap_authorize_cert-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap_authorize_cert-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx stap_authorize_cert-util.obj: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-util.obj -MD -MP -MF $(DEPDIR)/stap_authorize_cert-util.Tpo -c -o stap_authorize_cert-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-util.Tpo $(DEPDIR)/stap_authorize_cert-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap_authorize_cert-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` stap_gen_cert-stap-gen-cert.o: stap-gen-cert.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-stap-gen-cert.o -MD -MP -MF $(DEPDIR)/stap_gen_cert-stap-gen-cert.Tpo -c -o stap_gen_cert-stap-gen-cert.o `test -f 'stap-gen-cert.cxx' || echo '$(srcdir)/'`stap-gen-cert.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-stap-gen-cert.Tpo $(DEPDIR)/stap_gen_cert-stap-gen-cert.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stap-gen-cert.cxx' object='stap_gen_cert-stap-gen-cert.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-stap-gen-cert.o `test -f 'stap-gen-cert.cxx' || echo '$(srcdir)/'`stap-gen-cert.cxx stap_gen_cert-stap-gen-cert.obj: stap-gen-cert.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-stap-gen-cert.obj -MD -MP -MF $(DEPDIR)/stap_gen_cert-stap-gen-cert.Tpo -c -o stap_gen_cert-stap-gen-cert.obj `if test -f 'stap-gen-cert.cxx'; then $(CYGPATH_W) 'stap-gen-cert.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-gen-cert.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-stap-gen-cert.Tpo $(DEPDIR)/stap_gen_cert-stap-gen-cert.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stap-gen-cert.cxx' object='stap_gen_cert-stap-gen-cert.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-stap-gen-cert.obj `if test -f 'stap-gen-cert.cxx'; then $(CYGPATH_W) 'stap-gen-cert.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-gen-cert.cxx'; fi` stap_gen_cert-util.o: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-util.o -MD -MP -MF $(DEPDIR)/stap_gen_cert-util.Tpo -c -o stap_gen_cert-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-util.Tpo $(DEPDIR)/stap_gen_cert-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap_gen_cert-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx stap_gen_cert-util.obj: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-util.obj -MD -MP -MF $(DEPDIR)/stap_gen_cert-util.Tpo -c -o stap_gen_cert-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-util.Tpo $(DEPDIR)/stap_gen_cert-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap_gen_cert-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` stap_gen_cert-nsscommon.o: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_gen_cert-nsscommon.Tpo -c -o stap_gen_cert-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-nsscommon.Tpo $(DEPDIR)/stap_gen_cert-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap_gen_cert-nsscommon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx stap_gen_cert-nsscommon.obj: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_gen_cert-nsscommon.Tpo -c -o stap_gen_cert-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-nsscommon.Tpo $(DEPDIR)/stap_gen_cert-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap_gen_cert-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` stap_serverd-stap-serverd.o: stap-serverd.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-stap-serverd.o -MD -MP -MF $(DEPDIR)/stap_serverd-stap-serverd.Tpo -c -o stap_serverd-stap-serverd.o `test -f 'stap-serverd.cxx' || echo '$(srcdir)/'`stap-serverd.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-stap-serverd.Tpo $(DEPDIR)/stap_serverd-stap-serverd.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stap-serverd.cxx' object='stap_serverd-stap-serverd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-stap-serverd.o `test -f 'stap-serverd.cxx' || echo '$(srcdir)/'`stap-serverd.cxx stap_serverd-stap-serverd.obj: stap-serverd.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-stap-serverd.obj -MD -MP -MF $(DEPDIR)/stap_serverd-stap-serverd.Tpo -c -o stap_serverd-stap-serverd.obj `if test -f 'stap-serverd.cxx'; then $(CYGPATH_W) 'stap-serverd.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-serverd.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-stap-serverd.Tpo $(DEPDIR)/stap_serverd-stap-serverd.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stap-serverd.cxx' object='stap_serverd-stap-serverd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-stap-serverd.obj `if test -f 'stap-serverd.cxx'; then $(CYGPATH_W) 'stap-serverd.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-serverd.cxx'; fi` stap_serverd-cscommon.o: cscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-cscommon.o -MD -MP -MF $(DEPDIR)/stap_serverd-cscommon.Tpo -c -o stap_serverd-cscommon.o `test -f 'cscommon.cxx' || echo '$(srcdir)/'`cscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-cscommon.Tpo $(DEPDIR)/stap_serverd-cscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cscommon.cxx' object='stap_serverd-cscommon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-cscommon.o `test -f 'cscommon.cxx' || echo '$(srcdir)/'`cscommon.cxx stap_serverd-cscommon.obj: cscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-cscommon.obj -MD -MP -MF $(DEPDIR)/stap_serverd-cscommon.Tpo -c -o stap_serverd-cscommon.obj `if test -f 'cscommon.cxx'; then $(CYGPATH_W) 'cscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/cscommon.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-cscommon.Tpo $(DEPDIR)/stap_serverd-cscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cscommon.cxx' object='stap_serverd-cscommon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-cscommon.obj `if test -f 'cscommon.cxx'; then $(CYGPATH_W) 'cscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/cscommon.cxx'; fi` stap_serverd-util.o: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-util.o -MD -MP -MF $(DEPDIR)/stap_serverd-util.Tpo -c -o stap_serverd-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-util.Tpo $(DEPDIR)/stap_serverd-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap_serverd-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx stap_serverd-util.obj: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-util.obj -MD -MP -MF $(DEPDIR)/stap_serverd-util.Tpo -c -o stap_serverd-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-util.Tpo $(DEPDIR)/stap_serverd-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap_serverd-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` stap_serverd-privilege.o: privilege.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-privilege.o -MD -MP -MF $(DEPDIR)/stap_serverd-privilege.Tpo -c -o stap_serverd-privilege.o `test -f 'privilege.cxx' || echo '$(srcdir)/'`privilege.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-privilege.Tpo $(DEPDIR)/stap_serverd-privilege.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='privilege.cxx' object='stap_serverd-privilege.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-privilege.o `test -f 'privilege.cxx' || echo '$(srcdir)/'`privilege.cxx stap_serverd-privilege.obj: privilege.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-privilege.obj -MD -MP -MF $(DEPDIR)/stap_serverd-privilege.Tpo -c -o stap_serverd-privilege.obj `if test -f 'privilege.cxx'; then $(CYGPATH_W) 'privilege.cxx'; else $(CYGPATH_W) '$(srcdir)/privilege.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-privilege.Tpo $(DEPDIR)/stap_serverd-privilege.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='privilege.cxx' object='stap_serverd-privilege.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-privilege.obj `if test -f 'privilege.cxx'; then $(CYGPATH_W) 'privilege.cxx'; else $(CYGPATH_W) '$(srcdir)/privilege.cxx'; fi` stap_serverd-nsscommon.o: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_serverd-nsscommon.Tpo -c -o stap_serverd-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-nsscommon.Tpo $(DEPDIR)/stap_serverd-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap_serverd-nsscommon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx stap_serverd-nsscommon.obj: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_serverd-nsscommon.Tpo -c -o stap_serverd-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-nsscommon.Tpo $(DEPDIR)/stap_serverd-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap_serverd-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` stap_serverd-cmdline.o: cmdline.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-cmdline.o -MD -MP -MF $(DEPDIR)/stap_serverd-cmdline.Tpo -c -o stap_serverd-cmdline.o `test -f 'cmdline.cxx' || echo '$(srcdir)/'`cmdline.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-cmdline.Tpo $(DEPDIR)/stap_serverd-cmdline.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cmdline.cxx' object='stap_serverd-cmdline.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-cmdline.o `test -f 'cmdline.cxx' || echo '$(srcdir)/'`cmdline.cxx stap_serverd-cmdline.obj: cmdline.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-cmdline.obj -MD -MP -MF $(DEPDIR)/stap_serverd-cmdline.Tpo -c -o stap_serverd-cmdline.obj `if test -f 'cmdline.cxx'; then $(CYGPATH_W) 'cmdline.cxx'; else $(CYGPATH_W) '$(srcdir)/cmdline.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-cmdline.Tpo $(DEPDIR)/stap_serverd-cmdline.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cmdline.cxx' object='stap_serverd-cmdline.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-cmdline.obj `if test -f 'cmdline.cxx'; then $(CYGPATH_W) 'cmdline.cxx'; else $(CYGPATH_W) '$(srcdir)/cmdline.cxx'; fi` stap_sign_module-stap-sign-module.o: stap-sign-module.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-stap-sign-module.o -MD -MP -MF $(DEPDIR)/stap_sign_module-stap-sign-module.Tpo -c -o stap_sign_module-stap-sign-module.o `test -f 'stap-sign-module.cxx' || echo '$(srcdir)/'`stap-sign-module.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-stap-sign-module.Tpo $(DEPDIR)/stap_sign_module-stap-sign-module.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stap-sign-module.cxx' object='stap_sign_module-stap-sign-module.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-stap-sign-module.o `test -f 'stap-sign-module.cxx' || echo '$(srcdir)/'`stap-sign-module.cxx stap_sign_module-stap-sign-module.obj: stap-sign-module.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-stap-sign-module.obj -MD -MP -MF $(DEPDIR)/stap_sign_module-stap-sign-module.Tpo -c -o stap_sign_module-stap-sign-module.obj `if test -f 'stap-sign-module.cxx'; then $(CYGPATH_W) 'stap-sign-module.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-sign-module.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-stap-sign-module.Tpo $(DEPDIR)/stap_sign_module-stap-sign-module.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stap-sign-module.cxx' object='stap_sign_module-stap-sign-module.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-stap-sign-module.obj `if test -f 'stap-sign-module.cxx'; then $(CYGPATH_W) 'stap-sign-module.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-sign-module.cxx'; fi` stap_sign_module-nsscommon.o: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_sign_module-nsscommon.Tpo -c -o stap_sign_module-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-nsscommon.Tpo $(DEPDIR)/stap_sign_module-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap_sign_module-nsscommon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx stap_sign_module-nsscommon.obj: nsscommon.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_sign_module-nsscommon.Tpo -c -o stap_sign_module-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-nsscommon.Tpo $(DEPDIR)/stap_sign_module-nsscommon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nsscommon.cxx' object='stap_sign_module-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` stap_sign_module-util.o: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-util.o -MD -MP -MF $(DEPDIR)/stap_sign_module-util.Tpo -c -o stap_sign_module-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-util.Tpo $(DEPDIR)/stap_sign_module-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap_sign_module-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx stap_sign_module-util.obj: util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-util.obj -MD -MP -MF $(DEPDIR)/stap_sign_module-util.Tpo -c -o stap_sign_module-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-util.Tpo $(DEPDIR)/stap_sign_module-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cxx' object='stap_sign_module-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` install-oldincludeHEADERS: $(oldinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(oldinclude_HEADERS)'; test -n "$(oldincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(oldincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(oldincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(oldincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(oldincludedir)" || exit $$?; \ done uninstall-oldincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(oldinclude_HEADERS)'; test -n "$(oldincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(oldincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(HEADERS) config.h all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(oldincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) @BUILD_CRASHMOD_FALSE@@BUILD_ELFUTILS_FALSE@@HAVE_NSS_FALSE@install-exec-local: @BUILD_CRASHMOD_FALSE@@BUILD_TRANSLATOR_FALSE@install-exec-local: clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-local \ clean-noinstPROGRAMS clean-pkglibexecPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-local distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-oldincludeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS \ install-exec-local install-pkglibexecPROGRAMS \ install-pkglibexecSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-local uninstall-oldincludeHEADERS \ uninstall-pkglibexecPROGRAMS uninstall-pkglibexecSCRIPTS .MAKE: $(am__recursive_targets) all check check-am install install-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--refresh check check-am check-local clean clean-binPROGRAMS \ clean-cscope clean-generic clean-local clean-noinstPROGRAMS \ clean-pkglibexecPROGRAMS cscope cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-hdr \ distclean-local distclean-tags dvi dvi-am html html-am info \ info-am install install-am install-binPROGRAMS \ install-binSCRIPTS install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-exec-local install-html \ install-html-am install-info install-info-am install-man \ install-oldincludeHEADERS install-pdf install-pdf-am \ install-pkglibexecPROGRAMS install-pkglibexecSCRIPTS \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-local uninstall-oldincludeHEADERS \ uninstall-pkglibexecPROGRAMS uninstall-pkglibexecSCRIPTS install: all $(MAKE) $(AM_MAKEFLAGS) install-recursive git_version.stamp: @if test -f "$(srcdir)/git_version.h"; then \ if test -f "git_version.h"; then :; \ else \ cp "$(srcdir)/git_version.h" "git_version.h"; \ fi; \ fi $(GIT_VERSION_CMD) -k -s $(top_srcdir) -o git_version.h @if test -s "$(srcdir)/git_version.h"; then \ if cmp "$(srcdir)/git_version.h" "git_version.h"; then :; \ else \ echo "Error: $(srcdir)/git_version.h and git_version.h differ."; \ echo " You probably want to remove the former."; \ exit 1; \ fi; \ fi git_version.h: $(srcdir)/git_version.sh -k --srcdir $(srcdir) -o git_version.h cscope: cd $(srcdir) && \ (echo -q ; git ls-files '*.cxx' '*.c' '*.h' | grep -v '^testsuite' ) > cscope.files && \ cscope -b -q @DYNINST_CXXFLAGS@ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@install-exec-local: install-scripts # scripts must be installed before this rule is run @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@install-scripts: install-binSCRIPTS install-pkglibexecSCRIPTS @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ for f in $(bin_SCRIPTS); do \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ sed -i -e "s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(bindir)/$$f; \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ done @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ for f in $(pkglibexec_SCRIPTS); do \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ sed -i -e "/INSTALL-HOOK/d;s,sysconfdir=.*,sysconfdir=$(sysconfdir),;s,pkglibexecdir=.*,pkglibexecdir=$(pkglibexecdir)/,;s,localstatedir=.*,localstatedir=$(localstatedir),;s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(pkglibexecdir)/$$f; \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ done @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@stamp-elfutils: config.status @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils all bin_PROGRAMS= @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ for dir in libelf libebl libdw libdwfl backends; do \ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils/$$dir bin_PROGRAMS= install; \ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ done @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils install-pkgincludeHEADERS; @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ touch $@ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@lib-elfutils/libdw.so: stamp-elfutils ; @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@install-elfutils: @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ mkdir -p $(DESTDIR)$(pkglibdir) @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ for file in lib-elfutils/*.so* lib-elfutils/${PACKAGE_NAME}/*.so*; do \ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(pkglibdir); \ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ done @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@install-exec-local: install-elfutils @BUILD_CRASHMOD_TRUE@$(STAPLOG): staplog.c @BUILD_CRASHMOD_TRUE@ $(CC) $(staplog_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -shared -rdynamic \ @BUILD_CRASHMOD_TRUE@ $(AM_LDFLAGS) $(LDFLAGS) -fPIC -o $@ $< @BUILD_CRASHMOD_TRUE@all-local: $(STAPLOG) example_index @BUILD_CRASHMOD_TRUE@install-exec-local: $(STAPLOG) @BUILD_CRASHMOD_TRUE@ $(MKDIR_P) $(DESTDIR)$(pkglibdir) @BUILD_CRASHMOD_TRUE@ $(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir) @BUILD_CRASHMOD_FALSE@all-local: example_index example_index: $(EXAMPLE_SOURCE_DIR)/index.html $(EXAMPLE_SOURCE_DIR)/index.html: $(EXAMPLE_META_FILES) $(EXAMPLE_INDEX_GEN) @echo "The script example index is outdated, run" @echo " cd $(EXAMPLE_SOURCE_DIR) && \\ " @echo " perl examples-index-gen.pl" @echo "to regenerate it." install-data-local: (cd $(srcdir)/runtime; for f in *.[ch]; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/$$f; done) @HAVE_DYNINST_TRUE@ (cd $(srcdir)/runtime/dyninst; find . \( -name '*.[ch]' \) -print \ @HAVE_DYNINST_TRUE@ | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/dyninst/$$f; done) (cd $(srcdir)/runtime/unwind; find . \( -name '*.[ch]' \) -print \ | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/unwind/$$f; done) (cd $(srcdir)/runtime/transport; for f in *.[ch]; \ do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/transport/$$f; done) (cd $(srcdir)/runtime/linux; for f in *.[ch]; \ do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/$$f; done) (cd $(srcdir)/runtime/linux/uprobes; for f in Makefile *.[ch]; \ do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/uprobes/$$f; done) (cd $(srcdir)/runtime/linux/uprobes2; for f in *.[ch]; \ do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/uprobes2/$$f; done) (cd $(srcdir)/tapset; find . \( -name '*.stp' -o -name '*.stpm' -o -name README \) -print \ | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/tapset/$$f; done) (cd $(srcdir)/testsuite/systemtap.examples; find . -type f -print \ | egrep -v 'check.exp|ChangeLog|examples-index-gen.pl|html/.*\.tmpl$$' \ | while read f; do if test -x $$f; then \ i_cmd="$(INSTALL_PROGRAM)"; else \ i_cmd="$(INSTALL_DATA)"; fi; \ $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done) test -e $(DESTDIR)$(sysconfdir)/systemtap || mkdir -p $(DESTDIR)$(sysconfdir)/systemtap @BUILD_SERVER_TRUE@ test -e $(DESTDIR)$(localstatedir)/run/stap-server || mkdir -p $(DESTDIR)$(localstatedir)/run/stap-server @BUILD_SERVER_TRUE@ test -e $(DESTDIR)$(localstatedir)/log || mkdir -p $(DESTDIR)$(localstatedir)/log gcov: find . -name '*.gc*' | xargs rm -f $(MAKE) clean CXXFLAGS="-g -fprofile-arcs -ftest-coverage" CFLAGS="-g -fprofile-arcs -ftest-coverage" all install -sudo $(MAKE) installcheck $${RUNTESTFLAGS+RUNTESTFLAGS=$${RUNTESTFLAGS}} for dir in $(SUBDIRS); do \ (cd $$dir; gcov *.gcno > SUMMARY.gcov 2>&1 || true); \ done find . -name '*.gcov' clean-local: rm -rf ${PACKAGE_TARNAME}-*.tar.gz rm -rf ${PACKAGE_TARNAME}-${PACKAGE_VERSION} rm -rf $(TEST_COV_DIR) rm -rf stap.info rm -rf staplog.so distclean-local: rm -rf build-elfutils include-elfutils lib-elfutils rm -f doc/beginners/en-US doc/beginners/build/en-US/testsuite uninstall-local: rm -rf $(DESTDIR)$(pkgdatadir) rm -rf $(DESTDIR)$(libdir)/$(PACKAGE) -rm -rf $(DESTDIR)$(localstatedir)/cache/$(PACKAGE) @list='$(EXAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \ echo " rm -f '$(EXAMPLE_INSTALL_DIR)/$$p'"; \ rm -f "$(EXAMPLE_INSTALL_DIR)/$$p"; \ done @list='$(DEMO_SRC)'; for f in $$list; do p=`basename $$f`; \ echo " rm -f '$(DEMO_INSTALL_DIR)/$$p'"; \ rm -f "$(DEMO_INSTALL_DIR)/$$p"; \ done @list='$(SAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \ echo " rm -f '$(SAMPLE_INSTALL_DIR)/$$p'"; \ rm -f "$(SAMPLE_INSTALL_DIR)/$$p"; \ done rm -rf $(DESTDIR)$(sysconfdir)/systemtap rm -rf $(DESTDIR)$(docdir)/examples @BUILD_SERVER_TRUE@ rm -rf $(DESTDIR)$(localstatedir)/run/stap-server @BUILD_SERVER_TRUE@ rm -f $(DESTDIR)$(localstatedir)/log/stap-server/log check-local: SRCDIR=`cd $(srcdir); pwd`; \ PWD=`pwd`; \ $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$$LD_LIBRARY_PATH$${LD_LIBRARY_PATH:+:}$$PWD/lib-elfutils:$$PWD/lib-elfutils/systemtap SYSTEMTAP_PATH=$$PWD SYSTEMTAP_INCLUDES=$$PWD/includes RUNTESTFLAGS="$(RUNTESTFLAGS)" PKGLIBDIR="$(pkglibexecdir)"; installcheck: if test \! -e $(DESTDIR)$(bindir)/stap; then \ echo $(DESTDIR)$(bindir)/stap doesn\'t exist, run make install; \ exit -1; \ fi; \ if test $(builddir)/stap -nt $(DESTDIR)$(bindir)/stap; then \ echo "$(DESTDIR)$(bindir)/stap is not recent, run make install"; \ exit -1; \ fi; $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)" # All the variables are overridden by run-stap, but SYSTEMTAP_RUNTIME # is used by the testsuite scripts themselves. runcheck: testsuite/stap testsuite/dtrace $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)" \ SYSTEMTAP_PATH="`cd testsuite; pwd`" \ SYSTEMTAP_RUNTIME="`cd $(srcdir)/runtime; pwd`" testsuite/stap: run-stap (echo '#!/bin/sh'; echo "exec `pwd`/run-stap" '$${1+"$$@"}') > $@.new chmod 555 $@.new mv -f $@.new $@ testsuite/dtrace: dtrace (echo '#!/bin/sh'; echo "exec `pwd`/dtrace" '$${1+"$$@"}') > $@.new chmod 555 $@.new mv -f $@.new $@ update-po: (cd $(srcdir); ls -1d *.c *.cxx *.h staprun/*.c staprun/*.h) \ | grep -v loc2c-test.c \ | grep -v config.h \ | grep -v git_version.h \ | grep -v staprun/config.h \ | sort > $(srcdir)/po/POTFILES.in $(MAKE) -C po update-po @echo @echo if systemtam.pot is shown as modified ... @echo (cd $(srcdir)/po; git status *.pot) @echo @echo ... then check in with zanata ... @echo @echo % cd $(srcdir) @echo % zanata-cli -B push -s po -t po @echo % zanata-cli -B pull -s po -t po @echo @echo if the .po files are shown as modified ... @echo (cd $(srcdir)/po; git status *.po) @echo @echo ... regenerate just once ... @echo @echo % $(MAKE) -C `pwd` update-po uprobes: $(MAKE) -C $(srcdir)/runtime/uprobes clean default install-uprobes: $(MAKE) -C $(DESTDIR)$(pkgdatadir)/runtime/uprobes clean default .PHONY: $(PHONIES) dist-gzip: cd $(srcdir); git status | grep working.directory.clean || (echo "You should commit your changes before 'make rpm'.") (cd $(srcdir); git archive --prefix=systemtap-$(VERSION)/ --format=tar HEAD) | gzip > systemtap-$(VERSION).tar.gz rpm: dist-gzip if [ `id -u` = 0 ]; then echo NOTE: do not run this as root; exit 1; fi if [ ! -w `rpm --eval %_topdir` ]; then \ echo WARNING: you do not have access to `rpm --eval %_topdir`; \ echo WARNING: you may receive a permission denied error; \ echo WARNING: consider adding \'%_topdir $(HOME)/rpmbuild\' to $(HOME)/.rpmmacros; \ fi mkdir -p `rpm --eval %_specdir` mkdir -p `rpm --eval %_srcrpmdir` mkdir -p `rpm --eval %_rpmdir` mkdir -p `rpm --eval %_builddir` mkdir -p `rpm --eval %_buildroot` rpmbuild --define "_sourcedir $(PWD)/" -ta systemtap-$(VERSION).tar.gz $(RPMBUILDFLAGS) srpm: dist-gzip mkdir -p `rpm --eval %_srcrpmdir` rpmbuild --define "_sourcedir $(PWD)/" -ts systemtap-$(VERSION).tar.gz $(RPMBUILDFLAGS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: systemtap-2.9/NEWS000066400000000000000000003066741260561570600141440ustar00rootroot00000000000000* What's new in version 2.9, 2015-10-08 - SystemTap now uses symbols from /proc/kallsyms when kernel debuginfo is not available. - New --prologue-searching[=WHEN] option has been added to stap with '-P' being its short counterpart. Using --prologue-searching=never turns prologue searching deliberately off working around issue of int_arg() returning wrong value when a 32-bit userspace binary having debug info is being probed with active prologue searching (PR18649). - The powerpc variant of nd_syscall.compat_sysctl got deprecated on favor of nd_syscall.sysctl32. This aligns the nd_syscall to its respective syscall and to ia64/s390/x86_64 variants too. - New tapset function assert(expression, msg) has been added. - Embedded-C functions may now use the new STAP_PRINTF(fmt, ...) macro for output. - New tapset functions fullname_struct_path and fullname_struct_nameidata resolve full path names from internal kernel struct pointers. - New tapset functions arch_bytes() and uarch_bytes() to obtain address size for kernel and user space respectively. - New tapset function switch_file() allows control over rotation of output files. - The [nd_]syscall tapset got autodocumented. Related paragraph got added to PDF and HTML tapset reference. Also a new tapset::syscall 3stap man page got added. - Embedded-C functions with parameter arity-0 can now be marked with the /* stable */ /* pure */ pragmas, if (roughly speaking) the function is side-effect-free and idempotent. The translator may execute these speculatively and have their results memoized. This lets probes with multiple calls to such functions run faster. Context variable ($foo) getter functions (in non-guru mode), and numerous tapset functions are now marked as /* stable */ /* pure */. Several example scripts have been modified to eschew explicit memoization. - Callee probe points now support '.return' and '.call' suffix. For example, process("proc").function("foo").callee("bar").return will fire upon returning from bar when called by foo. process("proc").function("foo").callee("bar").call will only fire for non-inlined callees. - The following tapset variables and functions are deprecated in version 2.9: - The '__int32_compat' library macro got deprecated in favor of new '__compat_long' library macro. - The 'uargs' convenience variable of the 'seccomp' syscall probe got deprecated in favor of new 'uargs_uaddr' variable. - SystemTap has reduced its memory consumption by using interned_strings (a wrapper for boost::string_ref) in place of std::string instances. The change is to reduce the number of duplicate strings created by replacing them with interned_strings which act like pointers to existing strings. For the implementation of interned_string, see stringtable.h * What's new in version 2.8, 2015-06-17 - SystemTap has improved support for probing golang programs. Work has been done to be able to handle DWARF information, reporting file names, line numbers, and column numbers, and tolerance of odd characters in symbol names. - The function::*, probe::* and new macro::* man pages cross-references the enclosing tapset::* man page. For example: function::pn(3stap) mentions tapset::pn(3stap) in the SEE ALSO section - New stapref(1) man page provides a reference for the scripting language. The stapref page contains an overview of the features available in the language, such as keywords, data types, operators and more. - The @task macro performs the very common @cast to a task_struct. The embedded-C bodies of task_current() and pid2task() are now wrapped by @task, which gives them a debuginfo type on the return value. With autocast type propagation, this removes the need for any explicit @cast in many places. Other places which take untyped task pointers as parameters, for instance, now use @task as well to simplify their code. - New namespace-aware tapset functions [task_]ns_*() and ia new option --target-namespaces=PID to denote a target set of namespaces corresponding to the PID's namespaces. The namespace-aware tapsets will return values relative to the target namespaces if specified, or the stap process' namespaces. - Netfilter probes now attempt to decode Spanning Tree Protocol packets into local variables: probe netfilter.bridge.*, br_* variables, stp_dump.stp sample script. - Colorization of error string tokens is made more robust, especially in presence of $N/@N substitution. - The following tapset variables and functions are deprecated in version 2.8: - The 'hostname_uaddr' variable in the syscall.setdomainname and nd_syscall.setdomainname probe aliases have been deprecated in favor of the new 'domainname_uaddr' variable. - The 'fd' and 'fd_str' variables in the syscall.execveat and nd_syscall.execveat probe aliases have been deprecated in favor of the new 'dirfd' and 'dirfd_str' variables. * What's new in version 2.7, 2015-02-18 - Some systemtap sample scripts are now identified with the "_best" keyword, because they are generally useful or educational. They are now promoted within the generated index files. - Passing strings to and from functions has become faster due to optimization (passing some strings by reference instead of by value/copy). It may be disabled by using the unoptimize flag (-u). To make embedded-C functions eligible for the same optimization, use the pragma /* unmodified-fnargs */ to indicate that the function body will not modify the function arguments. Remember to use MAXSTRINGLEN for string length, rather than sizeof(string_arg) (which might now be a pointer). - SystemTap now allows .function probes to be specified by their full function name, file, and declaration line number. Use the .statement probe to probe a specific line number. - Tracepoint probes can now also be specified by the target subsystem. For example, the following are all supported: probe kernel.trace("sched:sched_switch") --> probe sched_switch found in the sched subsystem probe kernel.trace("sched:*") --> probe all tracepoints in sched subsystem As a result, tapset functions such as pn() will now return a different string than before. To retain the previous behaviour, use '--compatible=2.6'. - The following functions are deprecated in release 2.7: - _adjtx_mode_str(), _statfs_f_type_str(), _waitid_opt_str(), _internal_wait_opt_str(), and _epoll_events_str(). - New tapset functions [u]symfileline(), [u]symfile() and [u]symline() will return a string containing the specified portion of the filename:linenumber match from a given address. Using these functions may result in large generated modules from stored address->file:line information. * What's new in version 2.6, 2014-09-05 - SystemTap now supports on-the-fly arming/disarming of certain probe types: kprobes, uprobes, and timer.*s(NUM) probes. For example, this probe probe kernel.function("vfs_read") if (i > 4) { ... } will automatically register/unregister the associated kprobe on vfs_read whenever the value of the condition changes (as some probe handler modifies 'i'). This allows us to avoid probe overhead when we're not interested. If the arming capability is not relevant/useful, nest the condition in the normal probe handler: probe kernel.function("vfs_read") { if (i > 4) { ... } } - statement("*@file:NNN").nearest probes now available to let systemtap translate probe to nearest probe-able line to one given if necessary - process("PATH").library("PATH").plt("NAME").return probes are now supported. - SystemTap now supports SDT probes with operands that refer to symbols. - While in listing mode (-l/-L), probes printed are now more consistent and precise. - Statement probes now support enumerated linenos to probe discontiguous linenos using the form: process.statement("foo@file.c:3,5-7,9") - Statement counting is now suppressed in the generated c code for probes that are non-recursive and loop-free. Statement counting can be turned back on in unoptimize mode (-u). - SystemTap now asserts that the PID provided for a process probe corresponds to a running process. - DWARF process probes can be bound to a specific process using the form: process(PID).function("*") - SystemTap now accepts additional scripts through the new -E SCRIPT option. There still needs to be a main script specified through -e or file in order to provide an additional script. This makes it feasible to have scripts in the $HOME/.systemtap/rc file. For example: -E 'probe begin, end, error { log("systemtap script " . pn()) }' -E 'probe timer.s(30) { error ("timeout") } The -E SCRIPT option can also be used in listing mode (-l/-L), such that probe points for the additional scripts will not listed, but other parts of the script are still available, such as macros or aliases. - SystemTap now supports array slicing within foreach loop conditions, delete statements and membership tests. Wildcards are represented by "*". Examples of the expressions are: foreach ([a,b,c] in val[*,2,*]) delete val[*, 2, *] [*, 2, *] in val - Integer expressions which are derived from DWARF values, like context $vars, @cast, and @var, will now carry that type information into subsequent reads. Such expressions can now use "->" and "[]" operators, as can local variables which were assigned such values. foo = $param->foo; printf("x:%d y:%d\n", foo->x, foo->y) printf("my value is %d\n", ($type == 42 ? $foo : $bar)->value) printf("my parent pid is %d\n", task_parent(task_current())->tgid) * What's new in version 2.5, 2014-04-30 - Systemtap now supports backtracing through its own, invoking module. - Java probes now support backtracing using the print_java_backtrace() and sprint_java_backtrace() functions. - Statement probes (e.g. process.statement) are now faster to resolve, more precise, and work better with inlined functions. - New switches have been added to help inspect the contents of installed library files: stap --dump-functions --> list all library functions and their args stap --dump-probe-aliases --> list all library probe aliases - The heuristic algorithms used to search for function-prologue endings were improved, to cover more optimization (or lack-of-optimization, or incorrect-debuginfo) cases. These heuristics are necessary to find $context parameters for some function-call/entry probes. We recommend programs be built with CFLAGS+=-grecord-gcc-switches to feed information to the heuristics. - The stap --use-server option now more correctly supports address:port type parametrization, for manual use in the absence of avahi. - A new probe alias "oneshot" allows a single quick script fragment to run, then exit. - The argv tapset now merges translate-time and run-time positional arguments, so all of these work: stap -e 'probe oneshot {println(argv[1]," ",argv[2])}' hello world stap -e 'probe oneshot {println(argv[1]," ",argv[2])}' \ -G argv_1=hello -G argv_2=world staprun hello.ko argv_1=hello argv_2=world - SystemTap now falls back on the symbol table for probing functions in processes if the debuginfo is not available. - SystemTap now supports a %( guru_mode == 0 /* or 1 */ %) conditional for making dual-use scripts. - SystemTap now supports UEFI/SecureBoot systems, via machine-owner-keys maintained by a trusted stap-server on the network. (Key enrollment requires a one-time reboot and BIOS conversation.) https://sourceware.org/systemtap/wiki/SecureBoot - SystemTap now reports more accurate and succinct errors on type mismatches. - Embedded-C functions may use STAP_RETURN(value) instead of the more wordy STAP_RETVALUE assignment followed by a "goto out". The macro supports numeric or string values as appropriate. STAP_ERROR(...) is available to return with a (catchable) error. - Some struct-sockaddr fields are now individually decoded for socket-related syscalls: probe syscall.connect { println (uaddr_af, ":", uaddr_ip) } - The documentation for the SystemTap initscript service and the SystemTap compile-server service have been completely converted from README files to man pages (see systemtap(8) and stap-server(8)). - SystemTap is now capable of inserting modules early during the boot process on dracut-based systems. See the 'onboot' command in systemtap(8) for more information. - DWARF probes can now use the '.callee[s]' variants, which allow more precise function probing. For example, the probe point process("myproc").function("foo").callee("bar") will fire upon entering bar() from foo(). A '.callees' probe will instead place probes on all callees of foo(). Note that this also means that probe point wildcards should be used with more care. For example, use signal.*.return rather than signal.*.*, which would also match '.callees'. See stapprobes(3stap) for more info. This feature requires at least GCC 4.7. - A few new functions in the task_time tapsets, as well as a new tapset function task_ancestry(), which prints out the parentage of a process. - The kprocess.exec probe has been updated to use syscall.execve, which allows access to the new process' arguments (through the new 'argstr' or 'args' variables) as well as giving better support across kernel versions. Note also that the 'filename' variable now holds the filename (quoted), or the address (unquoted) if it couldn't be retrieved. - The [s]println() function can now be called without any arguments to simply print a newline. - Suggestions are now provided when markers could not be resolved. For example, process("stap").mark("benchmart") will suggest 'benchmark'. - SystemTap colors can now be turned off by simply setting SYSTEMTAP_COLORS to be empty, rather than having to make it invalid. - There is a new context tapset function, pnlabel(), which returns the name of the label which fired. - The following tapset variables and functions are deprecated in release 2.5: - The 'clone_flags', 'stack_start', 'stack_size', 'parent_tid_uaddr', and 'child_tid_uaddr' variables in the 'syscall.fork' and 'nd_syscall.fork' probe aliases. - The '_sendflags_str()' and '_recvflags_str()' functions have been deprecated in favor of the new '_msg_flags_str()' function. - The 'flags' and 'flags_str' variables in the 'syscall.accept' and 'nd_syscall.accept' probe alias. - The 'first', 'second', and 'uptr_uaddr' variables in the 'syscall.compat_sys_shmctl', and 'nd_syscall.compat_sys_shmctl' probe aliases have been deprecated in favor of the new 'shmid', 'cmd', and 'buf_uaddr' variables. * What's new in version 2.4, 2013-11-06 - Better suggestions are given in many of the semantic errors in which alternatives are provided. Additionally, suggestions are now provided when plt and trace probes could not be resolved. For example, kernel.trace("sched_siwtch") will suggest 'sched_switch'. - SystemTap is now smarter about error reporting. Errors from the same source are considered duplicates and suppressed. A message is displayed on exit if any errors/warnings were suppressed. - Statistics aggregate typed objects are now implemented locklessly, if the translator finds that they are only ever read (using the foreach / @count / etc. constructs) in a probe-begin/end/error. - SystemTap now supports probing inside virtual machines using the libvirt and unix schemes, e.g. stap -ve 'probe timer.s(1) { printf("hello!\n") }' \ --remote=libvirt://MyVirtualMachine Virtual machines managed by libvirt can be prepared using stapvirt. See stapvirt(1) and the --remote option in stap(1) for more details. - Systemtap now checks for and uses (when available) the .gnu_debugdata section which contains a subset of debuginfo, useful for backtraces and function probing - SystemTap map variables are now allocated with vmalloc() instead of with kmalloc(), which should cause memory to be less fragmented. - Although SystemTap itself requires elfutils 0.148+, staprun only requires elfutils 0.142+, which could be useful with the '--disable-translator' configure switch. - Under FIPS mode (/proc/sys/crypto/fips_enabled=1), staprun will refuse to load systemtap modules (since these are not normally signed with the kernel's build-time keys). This protection may be suppressed with the $STAP_FIPS_OVERRIDE environment variable. - The stap-server client & server code now enable all SSL/TLS ciphers rather than just the "export" subset. - For systems with in-kernel utrace, 'process.end' and 'thread.end' probes will hit before the target's parent process is notified of the target's death. This matches the behavior of newer kernels without in-kernel utrace. * What's new in version 2.3, 2013-07-25 - More context-accessing functions throw systemtap exceptions upon a failure, whereas in previous versions they might return non-error sentinel values like "" or "". Use try { } / catch { } around these, or new wrapper functions such as user_string_{n_}quoted() that internally absorb exceptions. - java("org.my.MyApp") probes are now restricted to pre-existing jvm pid's with a listing in jps -l output to avoid recursive calls - The tapset [nd_]syscall.semop parameter tsops_uaddr is renamed sops_uaddr for consistency with [nd_]syscall.semtimedop. - The udp.stp tapset adds some ip-address/port variables. - A new guru-mode-only tapset function raise() is available to send signals to the current task. - Support for the standard Posix ERE named character classes has been added to the regexp engine, e.g. [:digit:], [:alpha:], ... - A substantial internal overhaul of the regexp engine has resulted in correct behaviour on further obscure edge cases. The regexp engine now implements the ERE standard and correctly passes the testsuite for the glibc regexp engine (minus portions corresponding to unimplemented features -- i.e. subexpression capture and reuse). - Alternative functions are now suggested when function probes could not be resolved. For example, kernel.function("vfs_reads") will suggest vfs_read. Other probes for which suggestions are made are module.function, process.function, and process.library.function. - Has life been a bit bland lately? Want to spice things up? Why not write a few faulty probes and feast your eyes upon the myriad of colours adorning your terminal as SystemTap softly whispers in your ear... 'parse error'. Search for '--color' in 'man stap' for more info. - The following tapset functions are deprecated in release 2.3: 'stap_NFS_CLIENT', '__getfh_inode', '_success_check', '_sock_prot_num', '_sock_fam_num', '_sock_state_num', '_sock_type_num', and '_sock_flags_num'. * What's new in version 2.2.1, 2013-05-16 * What's new in version 2.2, 2013-05-14 - Experimental support has been added for probing Java methods using Byteman 2.0 as a backend. Java method probes can target method entries, returns, or specific statements in the method as specified by line number. probe java("org.my.MyApp").class("^java.lang.Object").method("foo(int)") { println($$parms) } See java/README for information on how to set up Java/Byteman functionality. Set env STAPBM_VERBOSE=yes for more tracing. - The stap -l output and pn() tapset function's return value may be slightly different for complicated web of wildcarded/aliased probes. - The dyninst backend has improved in several aspects: - Setting custom values for global variables is now supported, both with -G when compiling a script, and from the stapdyn command line when loading a precompiled module. - A high-performance shared-memory-based transport is used for trace data. - A systemd service file and tmpfile have been added to allow systemtap-server to be managed natively by systemd. - Due to the removal of register_timer_hook in recent kernels, the behaviour of timer.profile has been changed slightly. This probe is now an alias which uses the old mechanism where possible, but falls back to perf.sw.cpu_clock or another mechanism when the kernel timer hook is not available. To require the kernel timer hook mechanism in your script, use timer.profile.tick instead of timer.profile. - The following tapset variables are deprecated in release 2.2: - The 'origin' variables in the 'generic.fop.llseek', 'generic.fop.llseek.return', and 'nfs.fop.llseek' probes. The 'origin' variable has been replaced by the 'whence' variable. - The 'page_index' variable in the 'vfs.block_sync_page' and 'vfs.buffer_migrate_page' probe aliases. - The 'write_from' and 'write_upto' variables in the '_vfs.block_prepare_write' and '_vfs.block_prepare_write.return' probe aliases. - The 'regs' variable in the 'syscall.sigaltstack', 'nd_syscall.sigaltstack', 'syscall.fork', and 'nd_syscall.fork' probe aliases. - The 'first', 'second', 'third', and 'uptr_uaddr' variables in the 'syscall.compat_sys_shmat' and 'nd_syscall.compat_sys_shmat' probe aliases. - The following tapset functions are deprecated in release 2.2: 'ppos_pos', '_dev_minor', and '_dev_major' - The folowing tapset functions used to return error strings instead of raising an error. The original behavior is deprecated in release 2.2. 'ctime', 'probemod', 'modname' * What's new in version 2.1, 2013-02-13 - EMACS and VIM editor modes for systemtap source files are included / updated. - The translator now eliminates duplicate tapset files between its preferred directory (as configured during the build with --prefix=/ or specified with the -I /path option), and files it may find under $XDG_DATA_DIRS. This should eliminate a class of conflicts between parallel system- and hand-built systemtap installations. - The translator accepts a --suppress-time-limits option, which defeats time-related constraints, to allows probe handlers to run for indefinite periods. It requires the guru mode (-g) flag to work. Add the earlier --suppress-handler-errors flag for a gung-ho "just-keep-going" attitude. - Perf event probes may now be read on demand. The counter probe is defined using the counter-name part: probe perf.type(0).config(0).counter("NAME"). The counter is read in a user space probe using @perf("NAME"), e.g. process("PROCESS").statement("func@file") {stat <<< @perf("NAME")} - Perf event probes may now be bound to a specific task using the process-name part: probe perf.type(0).config(0).process("NAME") { } If the probed process name is not specified, then it is inferred from the -c CMD argument. - Some error messages and warnings now refer to additional information that is found in man pages. These are generally named error::FOO or warning::BAR (in the 7stap man page section) and may be read via % man error::FOO % man warning::BAR - The dyninst backend has improved in several aspects: - The runtime now allows much more concurrency when probing multithreaded processes, and will also follow probes across forks. - Several new probe types are now supported, including timers, function return, and process.begin/end and process.thread.begin/end. - Semaphores for SDT probes are now set properly. - Attaching to existing processes with -x PID now works. - The foreach looping construct can now sort aggregate arrays by the user's choice of aggregating function. Previously, @count was implied. e.g.: foreach ([x,y] in array @sum +) { println(@sum(array[x,y])) } - Proof of concept support for regular expression matching has been added: if ("aqqqqqb" =~ "q*b") { ... } if ("abc" !~ "q*b") { ... } The eventual aim is to support roughly the same functionality as the POSIX Extended Regular Expressions implemented by glibc. Currently missing features include extraction of the matched string and subexpressions, and named character classes ([:alpha:], [:digit:], &c). Special thanks go to the re2c project, whose public domain code this functionality has been based on. For more info on re2c, see: http://sourceforge.net/projects/re2c/ - The folowing tapset variables are deprecated in release 2.1 and will be removed in release 2.2: - The 'send2queue' variable in the 'signal.send' probe. - The 'oldset_addr' and 'regs' variables in the 'signal.handle' probe. - The following tapset probes are deprecated in release 2.1 and will be removed in release 2.2: - signal.send.return - signal.handle.return * What's new in version 2.0, 2012-10-09 - Systemtap includes a new prototype backend, which uses Dyninst to instrument a user's own processes at runtime. This backend does not use kernel modules, and does not require root privileges, but is restricted with respect to the kinds of probes and other constructs that a script may use. Users from source should configure --with-dyninst and install a fresh dyninst snapshot such as that in Fedora rawhide. It may be necessary to disable conflicting selinux checks; systemtap will advise. Select this new backend with the new stap option --runtime=dyninst and a -c target process, along with normal options. (-x target processes are not supported in this prototype version.) For example: stap --runtime=dyninst -c 'stap -l begin' \ -e 'probe process.function("main") { println("hi from dyninst!") }' - To aid diagnosis, when a kernel panic occurs systemtap now uses the panic_notifier_list facility to dump a summary of its trace buffers to the serial console. - The systemtap preprocessor now has a simple macro facility as follows: @define add(a,b) %( ((@a)+(@b)) %) @define probegin(x) %( probe begin { @x } %) @probegin( foo = @add(40, 2); print(foo) ) Macros defined in the user script and regular tapset .stp files are local to the file. To get around this, the tapset library can define globally visible 'library macros' inside .stpm files. (A .stpm file must contain a series of @define directives and nothing else.) The status of the feature is experimental; semantics of macroexpansion may change (unlikely) or expand in the future. - Systemtap probe aliases may be used with additional suffixes attached. The suffixes are passed on to the underlying probe point(s) as shown below: probe foo = bar, baz { } probe foo.subfoo.option("gronk") { } // expands to: bar.subfoo.option("gronk"), baz.subfoo.option("gronk") In practical terms, this allows us to specify additional options to certain tapset probe aliases, by writing e.g. probe syscall.open.return.maxactive(5) { ... } - To support the possibility of separate kernel and dyninst backends, the tapsets have been reorganized into separate folders according to backend. Thus kernel-specific tapsets are located under linux/, the dyninst-specific ones under dyninst/ - The backtrace/unwind tapsets have been expanded to allow random access to individual elements of the backtrace. (A caching mechanism ensures that the backtrace computation run at most once for each time a probe fires, regardless of how many times or what order the query functions are called in.) New tapset functions are: stack/ustack - return n'th element of backtrace callers/ucallers - return first n elements of backtrace print_syms/print_usyms - print full information on a list of symbols sprint_syms/sprint_usyms - as above, but return info as a string The following existing functions have been superseded by print_syms() et al.; new scripts are recommended to avoid using them: print_stack() print_ustack() sprint_stack() sprint_ustack() - The probefunc() tapset function is now myproc-unprivileged, and can now be used in unprivileged scripts for such things as profiling in userspace programs. For instance, try running systemtap.examples/general/para-callgraph.stp in unprivileged mode with a stapusr-permitted probe. The previous implementation of probefunc() is available with "stap --compatible=1.8". - Preprocessor conditional to vary code based on script privilege level: unprivileged -- %( systemtap_privilege == "stapusr" %? ... %) privileged -- %( systemtap_privilege != "stapusr" %? ... %) or, alternately %( systemtap_privilege == "stapsys" || systemtap_privilege == "stapdev" %? ... %) - To ease migration to the embedded-C locals syntax introduced in 1.8 (namely, STAP_ARG_* and STAP_RETVALUE), the old syntax can now be re-enabled on a per-function basis using the /* unmangled */ pragma: function add_foo:long(a:long, b:long) %{ /* unmangled */ THIS->__retvalue = THIS->a + STAP_ARG_b; %} Note that both the old and the new syntax may be used in an /* unmangled */ function. Functions not marked /* unmangled */ can only use the new syntax. - Adjacent string literals are now glued together irrespective of intervening whitespace or comments: "foo " "bar" --> "foo bar" "foo " /* comment */ "bar" --> "foo bar" Previously, the first pair of literals would be glued correctly, while the second would cause a syntax error. * What's new in version 1.8, 2012-06-17 - staprun accepts a -T timeout option to allow less frequent wake-ups to poll for low-throughput output from scripts. - When invoked by systemtap, the kbuild $PATH environment is sanitized (prefixed with /usr/bin:/bin:) in an attempt to exclude compilers other than the one the kernel was presumed built with. - Printf formats can now use "%#c" to escape non-printing characters. - Pretty-printed bitfields use integers and chars use escaped formatting for printing. - The systemtap compile-server and client now support IPv6 networks. - IPv6 addresses may now be specified on the --use-server option and will be displayed by --list-servers, if the avahi-daemon service is running and has IPv6 enabled. - Automatic server selection will automatically choose IPv4 or IPv6 servers according to the normal server selection criteria when avahi-daemon is running. One is not preferred over the other. - The compile-server will automatically listen on IPv6 addresses, if available. - To enable IPv6 in avahi-daemon, ensure that /etc/avahi/avahi-daemon.conf contains an active "use-ipv6=yes" line. After adding this line run "service avahi-daemon restart" to activate IPv6 support. - See man stap(1) for details on how to use IPv6 addresses with the --use-server option. - Support for DWARF4 .debug_types sections (for executables and shared libraries compiled with recent GCC's -gdwarf-4 / -fdebug-types-section). PR12997. SystemTap now requires elfutils 0.148+, full .debug_types support depends on elfutils 0.154+. - Systemtap modules are somewhat smaller & faster to compile. Their debuginfo is now suppressed by default; use -B CONFIG_DEBUG_INFO=y to re-enable. - @var now an alternative language syntax for accessing DWARF variables in uprobe and kprobe handlers (process, kernel, module). @var("somevar") can be used where $somevar can be used. The @var syntax also makes it possible to access non-local, global compile unit (CU) variables by specifying the CU source file as follows @var("somevar@some/src/file.c"). This will provide the target variable value of global "somevar" as defined in the source file "some/src/file.c". The @var syntax combines with all normal features of DWARF target variables like @defined(), @entry(), [N] array indexing, field access through ->, taking the address with the & prefix and shallow or deep pretty printing with a $ or $$ suffix. - Stap now has resource limit options: --rlimit-as=NUM --rlimit-cpu=NUM --rlimit-nproc=NUM --rlimit-stack=NUM --rlimit-fsize=NUM All resource limiting has been moved from the compile server to stap itself. When running the server as "stap-server", default resource limit values are specified in ~stap-server/.systemtap/rc. - Bug CVE-2012-0875 (kernel panic when processing malformed DWARF unwind data) is fixed. - The systemtap compile-server now supports multiple concurrent connections. Specify the desired maximum number of concurrent connections with the new stap-server/stap-serverd --max-threads option. Specify a value of '0' to tell the server not to spawn any new threads (handle all connections serially in the main thread). The default value is the number of processor cores on the host. - The following tapset functions are deprecated in release 1.8 and will be removed in release 1.9: daddr_to_string() - SystemTap now mangles local variables to avoid collisions with C headers included by tapsets. This required a change in how embedded-C functions access local parameters and the return value slot. Instead of THIS->foo in an embedded-C function, please use the newly defined macro STAP_ARG_foo (substitute the actual name of the argument for 'foo'); instead of THIS->__retvalue, use the newly defined STAP_RETVALUE. All of the tapsets and test cases have been adapted to use this new notation. If you need to run code which uses the old THIS-> notation, run stap with the --compatible=1.7 option. - There is updated support for user-space probing against kernels >= 3.5, which have no utrace but do have the newer inode-uprobes work by Srikar Dronamraju and colleagues. For kernels < 3.5, the following 3 sets of kernel patches would need to be backported to your kernel to use this preliminary user-space probing support: - inode-uprobes patches: - 2b144498350860b6ee9dc57ff27a93ad488de5dc - 7b2d81d48a2d8e37efb6ce7b4d5ef58822b30d89 - a5f4374a9610fd7286c2164d4e680436727eff71 - 04a3d984d32e47983770d314cdb4e4d8f38fccb7 - 96379f60075c75b261328aa7830ef8aa158247ac - 3ff54efdfaace9e9b2b7c1959a865be6b91de96c - 35aa621b5ab9d08767f7bc8d209b696df281d715 - 900771a483ef28915a48066d7895d8252315607a - e3343e6a2819ff5d0dfc4bb5c9fb7f9a4d04da73 - exec tracepoint kernel patch: - 4ff16c25e2cc48cbe6956e356c38a25ac063a64d - task_work_add kernel patches: - e73f8959af0439d114847eab5a8a5ce48f1217c4 - 4d1d61a6b203d957777d73fcebf19d90b038b5b2 - 413cd3d9abeaef590e5ce00564f7a443165db238 - dea649b8ac1861107c5d91e1a71121434fc64193 - f23ca335462e3c84f13270b9e65f83936068ec2c * What's new in version 1.7, 2012-02-01 - Map inserting and deleting is now significantly faster due to improved hashing and larger hash tables. The hashes are also now randomized to provide better protection against deliberate collision attacks. - Formatted printing is faster by compiling the formatting directives to C code rather than interpreting at run time. - Systemtap loads extra command line options from $SYSTEMTAP_DIR/rc ($HOME/.systemtap/rc by default) before the normal argc/argv. This may be useful to activate site options such as --use-server or --download-debuginfo or --modinfo. - The stap-server has seen many improvements, and is no longer considered experimental. - The stap-server service (initscript) now supports four new options: -D MACRO[=VALUE] --log LOGFILE --port PORT-NUMBER --SSL CERT-DATABASE These allow the specification of macro definitions to be passed to stap by the server, the location of the log file, network port number and NSS certificate database location respectively. These options are also supported within individual server configuration files. See stap-server and initscript/README.stap-server for details. The stap-server is no longer activated by default. - process("PATH").[library("PATH")].function("NAME").exported probes are now supported to filter function() to only exported instances. - The translator supports a new --suppress-handler-errors option, which causes most runtime errors to be turned into quiet skipped probes. This also disables the MAXERRORS and MAXSKIPPED limits. - Translator warnings have been standardized and controlled by the -w / -W flags. - The translator supports a new --modinfo NAME=VALUE option to emit additional MODULE_INFO(n,v) macros into the generated code. - There is no more fixed maximum number of VMA pages that will be tracked at runtime. This reduces memory use for those scripts that don't need any, or only limited target process VMA tracking and allows easier system wide probes inspecting shared library variables and/or user backtraces. stap will now silently ignore -DTASK_FINDER_VMA_ENTRY_ITEMS. - The tapset functions remote_id() and remote_uri() identify the member of a swarm of "stap --remote FOO --remote BAR baz.stp" concurrent executions. - Systemtap now supports a new privilege level and group, "stapsys", which is equivalent to the privilege afforded by membership in the group "stapdev", except that guru mode (-g) functionality may not be used. To support this, a new option, --privilege=[stapusr|stapsys|stapdev] has been added. --privilege=stapusr is equivalent to specifying the existing --unprivileged option. --privilege=stapdev is the default. See man stap(1) for details. - Scripts that use kernel.trace("...") probes compile much faster. - The systemtap module cache is cleaned less frequently, governed by the number of seconds in the $SYSTEMTAP_DIR/cache/cache_clean_interval_s file. - SDT can now define up to 12 arguments in a probe point. - Parse errors no longer generate a cascade of false errors. Instead, a parse error skips the rest of the current probe or function, and resumes at the next one. This should generate fewer and better messages. - Global array wrapping is now supported for both associative and statistics typed arrays using the '%' character to signify a wrapped array. For example, 'global foo%[100]' would allow the array 'foo' to be wrapped if more than 100 elements are inserted. - process("PATH").library("PATH").plt("NAME") probes are now supported. Wildcards are supported in the plt-name part, to refer to any function in the program linkage table which matches the glob pattern and the rest of the probe point. - A new option, --dump-probe-types, will dump a list of supported probe types. If --unprivileged is also specified, the list will be limited to probe types which are available to unprivileged users. - Systemtap can now automatically download the required debuginfo using abrt. The --download-debuginfo[=OPTION] can be used to control this feature. Possible values are: 'yes', 'no', 'ask', and a positive number representing the timeout desired. The default behavior is to not automatically download the debuginfo. - The translator has better support for probing C++ applications by better undertanding of compilation units, nested types, templates, as used in probe point and @cast constructs. - On 2.6.29+ kernels, systemtap can now probe kernel modules that arrive and/or depart during the run-time of a session. This allows probing of device driver initialization functions, which had formerly been blacklisted. - New tapset functions for cpu_clock and local_clock access were added. - There is some limited preliminary support for user-space probing against kernels such as linux-next, which have no utrace but do have the newer inode-uprobes work by Srikar Dronamraju and colleagues. - The following probe types are deprecated in release 1.7 and will be removed in release 1.8: kernel.function(number).inline module(string).function(number).inline process.function(number).inline process.library(string).function(number).inline process(string).function(number).inline process(string).library(string).function(number).inline - The systemtap-grapher is deprecated in release 1.7 and will be removed in release 1.8. - The task_backtrace() tapset function was deprecated in 1.6 and has been removed in 1.7. - MAXBACKTRACE did work in earlier releases, but has now been documented in the stap 1 manual page. - New tapset function probe_type(). Returns a short string describing the low level probe handler type for the current probe point. - Both unwind and symbol data is now only collected and emitted for scripts actually using backtracing or function/data symbols. Tapset functions are marked with /* pragma:symbols */ or /* pragma:unwind */ to indicate they need the specific data. - Kernel backtraces can now be generated for non-pt_regs probe context if the kernel support dump_trace(). This enables backtraces from certain timer probes and tracepoints. - ubacktrace() should now also work for some kernel probes on x86 which can use the dwarf unwinder to recover the user registers to provide more accurate user backtraces. - For s390x the systemtap runtime now properly splits kernel and user addresses (which are in separate address spaces on that architecture) which enable user space introspection. - ppc and s390x now supports user backtraces through the DWARF unwinder. - ppc now handles function descriptors as symbol names correctly. - arm support kernel backtraces through the DWARF unwinder. - arm now have a uprobes port which enables user probes. This still requires some kernel patches (user_regsets and tracehook support for arm). - Starting in release 1.7, these old variables will be deprecated: - The 'pid' variable in the 'kprocess.release' probe has been deprecated in favor of the new 'released_pid' variable. - The 'args' variable in the '_sunrpc.clnt.create_client.rpc_new_client_inline' probe has been deprecated in favor of the new internal-only '__args' variable. - Experimental support for recent kernels without utrace has been added for the following probe types: process(PID).begin process("PATH").begin process.begin process(PID).thread.begin process("PATH").thread.begin process.thread.begin process(PID).end process("PATH").end process.end process(PID).thread.end process("PATH").thread.end process.thread.end process(PID).syscall process("PATH").syscall process.syscall process(PID).syscall.return process("PATH").syscall.return process.syscall.return - staprun disables kprobe-optimizations in recent kernels, as problems were found. (PR13193) * What's new in version 1.6, 2011-07-25 - Security fixes for CVE-2011-2503: read instead of mmap to load modules, CVE-2011-2502: Don't allow path-based auth for uprobes - The systemtap compile-server no longer uses the -k option when calling the translator (stap). As a result, the server will now take advantage of the module cache when compiling the same script more than once. You may observe an improvement in the performance of the server in this situation. - The systemtap compile-server and client now each check the version of the other, allowing both to adapt when communicating with a down-level counterpart. As a result, all version of the client can communicate with all versions of the server and vice-versa. Client will prefer newer servers when selecting a server automatically. - SystemTap has improved support for the ARM architecture. The kread() and kwrite() operations for ARM were corrected allowing many of the tapsets probes and function to work properly on the ARM architecture. - Staprun can now rename the module to a unique name with the '-R' option before inserting it. Systemtap itself will also call staprun with '-R' by default. This allows the same module to be inserted more than once, without conflicting duplicate names. - Systemtap error messages now provide feedback when staprun or any other process fails to launch. This also specifically covers when the user doesn't have the proper permissions to launch staprun. - Systemtap will now map - to _ in module names. Previously, stap -L 'module("i2c-core").function("*")' would be empty. It now returns a list had stap -L 'module("i2c_core").function("*") been specified. - Systemtap now fills in missing process names to probe points, to avoid having to name them twice twice: % stap -e 'probe process("a.out").function("*") {}' -c 'a.out ...' Now the probed process name is inferred from the -c CMD argument. % stap -e 'probe process.function("*") {}' -c 'a.out ...' - stap -L 'process("PATH").syscall' will now list context variables - Depends on elfutils 0.142+. - Deprecated task_backtrace:string (task:long). This function will go away after 1.6. Please run your scripts with stap --check-version. * What's new in version 1.5, 2011-05-23 - Security fixes for CVE-2011-1781, CVE-2011-1769: correct DW_OP_{mod,div} division-by-zero bug - The compile server and its related tools (stap-gen-ert, stap-authorize-cert, stap-sign-module) have been re-implemented in C++. Previously, these components were a mix of bash scripts and C code. These changes should be transparent to the end user with the exception of NSS certificate database password prompting (see below). The old implementation would prompt more than once for the same password in some situations. - eventcount.stp now allows for event counting in the format of 'stap eventcount.stp process.end syscall.* ...', and also reports corresponding event tid's. - Systemtap checks that the build-id of the module being probed matches the build-id saved in the systemtap module. Invoking systemtap with -DSTP_NO_BUILDID_CHECK will bypass this build-id runtime verification. See man ld(1) for info on --build-id. - stapio will now report if a child process has an abnormal exit along with the associated status or signal. - Compiler optimization may sometimes result in systemtap not being able to access a user-space probe argument. Compiling the application with -DSTAP_SDT_ARG_CONSTRAINT=nr will force the argument to be an immediate or register value which should enable systemtap to access the argument. - GNU Gettext has now been intergrated with systemtap. Our translation page can be found at http://www.transifex.net/projects/p/systemtap/ . "make update-po" will generate the necessary files to use translated messages. Please refer to the po/README file for more info and please consider contributing to this I18N effort! - The new addr() function returns the probe's instruction pointer. - process("...").library("...") probes are now supported. Wildcards are supported in the library-name part, to refer to any shared library that is required by process-name, which matches the glob pattern and the rest of the probe point. - The "--remote USER@HOST" functionality can now be specified multiple times to fan out on multiple targets. If the targets have distinct kernel and architecture configurations, stap will automatically build the script appropriately for each one. This option is also no longer considered experimental. - The NSS certificate database generated for use by the compile server is now generated with no password. Previously, a random password was generated and used to access the database. This change should be transparent to most users. However, if you are prompted for a password when using systemtap, then running $libexecdir/stap-gen-cert should correct the problem. - The timestamp tapset includes jiffies() and HZ() for lightweight approximate timekeeping. - A powerful new command line option --version has been added. - process.mark now supports $$parms for reading probe parameters. - A new command line option, --use-server-on-error[=yes|no] is available for stap. It instructs stap to retry compilation of a script using a compile server if it fails on the local host. The default setting is 'no'. - The following deprecated tools have been removed: stap-client stap-authorize-server-cert stap-authorize-signing-cert stap-find-or-start-server stap-find-servers Use the --use-server, --trust-server and --list-servers options of stap instead. * What's new in version 1.4, 2011-01-17 - Security fixes for CVE-2010-4170, CVE-2010-4171: staprun module loading/unloading - A new /* myproc-unprivileged */ marker is now available for embedded C code and and expressions. Like the /* unprivileged */ marker, it makes the code or expression available for use in unprivileged mode (see --unprivileged). However, it also automatically adds a call to assert_is_myproc() to the code or expression, thus, making it available to the unprivileged user only if the target of the current probe is within the user's own process. - The experimental "--remote USER@HOST" option will run pass 5 on a given ssh host, after building locally (or with --use-server) for that target. - Warning messages from the script may now be suppressed with the stap and/or staprun -w option. By default, duplicate warning messages are suppressed (up to a certain limit). With stap --vp 00002 and above, the duplicate elimination is defeated. - The print_ubacktrace and usym* functions attempt to print the full path of the user-space binaries' paths, instead of just the basename. The maximum saved path length is set by -DTASK_FINDER_VMA_ENTRY_PATHLEN, default 64. Warning messages are produced if unwinding fails due to a missing 'stap -d MODULE' option, providing preloaded unwind data. - The new tz_ctime() tapset function prints times in the local time zone. - More kernel tracepoints are accessible to the kernel.trace("...") mechanism, if kernel source trees or debuginfo are available. These formerly "hidden" tracepoints are those that are declared somewhere other than the usual include/linux/trace/ headers, such as xfs and kvm. - debuginfo-based process("...").function/.statement/.mark probes support wildcards in the process-name part, to refer to any executable files that match the glob pattern and the rest of the probe point. - The -t option now displays information per probe-point rather than a summary for each probe. It also now shows the derivation chain for each probe-point. - A rewrite of the sys/sdt.h header file provides zero-cost startup (few or no ELF relocations) for the debuginfo-less near-zero-cost runtime probes. Binaries compiled with earlier sdt.h versions remain supported. The stap -L (listing) option now lists parameters for sys/sdt.h markers. - The implementation of the integrated compile-server client has been extended. o --use-server now accepts an argument representing a particular server and may be specified more than once. o --list-servers now accepts an expanded range of arguments. o a new --trust-servers option has been added to stap to replace several old certificate-management scripts. o The following tools are now deprecated and will be removed in release 1.5: stap-client stap-authorize-server-cert stap-authorize-signing-cert stap-find-or-start-server stap-find-servers See man stap(1) for complete details. - The compile-server now returns the uprobes.ko to the client when it is required by the script being compiled. The integrated compile-server client now makes it available to be loaded by staprun. The old (deprecated) stap-client does not do this. - process probes with scripts as the target are recognized by stap and the interpreter would be selected for probing. - Starting in release 1.5, these old variables/functions will be deprecated and will only be available when the '--compatible=1.4' flag is used: - In the 'syscall.add_key' probe, the 'description_auddr' variable has been deprecated in favor of the new 'description_uaddr' variable. - In the 'syscall.fgetxattr', 'syscall.fsetxattr', 'syscall.getxattr', 'syscall.lgetxattr', and 'syscall.lremovexattr' probes, the 'name2' variable has been deprecated in favor of the new 'name_str' variable. - In the 'nd_syscall.accept' probe the 'flag_str' variable has been deprecated in favor of the new 'flags_str' variable. - In the 'nd_syscall.dup' probe the 'old_fd' variable has been deprecated in favor of the new 'oldfd' variable. - In the 'nd_syscall.fgetxattr', 'nd_syscall.fremovexattr', 'nd_syscall.fsetxattr', 'nd_syscall.getxattr', and 'nd_syscall.lremovexattr' probes, the 'name2' variable has been deprecated in favor of the new 'name_str' variable. - The tapset alias 'nd_syscall.compat_pselect7a' was misnamed. It should have been 'nd_syscall.compat_pselect7' (without the trailing 'a'). - The tapset function 'cpuid' is deprecated in favor of the better known 'cpu'. - In the i386 'syscall.sigaltstack' probe, the 'ussp' variable has been deprecated in favor of the new 'uss_uaddr' variable. - In the ia64 'syscall.sigaltstack' probe, the 'ss_uaddr' and 'oss_uaddr' variables have been deprecated in favor of the new 'uss_uaddr' and 'uoss_uaddr' variables. - The powerpc tapset alias 'syscall.compat_sysctl' was deprecated and renamed 'syscall.sysctl32'. - In the x86_64 'syscall.sigaltstack' probe, the 'regs_uaddr' variable has been deprecated in favor of the new 'regs' variable. * What's new in version 1.3, 2010-07-21 - The uprobes kernel module now has about half the overhead when probing NOPs, which is particularly relevant for sdt.h markers. - New stap option -G VAR=VALUE allows overriding global variables by passing the settings to staprun as module options. - The tapset alias 'syscall.compat_pselect7a' was misnamed. It should have been 'syscall.compat_pselect7' (without the trailing 'a'). Starting in release 1.4, the old name will be deprecated and will only be available when the '--compatible=1.3' flag is used. - A new procfs parameter .umask(UMASK) which provides modification of file permissions using the proper umask value. Default file permissions for a read probe are 0400, 0200 for a write probe, and 0600 for a file with a read and write probe. - It is now possible in some situations to use print_ubacktrace() to get a user space stack trace from a kernel probe point. e.g. for user backtraces when there is a pagefault: $ stap -d /bin/sort --ldd -e 'probe vm.pagefault { if (pid() == target()) { printf("pagefault @0x%x\n", address); print_ubacktrace(); } }' -c /bin/sort [...] pagefault @0x7fea0595fa70 0x000000384f07f958 : __GI_strcmp+0x12b8/0x1440 [libc-2.12.so] 0x000000384f02824e : __gconv_lookup_cache+0xee/0x5a0 [libc-2.12.so] 0x000000384f021092 : __gconv_find_transform+0x92/0x2cf [libc-2.12.so] 0x000000384f094896 : __wcsmbs_load_conv+0x106/0x2b0 [libc-2.12.so] 0x000000384f08bd90 : mbrtowc+0x1b0/0x1c0 [libc-2.12.so] 0x0000000000404199 : ismbblank+0x39/0x90 [sort] 0x0000000000404a4f : inittables_mb+0xef/0x290 [sort] 0x0000000000406934 : main+0x174/0x2510 [sort] 0x000000384f01ec5d : __libc_start_main+0xfd/0x1d0 [libc-2.12.so] 0x0000000000402509 : _start+0x29/0x2c [sort] [...] - New tapset functions to get a string representation of a stack trace: sprint_[u]backtrace() and sprint_[u]stack(). - New tapset function to get the module (shared library) name for a user space address umodname:string(long). The module name will now also be in the output of usymdata() and in backtrace addresses even when they were not given with -d at the command line. - Kernel backtraces are now much faster (replaced a linear search with a binary search). - A new integrated compile-server client is now available as part of stap. o 'stap --use-server ...' is equivalent to 'stap-client ...' o 'stap --list-servers' is equivalent to 'stap-find-servers' o 'stap --list-servers=online' is equivalent to 'stap-find-servers --all' o stap-client and its related tools will soon be deprecated. o the nss-devel and avahi-devel packages are required for building stap with the integrated client (checked during configuration). o nss and avahi are required to run the integrated client. - A new operator @entry is available for automatically saving an expression at entry time for use in a .return probe. probe foo.return { println(get_cycles() - @entry(get_cycles())) } - Probe $target variables and @cast() can now use a suffix to print complex data types as strings. Use a single '$' for a shallow view, or '$$' for a deeper view that includes nested types. For example, with fs_struct: $fs$ : "{.users=%i, .lock={...}, .umask=%i, .in_exec=%i, .root={...}, .pwd={...}}" $fs$$ : "{.users=%i, .lock={.raw_lock={.lock=%u}}, .umask=%i, .in_exec=%i, .root={.mnt=%p, .dentry=%p}, .pwd={.mnt=%p, .dentry=%p}}" - The user-space markers no longer default to an implicit MARKER_NAME_ENABLED() semaphore check for each marker. To check for enabled markers use a .d declaration file, then: if (MARKER_NAME_ENABLED()) MARKER_NAME() - Hyphenated marker names such as process(...).mark("foo-bar") are now accepted in scripts. They are mapped to the double-underscore form ("foo__bar"). - More robust user-space markers support is included. For some platforms (x86*, ppc*), this can let systemtap probe the markers without debuginfo. This implementation also supports preserving the "provider" name associated with a marker: probe process("foo").provider("bar").mark("baz") to match STAP_PROBE(bar, baz <...>) (Compile with -DSTAP_SDT_V1 to revert to the previous implementation. Systemtap supports pre-existing or new binaries using them.) - Embedded-C may be used within expressions as values, when in guru mode: num = %{ LINUX_VERSION_CODE %} // int64_t name = %{ /* string */ THIS_MODULE->name %} // const char* printf ("%s %x\n", name, num) The usual /* pure */, /* unprivileged */, and /* guru */ markers may be used as with embedded-C functions. - By default the systemtap-runtime RPM builds now include a shared library, staplog.so, that allows crash to extract systemtap data from a vmcore image. - Iterating with "foreach" can now explicitly save the value for the loop. foreach(v = [i,j] in array) printf("array[%d,%s] = %d\n", i, j, v /* array[i,j] */) - The new "--ldd" option automatically adds any additional shared libraries needed by probed or -d-listed userspace binaries to the -d list, to enable symbolic backtracing through them. Similarly, the new "--all-modules" option automatically adds any currently loaded kernel modules (listed in /proc/modules) to the -d list. - A new family of set_kernel_* functions make it easier for gurus to write new values at arbitrary memory addresses. - Probe wildcards can now use '**' to cross the '.' separator. $ stap -l 'sys**open' syscall.mq_open syscall.open - Backward compatibility flags (--compatible=VERSION, and matching script preprocessing predicate %( systemtap_v CMP "version" %) and a deprecation policy are being introduced, in case future tapset/language changes break valid scripts. * What's new in version 1.2, 2010-03-22 - Prototype support for "perf events", where the kernel supports the 2.6.33 in-kernel API. Probe points may refer to low-level perf_event_attr type/config numbers, or to a number of aliases defined in the new perf.stp tapset: probe perf.sw.cpu_clock, perf.type(0).config(4) { } - Type-casting can now use multiple headers to resolve codependencies. @cast(task, "task_struct", "kernel")->fs->umask - Tapset-related man pages have been renamed. 'man -k 3stap' should show the installed list, which due to prefixing should no longer collide over ordinary system functions. - User space marker arguments no longer use volatile if the version of gcc, which must be at least 4.5.0, supports richer DWARF debuginfo. Use cflags -DSTAP_SDT_VOLATILE=volatile or -DSTAP_SDT_VOLATILE= when building the sys/sdt.h application to override this one way or another. - A new construct for error handling is available. It is similar to c++ exception catching, using try and catch as new keywords. Within a handler or function, the following is valid and may be nested: try { /* arbitrary statements */ } catch (er) { /* e.g. println("caught error ", er) */ } - A new command line flag '-W' forces systemtap to abort translation of a script if any warnings are produced. It is similar to gcc's -Werror. (If '-w' is also supplied to suppress warnings, it wins.) - A new predicate @defined is available for testing whether a particular $variable/expression is resolvable at translate time: probe foo { if (@defined($bar)) log ("$bar is available here") } - Adjacent string literals are glued together, making this construct valid: probe process("/usr" @1 "/bin").function("*") { ... } - In order to limit potential impact from future security problems, the stap-server process does not permit its being launched as root. - On recent kernels, for some architectures/configurations, hardware breakpoint probes are supported. The probe point syntax is: probe kernel.data(ADDRESS).write probe kernel.data(ADDRESS).length(LEN).write probe kernel.data("SYMBOL_NAME").write * What's new in version 1.1, 2010-01-15 - New tracepoint based tapset for memory subsystem. - The loading of signed modules by staprun is no longer allowed for ordinary, unprivileged users. This means that only root, members of the group 'stapdev' and members of the group 'stapusr' can load systemtap modules using staprun, stap or stap-client. The minimum privilege required to run arbitrary --unprivileged scripts is now 'stapusr' membership. - The stap-server initscript is available. This initscript allows you to start systemtap compile servers as a system service and to manage these servers as a group or individually. The stap-server initscript is installed by the systemtap-server rpm. The build directory for the uprobes module (/usr/share/systemtap/runtime/uprobes) is made writable by the 'stap-server' group. All of the files generated when building the uprobes module, including the digital signature, are also writable by members of stap-server. See initscript/README.stap-server for details. - Some of the compile server client, server and certificate management tools have been moved from $bindir to $libexecdir/systemtap. You should use the new stap-server script or the stap-server initscript for server management where possible. The stap-server script provides the same functionality as the stap-server initscript except that the servers are run by the invoking user by default as opposed to servers started by the stap-server initscript which are run by the user stap-server by default. See stap-server(8) for more information. You may continue to use these tools by adding $libexecdir/systemtap to your path. You would need to do this, for example, if you are not root, you want to start a compile server and you are not running systemtap from a private installation. In this case you still need to use stap-start-server. - Any diagnostic output line that starts with "ERROR", as in error("foo"), will promote a "Pass 5: run failed", and the return code is 1. - Systemtap now warns about global variables being referenced from other script files. This aims to protect against unintended local-vs-global namespace collisions such as: % cat some_tapset.stp probe baz.one = bar { foo = $foo; bar = $bar } % cat end_user_script.stp global foo # intended to be private variable probe timer.s(1) { foo ++ } probe baz.* { println(foo, pp()) } % stap end_user_script.stp WARNING: cross-file global variable reference to foo from some_tapset.stp - Preprocessor conditional for kernel configuration testing: %( CONFIG_foo == "y" %? ... %) - ftrace(msg:string) tapset function to send strings to the system-wide ftrace ring-buffer (if any). - Better support for richer DWARF debuginfo output from GCC 4.5 (variable tracking assignments). Kernel modules are now always resolved against all their dependencies to find any info referring to missing symbols. DW_AT_const_value is now supported when no DW_AT_location is available. * What's new in verson 1.0, 2009-09-22 - process().mark() probes now use an enabling semaphore to reduce the computation overhead of dormant probes. - The function spec for dwarf probes now supports C++ scopes, so you can limit the probes to specific namespaces or classes. Multiple scopes can be specified, and they will be matched progressively outward. probe process("foo").function("std::vector<*>::*") { } probe process("foo").function("::global_function") { } - It is now possible to cross-compile systemtap scripts for foreign architectures, using the new '-a ARCH' and '-B OPT=VALUE' flags. For example, put arm-linux-gcc etc. into your $PATH, and point systemtap at the target kernel build tree with: stap -a arm -B CROSS_COMPILE=arm-linux- -r /build/tree [...] The -B option is passed to kbuild make. -r identifies the already configured/built kernel tree and -a its architecture (kbuild ARCH=...). Systemtap will infer -p4. - Cross compilation using the systemtap client and server - stap-start-server now accepts the -r, -R, -I, -B and -a options in order to start a cross compiling server. The server will correctly advertise itself with respect to the kernel release and architecture that it compiles for. - When specified on stap-client, the -r and -a options will be considered when searching for a suitable server. - When using the systemtap client and server udp port 5353 must be open in your firewall in order for the client to find servers using avahi-browse. Also the systemtap server will choose a random port in the range 1024-63999 for accepting ssl connections. - Support for unprivileged users: *********************************************************************** * WARNING!!!!!!!!!! * * This feature is EXPERIMENTAL at this time and should be used with * * care. This feature allows systemtap kernel modules to be loaded by * * unprivileged users. The user interface and restrictions will change * * as this feature evolves. * *********************************************************************** - Systemtap modules generated from scripts which use a restricted subset of the features available may be loaded by staprun for unprivileged users. Previously, staprun would load modules only for root or for members of the groups stapdev and stapusr. - Using the --unprivileged option on stap enables translation-time checking for use by unprivileged users (see restrictions below). - All modules deemed suitable for use by unprivileged users will be signed by the systemtap server when --unprivileged is specified on stap-client. See module signing in release 0.9.8 and stap-server in release 0.9 below. - Modules signed by trusted signers (servers) and verified by staprun will be loaded by staprun regardless of the user's privilege level. - The system administrator asserts the trustworthiness of a signer (server) by running stap-authorize-signing-cert as root, where the can be found in ~/.systemtap/ssl/server/stap.cert for servers started by ordinary users and in $sysconfdir/systemtap/ssl/server/stap.cert for servers started by root. - Restrictions are intentionally strict at this time and may be relaxed in the future: - probe points are restricted to: begin, begin(n), end, end(n), error, error(n), never, timer.{jiffies,s,sec,ms,msec,us,usec,ns,nsec}(n)*, timer.hz(n), process.* (for processes owned by the user). - use of embedded C code is not allowed. - use of tapset functions is restricted. - some tapset functions may not be used at all. A message will be generated at module compilation time. - some actions by allowed tapset functions may only be performed in the context of the user's own process. A runtime fault will occur in these situations, for example, direct memory access. - The is_myproc() tapset function has been provided so that tapset writers for unprivileged users can check that the context is of the users own process before attempting these actions. - accessing the kernel memory space is not allowed. - The following command line options may not be used by stap-client -g, -I, -D, -R, -B - The following environment variables are ignored by stap-client: SYSTEMTAP_RUNTIME, SYSTEMTAP_TAPSET, SYSTEMTAP_DEBUGINFO_PATH - nss and nss-tools are required to use this feature. - Support output file switching by SIGUSR2. Users can command running stapio to switch output file by sending SIGUSR2. - Memory consumption for scripts involving many uprobes has been dramatically reduced. - The preprocessor now supports || and && in the conditions. e.g. %( arch == "x86_64" || arch == "ia64" %: ... %) - The systemtap notion of "architecture" now matches the kernel's, rather than that of "uname -m". This means that 32-bit i386 family are all known as "i386" rather than "i386" or "i686"; "ppc64" as "powerpc"; "s390x" as "s390", and so on. This is consistent between the new "-a ARCH" flag and the script-level %( arch ... %) conditional. - It is now possible to define multiple probe aliases with the same name. A probe will expand to all matching aliases. probe foo = bar { } probe foo = baz { } probe foo { } # expands twice, once to bar and once to baz - A new experimental transport mechanism, using ftrace's ring_buffer, has been added. This may become the default transport mechanism in future versions of systemtap. To test this new transport mechanism, define 'STP_USE_RING_BUFFER'. - Support for recognizing DW_OP_{stack,implicit}_value DWARF expressions as emitted by GCC 4.5. * What's new in version 0.9.9, 2009-08-04 - Systemwide kernel .function.return (kretprobe) maxactive defaults may be overridden with the -DKRETACTIVE=nnn parameter. - Translation pass 2 is significantly faster by avoiding unnecessary searching through a kernel build/module directory tree. - When compiled against elfutils 0.142 systemtap now handles the new DW_OP_call_frame_CFA generated by by GCC. - uprobes and ustack() are more robust when used on applications that depend on prelinked/separate debuginfo shared libraries. - User space PROBE marks are not always found with or without separate debuginfo. The .probes section itself is now always put in the main elf file and marked as allocated. When building pic code the section is marked writable. The selinux memory check problems seen with programs using STAP_PROBES is fixed. - statement() probes can now override "address not at start of statement" errors in guru mode. They also provide alternative addresses to use in non-guru mode. - The stapgraph application can generate graphs of data and events emitted by systemtap scripts in real time. Run "stapgraph testsuite/systemtap.examples/general/grapher.stp" for an example of graphing the system load average and keyboard events. - Dwarf probes now show parameters and local variables in the verbose listing mode (-L). - Symbol aliases are now resolved to their canonical dwarf names. For example, probing "malloc" in libc resolves to "__libc_malloc". - The syntax for dereferencing $target variables and @cast() gained new capabilities: - Array indexes can now be arbitrary numeric expressions. - Array subscripts are now supported on pointer types. - An '&' operator before a @cast or $target returns the address of the final component, especially useful for nested structures. - For reading all probe variables, kernel.mark now supports $$vars and $$parms, and process.syscall now supports $$vars. - The SNMP tapset provides probes and functions for many network statistics. See stapprobes.snmp(3stap) for more details. - The dentry tapset provides functions to map kernel VFS directory entries to file or full path names: d_path(), d_name() and reverse_path_walk(). - SystemTap now has userspace markers in its own binaries, and the stap tapset provides the available probepoints and local variables. - Miscellaneous new tapset functions: - pgrp() returns the process group ID of the current process - str_replace() performs string replacement * What's new in version 0.9.8, 2009-06-11 - Miscellaneous new tapset functions: - sid() returns the session ID of the current process - stringat() indexes a single character from a string. - Using %M in print formats for hex dumps can now print entire buffers, instead of just small numbers. - Dwarfless syscalls: The nd_syscalls tapset is now available to probe system calls without requiring kernel debugging information. All of the same probepoints in the normal syscalls tapset are available with an "nd_" prefix, e.g. syscall.open becomes nd_syscall.open. Most syscall arguments are also available by name in nd_syscalls. - Module signing: If the appropriate nss libraries are available on your system, stap-server will sign each compiled module using a self-generated certificate. This is the first step toward extending authority to load certain modules to unprivileged users. For now, if the system administrator adds a certificate to a database of trusted signers (stap-authorize-signing-cert), modules signed using that certificate will be verified by staprun against tampering. Otherwise, you should notice no difference in the operation of stap or staprun. * What's new in version 0.9.7, 2009-04-23 - @cast can now determine its type information using an explicit header specification. For example: @cast(tv, "timeval", "")->tv_sec @cast(task, "task_struct", "kernel")->tgid - The overlapping process.* tapsets are now separated. Those probe points documented in stapprobes(3stap) remain the same. Those that were formerly in stapprobes.process(3stap) have been renamed to kprocess, to reflect their kernel perspective on processes. - The --skip-badvars option now also suppresses run-time error messages that would otherwise result from erroneous memory accesses. Such accesses can originate from $context expressions fueled by erroneous debug data, or by kernel_{long,string,...}() tapset calls. - New probes kprobe.function(FUNCTION) and kprobe.function(FUNCTION).return for dwarfless probing. These postpone function address resolution to run-time and use the kprobe symbol-resolution mechanism. Probing of absolute statements can be done using the kprobe.statement(ADDRESS).absolute construct. - EXPERIMENTAL support for user process unwinding. A new collection of tapset functions have been added to handle user space backtraces from probe points that support them (currently process and timer probes - for timer probes test whether or not in user space first with the already existing user_mode() function). The new tapset functions are: uaddr - User space address of current running task. usymname - Return the symbol of an address in the current task. usymdata - Return the symbol and module offset of an address. print_ustack - Print out stack for the current task from string. print_ubacktrace - Print stack back trace for current task. ubacktrace - Hex backtrace of current task stack. Please read http://sourceware.org/ml/systemtap/2009-q2/msg00364.html on the current restrictions and possible changes in the future and give feedback if you want to influence future developments. * What's new in version 0.9.5, 2009-03-27 - New probes process().insn and process().insn.block that allows inspection of the process after each instruction or block of instructions executed. So to count the total number of instructions a process executes during a run do something like: $ stap -e 'global steps; probe process("/bin/ls").insn {steps++} probe end {printf("Total instructions: %d\n", steps);}' \ -c /bin/ls This feature can slow down execution of a process somewhat. - Systemtap probes and function man pages extracted from the tapsets are now available under 3stap. To show the page for probe vm.pagefault or the stap function pexecname do: $ man 3stap vm.pagefault $ man 3stap pexecname - Kernel tracepoints are now supported for probing predefined kernel events without any debuginfo. Tracepoints incur less overhead than kprobes, and context parameters are available with full type information. Any kernel 2.6.28 and later should have defined tracepoints. Try the following to see what's available: $ stap -L 'kernel.trace("*")' - Typecasting with @cast now supports modules search paths, which is useful in case there are multiple places where the type definition may be found. For example: @cast(sdev, "scsi_device", "kernel:scsi_mod")->sdev_state - On-file flight recorder is supported. It allows stap to record huge trace log on the disk and to run in background. Passing -F option with -o option runs stap in background mode. In this mode, staprun is detached from console, and stap itself shows staprun's pid and exits. Specifying the max size and the max number of log files are also available by passing -S option. This option has one or two arguments seperated by a comma. The first argument is the max size of a log file in MB. If the size of a log file exceeds it, stap switches to the next log file automatically. The second is how many files are kept on the disk. If the number of log files exceeds it, the oldest log file is removed automatically. The second argument can be omitted. For example, this will record output on log files each of them is smaller than 1024MB and keep last 3 logs, in background. % stap -F -o /tmp/staplog -S 1024,3 script.stp - In guru mode (-g), the kernel probing blacklist is disabled, leaving only a subset - the kernel's own internal kprobe blacklist - to attempt to filter out areas unsafe to probe. The differences may be enough to probe more interrupt handlers. - Variables unavailable in current context may be skipped by setting a session level flag with command line option --skip-badvars now available. This replaces any dwarf $variable expressions that could not be resolved with literal numeric zeros, along with a warning message. - Both kernel markers and kernel tracepoint support argument listing through stap -L 'kernel.mark("*")' or stap -L 'kernel.trace("*")' - Users can use -DINTERRUPTIBLE=0 to prevent interrupt reentrancy in their script, at the cost of a bit more overhead to toggle the interrupt mask. - Added reentrancy debugging. If stap is run with the arguments "-t -DDEBUG_REENTRANCY", additional warnings will be printed for every reentrancy event, including the probe points of the resident and interloper probes. - Default to --disable-pie for configure. Use --enable-pie to turn it back on. - Improved sdt.h compatibility and test suite for static dtrace compatible user space markers. - Some architectures now use syscall wrappers (HAVE_SYSCALL_WRAPPERS). The syscall tapset has been enhanced to take care of the syscall wrappers in this release. - Security fix for CVE-2009-0784: stapusr module-path checking race. * What's new in version 0.9, 2009-02-19 - Typecasting is now supported using the @cast operator. A script can define a pointer type for a "long" value, and then access type members using the same syntax as with $target variables. For example, this will retrieve the parent pid from a kernel task_struct: @cast(pointer, "task_struct", "kernel")->parent->pid - process().mark() probes are now possible to trace static user space markers put in programs with the STAP_PROBE macro using the new sys/sdt.h include file. This also provides dtrace compatible markers through DTRACE_PROBE and an associated python 'dtrace' script that can be used in builds based on dtrace that need dtrace -h or -G functionality. - For those that really want to run stap from the build tree there is now the 'run-stap' script in the top-level build directory that sets up the SYSTEMTAP_TAPSET, SYSTEMTAP_RUNTIME, SYSTEMTAP_STAPRUN, and SYSTEMTAP_STAPIO environment variables (installing systemtap, in a local prefix, is still recommended for common use). - Systemtap now comes with a new Beginners Guide that walks the user through their first steps setting up stap, understanding how it all works, introduces some useful scripts and describes some common pitfalls. It isn't created by default since it needs a Publican setup, but full build instructions can be found in the wiki: http://sourceware.org/systemtap/wiki/PublicanQuikHowto An online version can be found at: http://sourceware.org/systemtap/SystemTap_Beginners_Guide.pdf - Standard tapsets included with Systemtap were modified to include extractable documentation information based on the kernel-doc infrastructure. When configured --enabled-docs a HTML and PDF version of the Tapset Reference Manual is produced explaining probes defined in each tapset. - The systemtap client and compile server are now available. These allow you to compile a systemtap module on a host other than the one which it will be run, providing the client and server are compatible. Other than using a server for passes 1 through 4, the client behaves like the 'stap' front end itself. This means, among other things, that the client will automatically load the resulting module on the local host unless -p[1234] was specified. See stap-server(8) for more details. The client/server now use SSL for network connection security and for signing. The systemtap client and server are prototypes only. Interfaces, options and usage may change at any time. - function("func").label("label") probes are now supported to allow matching the label of a function. - Systemtap initscript is available. This initscript allows you to run systemtap scripts as system services (in flight recorder mode) and control those scripts individually. See README.systemtap for details. - The stap "-r DIR" option may be used to identify a hand-made kernel build directory. The tool determines the appropriate release string automatically from the directory. - Serious problems associated with user-space probing in shared libraries were corrected, making it now possible to experiment with probe shared libraries. Assuming dwarf debugging information is installed, use this twist on the normal syntax: probe process("/lib64/libc-2.8.so").function("....") { ... } This would probe all threads that call into that library. Running "stap -c CMD" or "stap -x PID" naturally restricts this to the target command+descendants only. $$vars etc. may be used. - For scripts that sometimes terminate with excessive "skipped" probes, rerunning the script with "-t" (timing) will print more details about the skippage reasons. - Symbol tables and unwind (backtracing) data support were formerly compiled in for all probed modules as identified by the script (kernel; module("name"); process("file")) plus those listed by the stap "-d BINARY" option. Now, this data is included only if the systemtap script uses tapset functions like probefunc() or backtrace() that require such information. This shrinks the probe modules considerably for the rest. - Per-pass verbosity control is available with the new "--vp {N}+" option. "stap --vp 040" adds 4 units of -v verbosity only to pass 2. This is useful for diagnosing errors from one pass without excessive verbosity from others. - Most probe handlers now run with interrupts enabled, for improved system responsiveness and less probing overhead. This may result in more skipped probes, for example if a reentrant probe handler is attempted from within an interrupt handler. It may also make the systemtap overload detection facility more likely to be triggered, as interrupt handlers' run time would be included in the self-assessed overhead of running probe handlers. * What's new in version 0.8, 2008-11-13 - Cache limiting is now available. If the compiled module cache size is over a limit specified in the $SYSTEMTAP_DIR/cache/cache_mb_limit file, some old cache entries will be unlinked. See man stap(1) for more. - Error and warning messages are now followed by source context displaying the erroneous line/s and a handy '^' in the following line pointing to the appropriate column. - A bug reporting tool "stap-report" is now available which will quickly retrieve much of the information requested here: http://sourceware.org/systemtap/wiki/HowToReportBugs - The translator can resolve members of anonymous structs / unions: given struct { int foo; struct { int bar; }; } *p; this now works: $p->bar - The stap "-F" flag activates "flight recorder" mode, which consists of translating the given script as usual, but implicitly launching it into the background with staprun's existing "-L" (launch) option. A user can later reattach to the module with "staprun -A MODULENAME". - Additional context variables are available on user-space syscall probes. - $argN ($arg1, $arg2, ... $arg6) in process(PATH_OR_PID).syscall gives you the argument of the system call. - $return in process(PATH_OR_PID).syscall.return gives you the return value of the system call. - Target process mode (stap -c CMD or -x PID) now implicitly restricts all "process.*" probes to the given child process. (It does not affect kernel.* or other probe types.) The CMD string is normally run directly, rather than via a /bin/sh -c subshell, since then utrace/uprobe probes receive a fairly "clean" event stream. If metacharacters like redirection operators were present in CMD, then "sh -c CMD" is still used, and utrace/uprobe probes will receive events from the shell. % stap -e 'probe process.syscall, process.end { printf("%s %d %s\n", execname(), pid(), pp())}'\ -c ls ls 2323 process.syscall ls 2323 process.syscall ls 2323 process.end - Probe listing mode is improved: "-L" lists available script-level variables % stap -L 'syscall.*open*' syscall.mq_open name:string name_uaddr:long filename:string mode:long u_attr_uaddr:long oflag:long argstr:string syscall.open name:string filename:string flags:long mode:long argstr:string syscall.openat name:string filename:string flags:long mode:long argstr:string - All user-space-related probes support $PATH-resolved executable names, so probe process("ls").syscall {} probe process("./a.out").syscall {} work now, instead of just probe process("/bin/ls").syscall {} probe process("/my/directory/a.out").syscall {} - Prototype symbolic user-space probing support: # stap -e 'probe process("ls").function("*").call { log (probefunc()." ".$$parms) }' \ -c 'ls -l' This requires: - debugging information for the named program - a version of utrace in the kernel that is compatible with the "uprobes" kernel module prototype. This includes RHEL5 and older Fedora, but not yet current lkml-track utrace; a "pass 4a"-time build failure means your system cannot use this yet. - Global variables which are written to but never read are now automatically displayed when the session does a shutdown. For example: global running_tasks probe timer.profile {running_tasks[pid(),tid()] = execname()} probe timer.ms(8000) {exit()} - A formatted string representation of the variables, parameters, or local variables at a probe point is now supported via the special $$vars, $$parms, and $$locals context variables, which expand to a string containing a list "var1=0xdead var2=0xbeef var3=?". (Here, var3 exists but is for some reason unavailable.) In return probes only, $$return expands to an empty string for a void function, or "return=0xf00". * What's new in version 0.7, 2008-07-15 - .statement("func@file:*") and .statement("func@file:M-N") probes are now supported to allow matching a range of lines in a function. This allows tracing the execution of a function. - Scripts relying on probe point wildcards like "syscall.*" that expand to distinct kprobes are processed significantly faster than before. - The vector of script command line arguments is available in a tapset-provided global array argv[]. It is indexed 1 ... argc, another global. This can substitute for of preprocessor directives @NNN that fail at parse time if there are not enough arguments. printf("argv: %s %s %s", argv[1], argv[2], argv[3]) - .statement("func@file+line") probes are now supported to allow a match relative to the entry of the function incremented by line number. This allows using the same systemtap script if the rest of the file.c source only changes slightly. - A probe listing mode is available. % stap -l vm.* vm.brk vm.mmap vm.munmap vm.oom_kill vm.pagefault vm.write_shared - More user-space probe types are added: probe process(PID).begin { } probe process("PATH").begin { } probe process(PID).thread.begin { } probe process("PATH").thread.begin { } probe process(PID).end { } probe process("PATH").end { } probe process(PID).thread.end { } probe process("PATH").thread.end { } probe process(PID).syscall { } probe process("PATH").syscall { } probe process(PID).syscall.return { } probe process("PATH").syscall.return { } - Globals now accept ; terminators global odds, evens; global little[10], big[5]; * What's new in version 0.6, 2007-12-15 - A copy of the systemtap tutorial and language reference guide are now included. - There is a new format specifier, %m, for the printf family of functions. It functions like %s, except that it does not stop when a nul ('\0') byte is encountered. The number of bytes output is determined by the precision specifier. The default precision is 1. For example: printf ("%m", "My String") // prints one character: M printf ("%.5", myString) // prints 5 bytes beginning at the start // of myString - The %b format specifier for the printf family of functions has been enhanced as follows: 1) When the width and precision are both unspecified, the default is %8.8b. 2) When only one of the width or precision is specified, the other defaults to the same value. For example, %4b == %.4b == %4.4b 3) Nul ('\0') bytes are used for field width padding. For example, printf ("%b", 0x1111deadbeef2222) // prints all eight bytes printf ("%4.2b", 0xdeadbeef) // prints \0\0\xbe\xef - Dynamic width and precision are now supported for all printf family format specifiers. For example: four = 4 two = 2 printf ("%*.*b", four, two, 0xdeadbbeef) // prints \0\0\xbe\xef printf ("%*d", four, two) // prints 2 - Preprocessor conditional expressions can now include wildcard style matches on kernel versions. %( kernel_vr != "*xen" %? foo %: bar %) - Prototype support for user-space probing is showing some progress. No symbolic notations are supported yet (so no probing by function names, file names, process names, and no access to $context variables), but at least it's something: probe process(PID).statement(ADDRESS).absolute { } This will set a uprobe on the given process-id and given virtual address. The proble handler runs in kernel-space as usual, and can generally use existing tapset functions. - Crash utility can retrieve systemtap's relay buffer from a kernel dump image by using staplog which is a crash extension module. To use this feature, type commands as below from crash(8)'s command line: crash> extend staplog.so crash> help systemtaplog Then, you can see more precise help message. - You can share a relay buffer amoung several scripts and merge outputs from several scripts by using "-DRELAY_HOST" and "-DRELAY_GUEST" options. For example: # run a host script % stap -ve 'probe begin{}' -o merged.out -DRELAY_HOST & # wait until starting the host. % stap -ve 'probe begin{print("hello ");exit()}' -DRELAY_GUEST % stap -ve 'probe begin{print("world\n");exit()}' -DRELAY_GUEST Then, you'll see "hello world" in merged.out. - You can add a conditional statement for each probe point or aliase, which is evaluated when the probe point is hit. If the condition is false, the whole probe body(including aliases) is skipped. For example: global switch = 0; probe syscall.* if (switch) { ... } probe procfs.write {switch = strtol($value,10)} /* enable/disable ctrl */ - Systemtap will warn you if your script contains unused variables or functions. This is helpful in case of misspelled variables. If it doth protest too much, turn it off with "stap -w ...". - You can add error-handling probes to a script, which are run if a script was stopped due to errors. In such a case, "end" probes are not run, but "error" ones are. probe error { println ("oops, errors encountered; here's a report anyway") foreach (coin in mint) { println (coin) } } - In a related twist, one may list probe points in order of preference, and mark any of them as "sufficient" beyond just "optional". Probe point sequence expansion stops if a sufficient-marked probe point has a hit. This is useful for probes on functions that may be in a module (CONFIG_FOO=m) or may have been compiled into the kernel (CONFIG_FOO=y), but we don't know which. Instead of probe module("sd").function("sd_init_command") ? , kernel.function("sd_init_command") ? { ... } which might match neither, now one can write this: probe module("sd").function("sd_init_command") ! , /* <-- note excl. mark */ kernel.function("sd_init_command") { ... } - New security model. To install a systemtap kernel module, a user must be one of the following: the root user; a member of the 'stapdev' group; or a member of the 'stapusr' group. Members of the stapusr group can only use modules located in the /lib/modules/VERSION/systemtap directory (where VERSION is the output of "uname -r"). - .statement("...@file:line") probes now apply heuristics to allow an approximate match for the line number. This works similarly to gdb, where a breakpoint placed on an empty source line is automatically moved to the next statement. A silly bug that made many $target variables inaccessible to .statement() probes was also fixed. - LKET has been retired. Please let us know on if you have been a user of the tapset/tools, so we can help you find another way. - New families of printing functions println() and printd() have been added. println() is like print() but adds a newline at the end; printd() is like a sequence of print()s, with a specified field delimiter. * What's new since version 0.5.14?, 2007-07-03 - The way in which command line arguments for scripts are substituted has changed. Previously, $1 etc. would interpret the corresponding command line argument as an numeric literal, and @1 as a string literal. Now, the command line arguments are pasted uninterpreted wherever $1 etc. appears at the beginning of a token. @1 is similar, but is quoted as a string. This change does not modify old scripts, but has the effect of permitting substitution of arbitrary token sequences. # This worked before, and still does: % stap -e 'probe timer.s($1) {}' 5 # Now this also works: % stap -e 'probe syscall.$1 {log(@1)}' open # This won't crash, just signal a recursion error: % stap -e '$1' '$1' # As before, $1... is recognized only at the beginning of a token % stap -e 'probe begin {foo$1=5}' * What's new since version 0.5.13?, 2007-03-26 - The way in which systemtap resolves function/inline probes has changed: .function(...) - now refers to all functions, inlined or not .inline(...) - is deprecated, use instead: .function(...).inline - filters function() to only inlined instances .function(...).call - filters function() to only non-inlined instances .function(...).return - as before, but now pairs best with .function().call .statement() is unchanged. * What's new since version 0.5.12?, 2007-01-01 - When running in -p4 (compile-only) mode, the compiled .ko file name is printed on standard output. - An array element with a null value such as zero or an empty string is now preserved, and will show up in a "foreach" loop or "in" test. To delete such an element, the scripts needs to use an explicit "delete array[idx]" statement rather than something like "array[idx]=0". - The new "-P" option controls whether prologue searching heuristics will be activated for function probes. This was needed to get correct debugging information (dwarf location list) data for $target variables. Modern compilers (gcc 4.1+) tend not to need this heuristic, so it is no longer default. A new configure flag (--enable-prologues) restores it as a default setting, and is appropriate for older compilers (gcc 3.*). - Each systemtap module prints a one-line message to the kernel informational log when it starts. This line identifies the translator version, base address of the probe module, a broken-down memory consumption estimate, and the total number of probes. This is meant as a debugging / auditing aid. - Begin/end probes are run with interrupts enabled (but with preemption disabled). This will allow begin/end probes to be longer, to support generating longer reports. - The numeric forms of kernel.statement() and kernel.function() probe points are now interpreted as relocatable values - treated as relative to the _stext symbol in that kernel binary. Since some modern kernel images are relocated to a different virtual address at startup, such addresses may shift up or down when actually inserted into a running kernel. kernel.statement(0xdeadbeef): validated, interpreted relative to _stext, may map to 0xceadbeef at run time. In order to specify unrelocated addresses, use the new ".absolute" probe point suffix for such numeric addresses. These are only allowed in guru mode, and provide access to no $target variables. They don't use debugging information at all, actually. kernel.statement(0xfeedface).absolute: raw, unvalidated, guru mode only * What's new since version 0.5.10?, 2006-10-19 - Offline processing of debugging information, enabling general cross-compilation of probe scripts to remote hosts, without requiring identical module/memory layout. This slows down compilation/translation somewhat. - Kernel symbol table data is loaded by staprun at startup time rather than compiled into the module. - Support the "limit" keyword for foreach iterations: foreach ([x,y] in ary limit 5) { ... } This implicitly exits after the fifth iteration. It also enables more efficient key/value sorting. - Support the "maxactive" keyword for return probes: probe kernel.function("sdfsdf").maxactive(848) { ... } This allows up to 848 concurrently outstanding entries to the sdfsdf function before one returns. The default maxactive number is smaller, and can result in missed return probes. - Support accessing of saved function arguments from within return probes. These values are saved by a synthesized function-entry probe. - Add substantial version/architecture checking in compiled probes to assert correct installation of debugging information and correct execution on a compatible kernel. - Add probe-time checking for sufficient free stack space when probe handlers are invoked, as a safety improvement. - Add an optional numeric parameter for begin/end probe specifications, to order their execution. probe begin(10) { } /* comes after */ probe begin(-10) {} - Add an optional array size declaration, which is handy for very small or very large ones. global little[5], big[20000] - Include some example scripts along with the documentation. - Change the start-time allocation of probe memory to avoid causing OOM situations, and to abort cleanly if free kernel memory is short. - Automatically use the kernel DWARF unwinder, if present, for stack tracebacks. - Many minor bug fixes, performance, tapset, and error message improvements. systemtap-2.9/README000066400000000000000000000124671260561570600143170ustar00rootroot00000000000000systemtap: a linux trace/probe tool Visit the project web site at , for documentation and mailing lists for developers and users. This is free software. See the COPYING file for redistribution/modification terms. See the INSTALL file for generic build instructions. See the HACKING file for contribution advice. Prerequisites: - linux kernel - kernel module build environment (kernel-devel rpm) and/or dyninst - optionally, debugging information for kernel/user-space being instrumented - C compiler (same as what kernel was compiled with) - elfutils with libdwfl for debugging information parsing - root privileges Installation steps: - Install any debuginfo packages you need, for kernel and/or userspace. On modern Fedora, # debuginfo-install kernel [...] (Beware of confusion between kernel vs. kernel-debug vs kernel-PAE etc. variants. Each likely has a corresponding development and debuginfo package.) - Install the systemtap package. On modern Fedora, # yum install systemtap systemtap-runtime Build steps: - Consider installing the kernel-debuginfo, kernel-devel, gcc and dependent packages (or see below if you are building your own kernels from source). If using only the pure-userspace dyninst backend, install gcc and dyninst-devel. - If available, install your distribution's copy of elfutils and its development headers/libraries. Or if desired, download an elfutils source release to build in "bundled mode" (below), and untar it into some new directory. Or if desired, build elfutils separately one time, and install it to /usr/local. See http://fedorahosted.org/elfutils/ Version 0.151 is recommended for i386 hosts probing prelinked programs. (PR12141) - On modern Fedora, install general optional build-requisites: # yum-builddep systemtap On modern Debian/Ubuntu, similarly: # apt-get build-dep systemtap - Download systemtap sources: http://sourceware.org/systemtap/ftp/releases/ http://sourceware.org/systemtap/ftp/snapshots/ (or) git clone git://sourceware.org/git/systemtap.git (or) http://sourceware.org/git/systemtap.git - Build systemtap normally: % .../configure [other autoconf options] Or, with build it with a bundled internal copy of elfutils: % .../configure --with-elfutils=ELFUTILS-SOURCE-DIR [other autoconf options] (Note that elfutils > 0.139 requires gcc > 4.0 or else the appropriate elfutils-portability.patch. Ensure decompression library headers/libraries are installed for elfutils' use.) Consider configuring with "--enable-dejazilla" to automatically contribute to our public test result database. Consider configuring with "--prefix=DIRECTORY" to specify an installation directory other than /usr/local. It can be an ordinary personal directory. % make all # make install To uninstall systemtap: # make uninstall - Run systemtap: To run systemtap after installation, add $prefix/bin to your $PATH, or refer to $prefix/bin/stap directly. If you keep your build tree around, you can also use the "stap" binary there. Some samples should be available under $prefix/share/doc/systemtap/examples. For the normal linux-kernel-module based backend, run "stap" as root. If desired, create "stapdev" and "stapusr" entries in /etc/groups. Any users in "stapdev"+"stapusr" will be able to run systemtap as if with root privileges. Users in "stapusr" only may launch (with "staprun") pre-compiled probe modules (created by "stap -p4 ...") that a system administrator copied under /lib/modules/`uname -r`/systemtap. "stapusr" may also be permitted to create arbitrary unprivileged systemtap scripts of their own. See README.unprivileged for additional setup instructions. To run a simple test. # stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}' To run the full test suite from the build tree. # make installcheck For the prototype dyninst pure-userspace backend, run "stap" as any user. % stap --runtime=dyninst -e 'probe process.function("*") { println(pn(), ":", $$parms) }' -c 'ls' Tips: - By default, systemtap looks for the debug info in these locations: /boot/vmlinux-`uname -r` /usr/lib/debug/lib/modules/`uname -r`/vmlinux /lib/modules/`uname -r`/vmlinux /lib/modules/`uname -r`/build/vmlinux Building a kernel.org kernel: - Consider applying the utrace kernel patches, if you wish to probe user-space applications. http://sourceware.org/systemtap/wiki/utrace Or if your kernel is near 3.5, apply the uprobes and related patches (see NEWS). Or if your kernel is >= 3.5, enjoy the built-in uprobes. - Build the kernel using your normal procedures. Enable CONFIG_DEBUG_INFO, CONFIG_KPROBES, CONFIG_RELAY, CONFIG_DEBUG_FS, CONFIG_MODULES, CONFIG_MODULE_UNLOAD, CONFIG_UTRACE if able - % make modules_install install headers_install - Boot into the kernel. - If you wish to leave the kernel build tree in place, simply run % stap -r /path/to/kernel/build/tree [...] You're done. - Or else, if you wish to install the kernel build/debuginfo data into a place where systemtap will find it without the "-r" option: % ln -s /path/to/kernel/build/tree /lib/modules/RELEASE/build - Instead of using the "-r" option, you can also use the environment variable SYSTEMTAP_RELEASE to direct systemtap to the kernel data. systemtap-2.9/README.security000066400000000000000000000074731260561570600161660ustar00rootroot00000000000000Systemtap builds kernel modules. To insert a kernel module on a system, root access is needed. SECURITY MODEL ============== Originally sudo(8) was used to grant root access. After compiling a new kernel module, stap ran "sudo staprun module_path". This worked, but required all systemtap users to have root access. Many sysadmins on enterprise systems do not have root access. So, a new security model was developed. To run the staprun program (which installs systemtap kernel modules), a user must be one of the following: * the root user; * a member of both 'stapdev' and 'stapusr' groups; or * a member of the 'stapusr' group. Members of the stapusr group can only use modules located in the /lib/modules/VERSION/systemtap directory (where VERSION is the output of "uname -r"). This directory must be owned by root and not be world writable. So, there are two classes of users: systemtap developers (the root user and members of the stapdev/stapusr groups) and systemtap users (members of only the stapusr group). Systemtap developers can compile and run any systemtap script. Systemtap users can only run "approved" pre-compiled modules located in /lib/modules/VERSION/systemtap. USAGE ===== Here's the usage case. A systemtap developer hears of a problem on a production machine (which doesn't have a compiler or kernel debuginfo installed). So, he write a systemtap script to probe certain areas of the kernel that will give him a better idea of what is going on. He develops the script on a development machine (that has the compiler and kernel debuginfo installed). Once he is satisfied with the systemtap script, he creates the systemtap kernel module and copies it to /lib/modules/VERSION/systemtap on the target production machine. He then asks a systemtap user on that machine to run the module and report the results. The above usage case would look something like this: On the development machine: # vi pmod.stp (The systemtap developer writes the systemtap script.) # stap -m pmod pmod.stp (The systemtap developer compiles and runs the script. If necessary, the script may need to be edited to fix any errors.) # scp pmod.ko prod_machine:/lib/modules/`uname -r`/systemtap (The systemtap developer copies the compiled kernel module to the proper directory on the production machine. Of course other methods - ftp, nfs, etc. could be used to transfer the module.) On the production machine: $ staprun pmod (The systemtap user runs the newly developed systemtap kernel module.) There are (at least) 2 different usage scenarios for the /lib/modules/VERSION/systemtap directory. 1) Most restrictive usage. If only root should be able to add "approved" systemtap modules to /lib/modules/VERSION/systemtap, the permissions should be 755, like this: drwxr-xr-x 2 root root 4096 2007-08-07 13:54 systemtap/ 2) More permissive usage. If all systemtap developers should be able to add "approved" systemtap modules to /lib/modules/VERSION/systemtap, its permissions should be 775 (and be owned by root, group stapdev), like this: drwxrwxr-x 2 root stapdev 4096 2007-08-07 13:54 systemtap/ INTERNALS ========= To accomplish the new security model, staprun has been split into two programs: staprun and stapio. Here is a description of a typical systemtap session. The staprun program is a setuid program that does some system setup, loads the kernel module, then runs stapio (and waits for it to finish). The stapio program runs as the invoking user and is responsible for all communication with the kernel module. After the script runs to completion, stapio fork/execs staprun -d to unload the kernel module. staprun is a setuid program. It holds on to the root privileges only for the least amount of time (as required to verify/load compiled kernel module files). It invokes only stapio, and only as the original (unprivileged) user. systemtap-2.9/README.stapregex000066400000000000000000000011361260561570600163070ustar00rootroot00000000000000The following files in this directory incorporate code from the re2c project: - stapregex.h - stapregex.cxx - stapregex-tree.h - stapregex-tree.cxx - stapregex-parse.h - stapregex-parse.cxx - stapregex-dfa.h - stapregex-dfa.cxx The codebase these files are based on was originally released into the public domain. Many thanks to the developers of re2c for their work. As a courtesy to the original developers of re2c, please include appropriate acknowledgment in future code derived from this file. Information on the original re2c distribution can be found at: http://sourceforge.net/projects/re2c/ systemtap-2.9/README.unprivileged000066400000000000000000000303111260561570600167770ustar00rootroot00000000000000Unprivileged Mode for Systemtap Users ===================================== Introduction ------------ In order to use the full capabilities of systemtap, one must run it as root or as a member of the groups stapusr and stapdev. For other (unprivileged) users, systemtap does provide support for use of a subset of systemtap's capabilities to perform limited probing. For example, tracing your own applications or polling using timers. The intent is to give unprivileged users capabilities similar to those provided by a debugger. Below are instructions for running systemtap scripts in unprivileged mode. Systemtap Compile Server ------------------------ In order to load the kernel module produced by compiling a systemtap script for an unprivileged user, we must know that the script was compiled correctly and that the script does not do anything dangerous. A systemap compile server provides the trusted compilation environment needed to certify both conditions. NOTE: In order to use a compile server, the nss and nspr packages must be installed on the client host and systemtap must have been built with NSS enabled. Run 'stap -V | grep NSS' to find out if NSS is enabled. NOTE: In order to detect servers on the local network, the avahi package must be installed on the client host and systemtap must have been built with avahi enabled. Run 'stap -V | grep AVAHI' to find out if avahi is enabled. To find out if a suitable server is available on the local network, this command should produce output similar to the following: # stap --list-servers --privileged=stapusr Systemtap Compile Server Status for 'online,trusted,compatible,signer' host=somehost ip=10.15.16.156 port=10913 sysinfo="2.6.34.7-66.fc13.x86_64 x86_64" certinfo="00:93:49:be:2a" NOTE: In order for servers to be detected, the port for mDNS (5353/udp) must be open on the server and client hosts. If no servers are listed, then you must ask your system administrator to make the appropriate compile server available on the local host or on the local network. The server must be trusted as an ssl peer and as a systemtap module signer on the local host. See "Setup and Administration of Unprivileged Users for System Administrators" below for more details. Trust of Unprivileged Users --------------------------- Even with the appropriate compile server available, each unprivileged user must be explicitly trusted. This is done by adding each unprivileged user to the group stapusr and possibly the group stapsys on each host on which they will run systemtap scripts. To see if you are a member of the group stapusr on the local host, this command should produce output similar to the following: # getent group stapusr stapusr:x:483:someuser,anotheruser If your userid is listed, then you are already a member of the group stapusr. If it is not, then you must ask your system administrator to add you to this group. Once added, Try the command newgrp stapusr to activate your membership. If all else fails, logging out and back in again should work. See the manual page for newgrp(1) for details. Using Systemtap in Unprivileged Mode ------------------------------------ Unprivileged users can compile any systemtap script either directly or using a compile server, but systemtap will not load the resulting kernel module for an unprivileged user unless it has been compiled and certified by a trusted compile server. To do this, as an unprivileged user, this command should produce output similar to the following: # stap -e 'probe begin { printf ("Hello\n"); exit (); }' Hello For unprivileged users, stap will automatically add the options --privilege and --use-server (you could also specify them yourself). --use-server tells systemtap to compile the script using a server. --privilege tells the server to check the script to maker sure it doesn't do anything 'dangerous', i.e. nothing that a user with the specified privilege credentials shouldn't be able to do. If the server approves of your script and is able to compile it, systemtap will then load the resulting module for you even though you are an unprivileged user. If you save the resulting module by using the -p4 option of stap, then trusted, unprivileged users can load the module at a later time using staprun: # stap -e 'probe begin { printf ("Hello\n"); exit (); }' -p4 stap_5330.ko # staprun stap_5330.ko Hello Note that the module has already been certified (signed), so no special options are needed. Additional Information ---------------------- o When specifying path names in your script and compiling using a server, you must use a server which has access to those paths (e.g. via nfs, or a server on the local host) and you must specify the paths in full from the servers's point of view. For example, specify probe process("foo").begin() as probe process("/the/full/path/as/seen/by/the/server/to/foo").begin() o You can use '--privilege=[stapusr|stapsys] -pN' (for 1 <= N <= 4) without --use-server to compile and check scripts directly. stap will still check your script for 'dangerous' behavior, but will not load it for an unprivileged user. o When using --privilege, all compile time and run time restrictions are enforced for all users, including root and members of the group stapdev. Setup and Administration of Unprivileged Users for System Administrators ======================================================================== Introduction ------------ In order to use the full capabilities of systemtap, one must run it as root or as a member of the group stapdev. For other (unprivileged) users, systemtap does provide support for use of a subset of systemtap's capabilities to perform limited probing. For example, tracing your own applications or polling using timers. The intent is to give unprivileged users capabilities similar to those provided by a debugger. In order for this to happen, the system administrator must first perform some setup: o Systemtap compile server(s) must be made available on the local network. One server is needed for each kernel version and architecture pair for which users will compile scripts. o The compile server(s) must be trusted as an SSL peer and as a signer of systemtap modules on hosts on which unprivileged users will compile and run their scripts respectively. o Unprivileged users must be added to the group stapusr, and possibly the group stapsys on the host(s) on which they will run their scripts. Below are the necessary steps for the system administrator to setup the above infrastructure. Systemtap Compile Server ------------------------ In order to load the kernel module produced by compiling a systemtap script for an unprivileged user, we must know that the script was compiled correctly and that the script does not do anything dangerous. A systemap compile server provides a trusted environment needed to certify both conditions. In order to make a compile server available on the local network the systemtap-server package and its prerequisites must be installed on the server host. The system administrator then uses the following command: sudo service stap-server start [-r KERNEL-RELEASE] [-a ARCH] For example: # sudo service stap-server start -r 2.6.34.7-61.fc13.x86_64 -a x86_64 Starting stap-server -a "x86_64" -r "2.6.34.7-61.fc13.x86_64" -u "stap-server" [ OK ] This starts a compile server for the specified kernel release and hardware architecture. The kernel and kernel-devel package for the specified release and architecture must be installed on the server host. The kernel-debuginfo package for each kernel release and architecture should also be installed, but is not relevant for unprivileged users. If either one (or both) the kernel release and/or architecture is not specified, the kernel release and/or architecture of the server host will be used: # sudo service stap-server start Starting stap-server -a "x86_64" -r "2.6.34.7-66.fc13.x86_64" -u "stap-server" [ OK ] As a short cut, to start a server for each kernel release and architecture installed on the server host, use the command: # sudo service stap-server start -i Starting stap-server -a "x86_64" -r "2.6.34.7-61.fc13.x86_64" -u "stap-server" [ OK ] Starting stap-server -a "x86_64" -r "2.6.34.7-63.fc13.x86_64" -u "stap-server" [ OK ] Starting stap-server -a "x86_64" -r "2.6.34.7-66.fc13.x86_64" -u "stap-server" [ OK ] NOTE: Only root can start a systemtap server using the service command. Trust of Compile Servers ------------------------ Once systemtap compile servers have been made available on the local network, the system administrator must certify which ones are trusted as SSL peers, as systemtap kernel module signers or both. Certifying a compile server as an SSL peer means what the system administrator trusts that it compiles systemtap scripts correctly. Certifying a compile server as a module signer means that the system administrator trusts it to correctly check a systemtap script for behavior which should not be made available to unprivileged users. When a script is compiled using the --privilege option, the server checks the script for such behavior and cryptographically signs the resulting module if it is safe for use by unprivileged users. Verification of the signature certifies that the module was certified as 'safe' by the server and that it has not been altered since it was certified. Systemtap compile servers started by using the 'service' command are automatically trusted both as SSL peers and as module signers on the server's host. No further setup of the servers is necessary for users (clients) on that same host. Before clients on another host can make use of a server, the system administrator of each client host must certify trust in that server. This is performed in two steps: 1) Identify the server(s) to be trusted. # stap --list-servers=online,compatible Systemtap Compile Server Status for 'online,compatible' host=somehost ip=10.15.16.156 port=26543 sysinfo="2.6.34.7-66.fc13.x86_64 x86_64" certinfo="00:93:49:be:2a" Identify the server(s) to be trusted by examining the host name, ip address and sysinfo (kernel release and architecture). Take note of the 'certinfo' field of each server to be trusted. NOTE: In order for servers to be detected, the port for mDNS (5353/udp) must be open on the server and client hosts. 2) For each server to be trusted for use by unprivileged clients, use the command: sudo stap --trust-servers=ssl,signer,all-users --use-server=CERTINFO1 [--use-server=CERTINFO2 ...] where each CERTINFOn is the value of the 'certinfo' field of a server to be trusted (obtained using the previous command). For example: # sudo stap --trust-servers=ssl,signer,all-users --use-server=00:93:49:be:2a Add trust in the following servers as an SSL peer for all users and as a module signer for all users? host=somehost ip=10.15.16.156 port=26543 sysinfo="2.6.34.7-66.fc13.x86_64 x86_64" certinfo="00:93:49:be:2a" [y/N] y Using the 'certinfo' to specify each server ensures that the exact servers which were intended are the ones which become trusted. Note that only root can certify trust in a server as signer in this way. Now verify the result: # stap --list-servers --privilege=stapusr Systemtap Compile Server Status for 'online,trusted,compatible,signer' host=somehost ip=10.15.16.156 port=26543 sysinfo="2.6.34.7-66.fc13.x86_64 x86_64" certinfo="00:93:49:be:2a" Each of the servers you specified in stap 2 above should be listed. Trust of Unprivileged Users --------------------------- Finally, once compile servers have been set up and are trusted, each unprivileged user must be explicitly trusted. This is done by adding each unprivileged user to the group stapusr, and possibly the group stapsys on each host on which they will run systemtap scripts: sudo usermod -a -G stapusr[,stapsys] USERID If the user is already logged in, they can try using newgrp stapusr to activate their membership. If all else fails, logging out and back in again should work. See newgrp(1) for details. systemtap-2.9/aclocal.m4000066400000000000000000001536301260561570600152750ustar00rootroot00000000000000# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # intlmacosx.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2004-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in Mac OS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in Mac OS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyCurrent();]])], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # -*- Autoconf -*- # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl AC_CONFIG_HEADERS($@)]) AC_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should simply use the 'AC][_PROG_CC' macro instead. Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon 'ac_cv_prog_cc_stdc'.])]) AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ax_check_compile_flag.m4]) m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) systemtap-2.9/auto_free.h000066400000000000000000000024171260561570600155530ustar00rootroot00000000000000// -*- C++ -*- // Copyright (C) 2008 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #ifndef AUTO_FREE_H #define AUTO_FREE_H 1 #include // Very simple auto_ptr-like class for protecting storage allocated // with free(). class auto_free { public: auto_free(void* ptr) : _ptr(ptr) {} ~auto_free() { if (_ptr) std::free(_ptr); } void release() { _ptr = 0; } private: // No copying allowed. auto_free(const auto_free& af); // No assignment either auto_free& operator=(const auto_free& rhs); void* _ptr; }; // Use this to free a pointer whose value may change after the initial // allocation e.g., be realloced. template class auto_free_ref { public: typedef T pointer_type; auto_free_ref(pointer_type& ptr) : _ptr(ptr) { } ~auto_free_ref() { if (_ptr) std::free(_ptr); } private: // No copying allowed. auto_free_ref(const auto_free_ref& af); // No assignment either auto_free_ref& operator=(const auto_free_ref& rhs); pointer_type& _ptr; }; #endif /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/buildrun.cxx000066400000000000000000001105711260561570600160020ustar00rootroot00000000000000// build/run probes // Copyright (C) 2005-2015 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #include "config.h" #include "buildrun.h" #include "session.h" #include "util.h" #include "hash.h" #include "translate.h" #include #include #include extern "C" { #include #include #include #include #include #include #include #include #include #include } using namespace std; /* Adjust and run make_cmd to build a kernel module. */ static int run_make_cmd(systemtap_session& s, vector& make_cmd, bool null_out=false, bool null_err=false) { assert_no_interrupts(); // PR14168: we used to unsetenv values here; instead do it via // env(1) in make_any_make_cmd(). // Disable ccache to avoid saving files that will never be reused. // (ccache is useless to us, because our compiler commands always // include the randomized tmpdir path.) // It's not critical if this fails, so the return is ignored. (void) setenv("CCACHE_DISABLE", "1", 0); if (s.verbose > 2) make_cmd.push_back("V=1"); else if (s.verbose > 1) make_cmd.push_back("--no-print-directory"); else { make_cmd.push_back("-s"); make_cmd.push_back("--no-print-directory"); } // Exploit SMP parallelism, if available. long smp = sysconf(_SC_NPROCESSORS_ONLN); if (smp <= 0) smp = 1; // PR16276: but only if we're not running severely nproc-rlimited struct rlimit rlim; int rlimit_rc = getrlimit(RLIMIT_NPROC, &rlim); const unsigned int severely_limited = smp*30; // WAG at number of gcc+make etc. nested processes bool nproc_limited = (rlimit_rc == 0 && (rlim.rlim_max <= severely_limited || rlim.rlim_cur <= severely_limited)); if (smp >= 1 && !nproc_limited) make_cmd.push_back("-j" + lex_cast(smp+1)); if (strverscmp (s.kernel_base_release.c_str(), "2.6.29") < 0) { // Older kernels, before linux commit #fd54f502841c1, include // gratuitous "echo"s in their Makefile. We need to suppress // that with this bluntness. null_out = true; } int rc = stap_system (s.verbose, "kbuild", make_cmd, null_out, null_err); if (rc != 0) s.set_try_server (); return rc; } static vector make_any_make_cmd(systemtap_session& s, const string& dir, const string& target) { vector make_cmd; // PR14168: sanitize environment variables for kbuild invocation make_cmd.push_back("env"); make_cmd.push_back("-uARCH"); make_cmd.push_back("-uKBUILD_EXTMOD"); make_cmd.push_back("-uCROSS_COMPILE"); make_cmd.push_back("-uKBUILD_IMAGE"); make_cmd.push_back("-uKCONFIG_CONFIG"); make_cmd.push_back("-uINSTALL_PATH"); string newpath = string("PATH=/usr/bin:/bin:") + (getenv("PATH") ?: ""); make_cmd.push_back(newpath.c_str()); make_cmd.push_back("make"); make_cmd.push_back("-C"); make_cmd.push_back(s.kernel_build_tree); make_cmd.push_back("M=" + dir); // need make-quoting? make_cmd.push_back(target); // Add architecture, except for old powerpc (RHBZ669082) if (s.architecture != "powerpc" || (strverscmp (s.kernel_base_release.c_str(), "2.6.15") >= 0)) make_cmd.push_back("ARCH=" + s.architecture); // need make-quoting? // PR13847: suppress debuginfo creation by default make_cmd.insert(make_cmd.end(), "CONFIG_DEBUG_INFO="); // Add any custom kbuild flags make_cmd.insert(make_cmd.end(), s.kbuildflags.begin(), s.kbuildflags.end()); return make_cmd; } static vector make_make_cmd(systemtap_session& s, const string& dir) { return make_any_make_cmd(s, dir, "modules"); } static vector make_make_objs_cmd(systemtap_session& s, const string& dir) { // Kbuild uses these rules to build external modules: // // module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) // modules: $(module-dirs) // @$(kecho) ' Building modules, stage 2.'; // $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost // // So if we're only interested in the stage 1 objects, we can // cheat and make only the $(module-dirs) part. return make_any_make_cmd(s, dir, "_module_" + dir); } static void output_autoconf(systemtap_session& s, ofstream& o, const char *autoconf_c, const char *deftrue, const char *deffalse) { o << "\t"; if (s.verbose < 4) o << "@"; o << "if $(CHECK_BUILD) $(SYSTEMTAP_RUNTIME)/linux/" << autoconf_c; if (s.verbose < 5) o << " > /dev/null 2>&1"; o << "; then "; if (deftrue) o << "echo \"#define " << deftrue << " 1\""; if (deffalse) o << "; else echo \"#define " << deffalse << " 1\""; o << "; fi >> $@" << endl; } void output_exportconf(systemtap_session& s, ofstream& o, const char *symbol, const char *deftrue) { o << "\t"; if (s.verbose < 4) o << "@"; if (s.kernel_exports.find(symbol) != s.kernel_exports.end()) o << "echo \"#define " << deftrue << " 1\""; o << ">> $@" << endl; } void output_dual_exportconf(systemtap_session& s, ofstream& o, const char *symbol1, const char *symbol2, const char *deftrue) { o << "\t"; if (s.verbose < 4) o << "@"; if (s.kernel_exports.find(symbol1) != s.kernel_exports.end() && s.kernel_exports.find(symbol2) != s.kernel_exports.end()) o << "echo \"#define " << deftrue << " 1\""; o << ">> $@" << endl; } void output_either_exportconf(systemtap_session& s, ofstream& o, const char *symbol1, const char *symbol2, const char *deftrue) { o << "\t"; if (s.verbose < 4) o << "@"; if (s.kernel_exports.find(symbol1) != s.kernel_exports.end() || s.kernel_exports.find(symbol2) != s.kernel_exports.end()) o << "echo \"#define " << deftrue << " 1\""; o << ">> $@" << endl; } static int compile_dyninst (systemtap_session& s) { const string module = s.tmpdir + "/" + s.module_filename(); vector cmd; cmd.push_back("gcc"); cmd.push_back("--std=gnu99"); cmd.push_back("-Wall"); cmd.push_back("-Werror"); cmd.push_back("-Wno-unused"); cmd.push_back("-Wno-strict-aliasing"); // BZ855981/948279. Since dyninst/runtime.h includes __sync_* calls, // the compiler may generate different code for it depending on -march. // For example, if the default is i386, we may get references to auxiliary // functions like __sync_add_and_fetch_4, which appear to be defined // nowhere. We hack around this problem thusly: if (s.architecture == "i386") cmd.push_back("-march=i586"); cmd.push_back("-fvisibility=hidden"); cmd.push_back("-O2"); cmd.push_back("-I" + s.runtime_path); cmd.push_back("-D__DYNINST__"); for (size_t i = 0; i < s.c_macros.size(); ++i) cmd.push_back("-D" + s.c_macros[i]); cmd.push_back(s.translated_source); cmd.push_back("-pthread"); cmd.push_back("-lrt"); cmd.push_back("-fPIC"); cmd.push_back("-shared"); cmd.push_back("-o"); cmd.push_back(module); if (s.verbose > 3) { cmd.push_back("-ftime-report"); cmd.push_back("-Q"); } int rc = stap_system (s.verbose, cmd); if (rc) s.set_try_server (); return rc; } int compile_pass (systemtap_session& s) { if (s.runtime_usermode_p()) return compile_dyninst (s); int rc = uprobes_pass (s); if (rc) { s.set_try_server (); return rc; } // fill in a quick Makefile string makefile_nm = s.tmpdir + "/Makefile"; ofstream o (makefile_nm.c_str()); // Create makefile // Clever hacks copied from vmware modules string superverbose; if (s.verbose > 3) superverbose = "set -x;"; string redirecterrors = "> /dev/null 2>&1"; if (s.verbose > 6) redirecterrors = ""; // Support O= (or KBUILD_OUTPUT) option o << "_KBUILD_CFLAGS := $(call flags,KBUILD_CFLAGS)" << endl; o << "stap_check_gcc = $(shell " << superverbose << " if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo \"$(1)\"; else echo \"$(2)\"; fi)" << endl; o << "CHECK_BUILD := $(CC) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(LINUXINCLUDE) $(_KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\"" << (s.omit_werror ? "" : " -Werror") << " -S -o /dev/null -xc " << endl; o << "stap_check_build = $(shell " << superverbose << " if $(CHECK_BUILD) $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; o << "SYSTEMTAP_RUNTIME = \"" << s.runtime_path << "\"" << endl; // "autoconf" options go here // RHBZ 543529: early rhel6 kernels' module-signing kbuild logic breaks out-of-tree modules o << "CONFIG_MODULE_SIG := n" << endl; string module_cflags = "EXTRA_CFLAGS"; o << module_cflags << " :=" << endl; // XXX: This gruesome hack is needed on some kernels built with separate O=directory, // where files like 2.6.27 x86's asm/mach-*/mach_mpspec.h are not found on the cpp path. // This could be a bug in arch/x86/Makefile that names // mflags-y += -Iinclude/asm-x86/mach-default // but that path does not exist in an O= build tree. o << module_cflags << " += -Iinclude2/asm/mach-default" << endl; if (s.kernel_source_tree != "") o << module_cflags << " += -I" + s.kernel_source_tree << endl; // NB: don't try // o << module_cflags << " += -Iusr/include" << endl; // since such headers are cleansed of _KERNEL_ pieces that we need o << "STAPCONF_HEADER := " << s.tmpdir << "/" << s.stapconf_name << endl; o << "$(STAPCONF_HEADER):" << endl; o << "\t@echo -n > $@" << endl; output_autoconf(s, o, "autoconf-hrtimer-rel.c", "STAPCONF_HRTIMER_REL", NULL); output_exportconf(s, o, "hrtimer_get_res", "STAPCONF_HRTIMER_GET_RES"); output_autoconf(s, o, "autoconf-generated-compile.c", "STAPCONF_GENERATED_COMPILE", NULL); output_autoconf(s, o, "autoconf-hrtimer-getset-expires.c", "STAPCONF_HRTIMER_GETSET_EXPIRES", NULL); output_autoconf(s, o, "autoconf-inode-private.c", "STAPCONF_INODE_PRIVATE", NULL); output_autoconf(s, o, "autoconf-constant-tsc.c", "STAPCONF_CONSTANT_TSC", NULL); output_autoconf(s, o, "autoconf-ktime-get-real.c", "STAPCONF_KTIME_GET_REAL", NULL); output_autoconf(s, o, "autoconf-x86-uniregs.c", "STAPCONF_X86_UNIREGS", NULL); output_autoconf(s, o, "autoconf-nameidata.c", "STAPCONF_NAMEIDATA_CLEANUP", NULL); output_dual_exportconf(s, o, "unregister_kprobes", "unregister_kretprobes", "STAPCONF_UNREGISTER_KPROBES"); output_autoconf(s, o, "autoconf-kprobe-symbol-name.c", "STAPCONF_KPROBE_SYMBOL_NAME", NULL); output_autoconf(s, o, "autoconf-real-parent.c", "STAPCONF_REAL_PARENT", NULL); output_autoconf(s, o, "autoconf-uaccess.c", "STAPCONF_LINUX_UACCESS_H", NULL); output_autoconf(s, o, "autoconf-oneachcpu-retry.c", "STAPCONF_ONEACHCPU_RETRY", NULL); output_autoconf(s, o, "autoconf-dpath-path.c", "STAPCONF_DPATH_PATH", NULL); output_exportconf(s, o, "synchronize_kernel", "STAPCONF_SYNCHRONIZE_KERNEL"); output_exportconf(s, o, "synchronize_rcu", "STAPCONF_SYNCHRONIZE_RCU"); output_exportconf(s, o, "synchronize_sched", "STAPCONF_SYNCHRONIZE_SCHED"); output_autoconf(s, o, "autoconf-task-uid.c", "STAPCONF_TASK_UID", NULL); output_autoconf(s, o, "autoconf-from_kuid_munged.c", "STAPCONF_FROM_KUID_MUNGED", NULL); output_dual_exportconf(s, o, "alloc_vm_area", "free_vm_area", "STAPCONF_VM_AREA"); output_autoconf(s, o, "autoconf-procfs-owner.c", "STAPCONF_PROCFS_OWNER", NULL); output_autoconf(s, o, "autoconf-alloc-percpu-align.c", "STAPCONF_ALLOC_PERCPU_ALIGN", NULL); output_autoconf(s, o, "autoconf-x86-fs.c", "STAPCONF_X86_FS", NULL); output_autoconf(s, o, "autoconf-x86-xfs.c", "STAPCONF_X86_XFS", NULL); output_autoconf(s, o, "autoconf-x86-gs.c", "STAPCONF_X86_GS", NULL); output_autoconf(s, o, "autoconf-grsecurity.c", "STAPCONF_GRSECURITY", NULL); output_autoconf(s, o, "autoconf-trace-printk.c", "STAPCONF_TRACE_PRINTK", NULL); output_autoconf(s, o, "autoconf-regset.c", "STAPCONF_REGSET", NULL); output_autoconf(s, o, "autoconf-utrace-regset.c", "STAPCONF_UTRACE_REGSET", NULL); output_autoconf(s, o, "autoconf-uprobe-get-pc.c", "STAPCONF_UPROBE_GET_PC", NULL); output_autoconf(s, o, "autoconf-hlist-4args.c", "STAPCONF_HLIST_4ARGS", NULL); output_exportconf(s, o, "tsc_khz", "STAPCONF_TSC_KHZ"); output_exportconf(s, o, "cpu_khz", "STAPCONF_CPU_KHZ"); output_exportconf(s, o, "__module_text_address", "STAPCONF_MODULE_TEXT_ADDRESS"); output_exportconf(s, o, "add_timer_on", "STAPCONF_ADD_TIMER_ON"); output_dual_exportconf(s, o, "probe_kernel_read", "probe_kernel_write", "STAPCONF_PROBE_KERNEL"); output_autoconf(s, o, "autoconf-hw_breakpoint_context.c", "STAPCONF_HW_BREAKPOINT_CONTEXT", NULL); output_autoconf(s, o, "autoconf-save-stack-trace.c", "STAPCONF_KERNEL_STACKTRACE", NULL); output_autoconf(s, o, "autoconf-save-stack-trace-no-bp.c", "STAPCONF_KERNEL_STACKTRACE_NO_BP", NULL); output_autoconf(s, o, "autoconf-asm-syscall.c", "STAPCONF_ASM_SYSCALL_H", NULL); output_autoconf(s, o, "autoconf-ring_buffer-flags.c", "STAPCONF_RING_BUFFER_FLAGS", NULL); output_autoconf(s, o, "autoconf-ring_buffer_lost_events.c", "STAPCONF_RING_BUFFER_LOST_EVENTS", NULL); output_autoconf(s, o, "autoconf-ring_buffer_read_prepare.c", "STAPCONF_RING_BUFFER_READ_PREPARE", NULL); output_autoconf(s, o, "autoconf-kallsyms-on-each-symbol.c", "STAPCONF_KALLSYMS_ON_EACH_SYMBOL", NULL); output_autoconf(s, o, "autoconf-walk-stack.c", "STAPCONF_WALK_STACK", NULL); output_autoconf(s, o, "autoconf-stacktrace_ops-warning.c", "STAPCONF_STACKTRACE_OPS_WARNING", NULL); output_autoconf(s, o, "autoconf-mm-context-vdso.c", "STAPCONF_MM_CONTEXT_VDSO", NULL); output_autoconf(s, o, "autoconf-mm-context-vdso-base.c", "STAPCONF_MM_CONTEXT_VDSO_BASE", NULL); output_autoconf(s, o, "autoconf-blk-types.c", "STAPCONF_BLK_TYPES", NULL); output_autoconf(s, o, "autoconf-perf-structpid.c", "STAPCONF_PERF_STRUCTPID", NULL); output_autoconf(s, o, "perf_event_counter_context.c", "STAPCONF_PERF_COUNTER_CONTEXT", NULL); output_autoconf(s, o, "perf_probe_handler_nmi.c", "STAPCONF_PERF_HANDLER_NMI", NULL); output_exportconf(s, o, "path_lookup", "STAPCONF_PATH_LOOKUP"); output_exportconf(s, o, "kern_path_parent", "STAPCONF_KERN_PATH_PARENT"); output_exportconf(s, o, "vfs_path_lookup", "STAPCONF_VFS_PATH_LOOKUP"); output_exportconf(s, o, "kern_path", "STAPCONF_KERN_PATH"); output_exportconf(s, o, "proc_create_data", "STAPCONF_PROC_CREATE_DATA"); output_exportconf(s, o, "PDE_DATA", "STAPCONF_PDE_DATA"); output_autoconf(s, o, "autoconf-module-sect-attrs.c", "STAPCONF_MODULE_SECT_ATTRS", NULL); output_autoconf(s, o, "autoconf-utrace-via-tracepoints.c", "STAPCONF_UTRACE_VIA_TRACEPOINTS", NULL); output_autoconf(s, o, "autoconf-module-tracepoints.c", "STAPCONF_MODULE_TRACEPOINT", NULL); output_autoconf(s, o, "autoconf-task_work-struct.c", "STAPCONF_TASK_WORK_STRUCT", NULL); output_autoconf(s, o, "autoconf-vm-area-pte.c", "STAPCONF_VM_AREA_PTE", NULL); output_autoconf(s, o, "autoconf-relay-umode_t.c", "STAPCONF_RELAY_UMODE_T", NULL); output_autoconf(s, o, "autoconf-fs_supers-hlist.c", "STAPCONF_FS_SUPERS_HLIST", NULL); output_autoconf(s, o, "autoconf-compat_sigaction.c", "STAPCONF_COMPAT_SIGACTION", NULL); output_autoconf(s, o, "autoconf-netfilter.c", "STAPCONF_NETFILTER_V313", NULL); output_autoconf(s, o, "autoconf-netfilter-313b.c", "STAPCONF_NETFILTER_V313B", NULL); output_autoconf(s, o, "autoconf-netfilter-4_1.c", "STAPCONF_NETFILTER_V41", NULL); output_autoconf(s, o, "autoconf-smpcall-5args.c", "STAPCONF_SMPCALL_5ARGS", NULL); output_autoconf(s, o, "autoconf-smpcall-4args.c", "STAPCONF_SMPCALL_4ARGS", NULL); // used by tapset/timestamp_monotonic.stp output_exportconf(s, o, "cpu_clock", "STAPCONF_CPU_CLOCK"); output_exportconf(s, o, "local_clock", "STAPCONF_LOCAL_CLOCK"); // used by runtime/uprobe-inode.c output_either_exportconf(s, o, "uprobe_register", "register_uprobe", "STAPCONF_UPROBE_REGISTER_EXPORTED"); output_either_exportconf(s, o, "uprobe_unregister", "unregister_uprobe", "STAPCONF_UPROBE_UNREGISTER_EXPORTED"); output_autoconf(s, o, "autoconf-old-inode-uprobes.c", "STAPCONF_OLD_INODE_UPROBES", NULL); output_autoconf(s, o, "autoconf-inode-uretprobes.c", "STAPCONF_INODE_URETPROBES", NULL); // used by tapsets.cxx inode uprobe generated code output_exportconf(s, o, "uprobe_get_swbp_addr", "STAPCONF_UPROBE_GET_SWBP_ADDR_EXPORTED"); // used by runtime/loc2c-runtime.h output_exportconf(s, o, "task_user_regset_view", "STAPCONF_TASK_USER_REGSET_VIEW_EXPORTED"); // used by runtime/stp_utrace.c output_exportconf(s, o, "task_work_add", "STAPCONF_TASK_WORK_ADD_EXPORTED"); output_exportconf(s, o, "wake_up_state", "STAPCONF_WAKE_UP_STATE_EXPORTED"); output_exportconf(s, o, "try_to_wake_up", "STAPCONF_TRY_TO_WAKE_UP_EXPORTED"); output_exportconf(s, o, "signal_wake_up_state", "STAPCONF_SIGNAL_WAKE_UP_STATE_EXPORTED"); output_exportconf(s, o, "signal_wake_up", "STAPCONF_SIGNAL_WAKE_UP_EXPORTED"); output_exportconf(s, o, "__lock_task_sighand", "STAPCONF___LOCK_TASK_SIGHAND_EXPORTED"); output_autoconf(s, o, "autoconf-pagefault_disable.c", "STAPCONF_PAGEFAULT_DISABLE", NULL); output_exportconf(s, o, "kallsyms_lookup_name", "STAPCONF_KALLSYMS"); output_autoconf(s, o, "autoconf-uidgid.c", "STAPCONF_LINUX_UIDGID_H", NULL); output_exportconf(s, o, "sigset_from_compat", "STAPCONF_SIGSET_FROM_COMPAT_EXPORTED"); output_exportconf(s, o, "vzalloc", "STAPCONF_VZALLOC"); output_exportconf(s, o, "vzalloc_node", "STAPCONF_VZALLOC_NODE"); output_exportconf(s, o, "vmalloc_node", "STAPCONF_VMALLOC_NODE"); output_autoconf(s, o, "autoconf-tracepoint-strings.c", "STAPCONF_TRACEPOINT_STRINGS", NULL); output_autoconf(s, o, "autoconf-timerfd.c", "STAPCONF_TIMERFD_H", NULL); o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl; for (unsigned i=0; i 3) o << "EXTRA_CFLAGS += -ftime-report -Q" << endl; // XXX: unfortunately, -save-temps can't work since linux kbuild cwd // is not writable. // // if (s.keep_tmpdir) // o << "CFLAGS += -fverbose-asm -save-temps" << endl; // Kernels can be compiled with CONFIG_CC_OPTIMIZE_FOR_SIZE to select // -Os, otherwise -O2 is the default. o << "EXTRA_CFLAGS += -freorder-blocks" << endl; // improve on -Os // Generate eh_frame for self-backtracing o << "EXTRA_CFLAGS += -fasynchronous-unwind-tables" << endl; // We used to allow the user to override default optimization when so // requested by adding a -O[0123s] so they could determine the // time/space/speed tradeoffs themselves, but we cannot guantantee that // the (un)optimized code actually compiles and/or generates functional // code, so we had to remove it. // o << "EXTRA_CFLAGS += " << s.gcc_flags << endl; // Add -O[0123s] // o << "CFLAGS += -fno-unit-at-a-time" << endl; // 256^W512 bytes should be enough for anybody // XXX this doesn't validate varargs, per gcc bug #41633 o << "EXTRA_CFLAGS += $(call cc-option,-Wframe-larger-than=512)" << endl; // gcc 5.0.0-0.13.fc23 ipa-icf seems to consume gigacpu on stap-generated code o << "EXTRA_CFLAGS += $(call cc-option,-fno-ipa-icf)" << endl; // Assumes linux 2.6 kbuild o << "EXTRA_CFLAGS += -Wno-unused" << (s.omit_werror ? "" : " -Werror") << endl; #if CHECK_POINTER_ARITH_PR5947 o << "EXTRA_CFLAGS += -Wpointer-arith" << endl; #endif o << "EXTRA_CFLAGS += -I\"" << s.runtime_path << "\"" << endl; // XXX: this may help ppc toc overflow // o << "CFLAGS := $(subst -Os,-O2,$(CFLAGS)) -fminimal-toc" << endl; o << "obj-m := " << s.module_name << ".o" << endl; // print out all the auxiliary source (->object) file names o << s.module_name << "-y := "; for (unsigned i=0; itrailer_p) continue; string srcname = s.auxiliary_outputs[i]->filename; assert (srcname != "" && srcname.rfind('/') != string::npos); string objname = srcname.substr(srcname.rfind('/')+1); // basename assert (objname != "" && objname[objname.size()-1] == 'c'); objname[objname.size()-1] = 'o'; // now objname o << " " + objname; } // and once again, for the translated_source file. It can't simply // be named MODULENAME.c, since kbuild doesn't allow a foo.ko file // consisting of multiple .o's to have foo.o/foo.c as a source. // (It uses ld -r -o foo.o EACH.o EACH.o). { string srcname = s.translated_source; assert (srcname != "" && srcname.rfind('/') != string::npos); string objname = srcname.substr(srcname.rfind('/')+1); // basename assert (objname != "" && objname[objname.size()-1] == 'c'); objname[objname.size()-1] = 'o'; // now objname o << " " + objname; } // and once again, for the trailer type auxiliary outputs. for (unsigned i=0; itrailer_p) continue; string srcname = s.auxiliary_outputs[i]->filename; assert (srcname != "" && srcname.rfind('/') != string::npos); string objname = srcname.substr(srcname.rfind('/')+1); // basename assert (objname != "" && objname[objname.size()-1] == 'c'); objname[objname.size()-1] = 'o'; // now objname o << " " + objname; } o << endl; // add all stapconf dependencies o << s.translated_source << ": $(STAPCONF_HEADER)" << endl; for (unsigned i=0; ifilename << ": $(STAPCONF_HEADER)" << endl; o.close (); // Generate module directory pathname and make sure it exists. string module_dir = s.kernel_build_tree; string module_dir_makefile = module_dir + "/Makefile"; struct stat st; rc = stat(module_dir_makefile.c_str(), &st); if (rc != 0) { clog << _F("Checking \" %s \" failed with error: %s\nEnsure kernel development headers & makefiles are installed.", module_dir_makefile.c_str(), strerror(errno)) << endl; s.set_try_server (); return rc; } // Run make vector make_cmd = make_make_cmd(s, s.tmpdir); rc = run_make_cmd(s, make_cmd); if (rc) s.set_try_server (); return rc; } /* * If uprobes was built as part of the kernel build (either built-in * or as a module), the uprobes exports should show up. This is to be * as distinct from the stap-built uprobes.ko from the runtime. */ static bool kernel_built_uprobes (systemtap_session& s) { if (s.runtime_usermode_p()) return true; // sort of, via dyninst // see also tapsets.cxx:kernel_supports_inode_uprobes() return ((s.kernel_config["CONFIG_ARCH_SUPPORTS_UPROBES"] == "y" && s.kernel_config["CONFIG_UPROBES"] == "y") || (s.kernel_exports.find("unregister_uprobe") != s.kernel_exports.end())); } static int make_uprobes (systemtap_session& s) { if (s.verbose > 1) clog << _("Pass 4, preamble: (re)building SystemTap's version of uprobes.") << endl; // create a subdirectory for the uprobes module string dir(s.tmpdir + "/uprobes"); if (create_dir(dir.c_str()) != 0) { s.print_warning("failed to create directory for build uprobes."); s.set_try_server (); return 1; } // create a simple Makefile string makefile(dir + "/Makefile"); ofstream omf(makefile.c_str()); omf << "obj-m := uprobes.o" << endl; // RHBZ 655231: later rhel6 kernels' module-signing kbuild logic breaks out-of-tree modules omf << "CONFIG_MODULE_SIG := n" << endl; omf.close(); // create a simple #include-chained source file string runtimesourcefile(s.runtime_path + "/linux/uprobes/uprobes.c"); string sourcefile(dir + "/uprobes.c"); ofstream osrc(sourcefile.c_str()); osrc << "#include \"" << runtimesourcefile << "\"" << endl; // pass --modinfo k=v to uprobes build too for (unsigned i = 0; i < s.modinfos.size(); i++) { const string& mi = s.modinfos[i]; size_t loc = mi.find('='); string tag = mi.substr (0, loc); string value = mi.substr (loc+1); osrc << "MODULE_INFO(" << tag << "," << lex_cast_qstring(value) << ");" << endl; } osrc.close(); // make the module vector make_cmd = make_make_cmd(s, dir); int rc = run_make_cmd(s, make_cmd); if (!rc && !copy_file(dir + "/Module.symvers", s.tmpdir + "/Module.symvers")) rc = -1; if (s.verbose > 1) clog << _("uprobes rebuild exit code: ") << rc << endl; if (rc) s.set_try_server (); else s.uprobes_path = dir + "/uprobes.ko"; return rc; } static bool get_cached_uprobes(systemtap_session& s) { s.uprobes_hash = s.use_cache ? find_uprobes_hash(s) : ""; if (!s.uprobes_hash.empty()) { // NB: We always put uprobes.ko in its own directory, especially so // stap-serverd can more easily locate it. string dir(s.tmpdir + "/uprobes"); if (create_dir(dir.c_str()) != 0) return false; string cacheko = s.uprobes_hash + ".ko"; string tmpko = dir + "/uprobes.ko"; // The symvers file still needs to go in the script module's directory. string cachesyms = s.uprobes_hash + ".symvers"; string tmpsyms = s.tmpdir + "/Module.symvers"; if (get_file_size(cacheko) > 0 && copy_file(cacheko, tmpko) && get_file_size(cachesyms) > 0 && copy_file(cachesyms, tmpsyms)) { s.uprobes_path = tmpko; return true; } } return false; } static void set_cached_uprobes(systemtap_session& s) { if (s.use_cache && !s.uprobes_hash.empty()) { string cacheko = s.uprobes_hash + ".ko"; string tmpko = s.tmpdir + "/uprobes/uprobes.ko"; copy_file(tmpko, cacheko); string cachesyms = s.uprobes_hash + ".symvers"; string tmpsyms = s.tmpdir + "/uprobes/Module.symvers"; copy_file(tmpsyms, cachesyms); } } int uprobes_pass (systemtap_session& s) { if (!s.need_uprobes || kernel_built_uprobes(s)) return 0; if (s.kernel_config["CONFIG_UTRACE"] != string("y")) { clog << _("user-space process-tracking facilities not available [man error::process-tracking]") << endl; s.set_try_server (); return 1; } /* * We need to use the version of uprobes that comes with SystemTap. Try to * get it from the cache first. If not found, build it and try to save it to * the cache for future reuse. */ int rc = 0; if (!get_cached_uprobes(s)) { rc = make_uprobes(s); if (!rc) set_cached_uprobes(s); } if (rc) s.set_try_server (); return rc; } static vector make_dyninst_run_command (systemtap_session& s, const string& remotedir, const string& version) { vector cmd; cmd.push_back(getenv("SYSTEMTAP_STAPDYN") ?: BINDIR "/stapdyn"); // use slightly less verbosity for (unsigned i=1; i make_run_command (systemtap_session& s, const string& remotedir, const string& version) { if (s.runtime_usermode_p()) return make_dyninst_run_command(s, remotedir, version); // for now, just spawn staprun vector staprun_cmd; staprun_cmd.push_back(getenv("SYSTEMTAP_STAPRUN") ?: BINDIR "/staprun"); // use slightly less verbosity for (unsigned i=1; i test-contents) map, compile them ASAP, and return // a (header-file -> obj-filename) map. map make_tracequeries(systemtap_session& s, const map& contents) { static unsigned tick = 0; string basename("tracequery_kmod_" + lex_cast(++tick)); map objs; // create a subdirectory for the module string dir(s.tmpdir + "/" + basename); if (create_dir(dir.c_str()) != 0) { s.print_warning("failed to create directory for querying tracepoints."); s.set_try_server (); return objs; } // create a simple Makefile string makefile(dir + "/Makefile"); ofstream omf(makefile.c_str()); // force debuginfo generation, and relax implicit functions omf << "EXTRA_CFLAGS := -g -Wno-implicit-function-declaration" << (s.omit_werror ? "" : " -Werror") << endl; // RHBZ 655231: later rhel6 kernels' module-signing kbuild logic breaks out-of-tree modules omf << "CONFIG_MODULE_SIG := n" << endl; // PR18389: disable GCC's Identical Code Folding, since the stubs may look identical omf << "EXTRA_CFLAGS += $(call cc-option,-fno-ipa-icf)" << endl; if (s.kernel_source_tree != "") omf << "EXTRA_CFLAGS += -I" + s.kernel_source_tree << endl; omf << "obj-m := " << endl; // write out each header-specific source file into a separate file for (map::const_iterator it = contents.begin(); it != contents.end(); it++) { string sbasename = basename + "_" + lex_cast(++tick); // suffixed // write out source code string srcname = dir + "/" + sbasename + ".c"; string src = it->second; ofstream osrc(srcname.c_str()); osrc << src; osrc.close(); if (s.verbose > 2) clog << _F("Processing tracepoint header %s with query %s", it->first.c_str(), srcname.c_str()) << endl; // arrange to build it omf << "obj-m += " + sbasename + ".o" << endl; // NB: without prefix objs[it->first] = dir + "/" + sbasename + ".o"; } omf.close(); // make the module vector make_cmd = make_make_objs_cmd(s, dir); make_cmd.push_back ("-i"); // ignore errors, give rc 0 even in case of tracepoint header nits bool quiet = (s.verbose < 4); int rc = run_make_cmd(s, make_cmd, quiet, quiet); if (rc) s.set_try_server (); // Sometimes we fail a tracequery due to PR9993 / PR11649 type // kernel trace header problems. In this case, due to PR12729, we // used to get a lovely "Warning: make exited with status: 2" but no // other useful diagnostic. -vvvv would let a user see what's up, // but the user can't fix the problem even with that. return objs; } // Build a tiny kernel module to query type information static int make_typequery_kmod(systemtap_session& s, const vector& headers, string& name) { static unsigned tick = 0; string basename("typequery_kmod_" + lex_cast(++tick)); // create a subdirectory for the module string dir(s.tmpdir + "/" + basename); if (create_dir(dir.c_str()) != 0) { s.print_warning("failed to create directory for querying types."); s.set_try_server (); return 1; } name = dir + "/" + basename + ".ko"; // create a simple Makefile string makefile(dir + "/Makefile"); ofstream omf(makefile.c_str()); omf << "EXTRA_CFLAGS := -g -fno-eliminate-unused-debug-types" << endl; // RHBZ 655231: later rhel6 kernels' module-signing kbuild logic breaks out-of-tree modules omf << "CONFIG_MODULE_SIG := n" << endl; // NB: We use -include instead of #include because that gives us more power. // Using #include searches relative to the source's path, which in this case // is /tmp/..., so that's not helpful. Using -include will search relative // to the cwd, which will be the kernel build root. This means if you have a // full kernel build tree, it's possible to get at types that aren't in the // normal include path, e.g.: // @cast(foo, "bsd_acct_struct", "kernel")->... omf << "CFLAGS_" << basename << ".o :="; for (size_t i = 0; i < headers.size(); ++i) omf << " -include " << lex_cast_qstring(headers[i]); // XXX right quoting? omf << endl; omf << "obj-m := " + basename + ".o" << endl; omf.close(); // create our empty source file string source(dir + "/" + basename + ".c"); ofstream osrc(source.c_str()); osrc.close(); // make the module vector make_cmd = make_make_cmd(s, dir); bool quiet = (s.verbose < 4); int rc = run_make_cmd(s, make_cmd, quiet, quiet); if (rc) s.set_try_server (); return rc; } // Build a tiny user module to query type information static int make_typequery_umod(systemtap_session& s, const vector& headers, string& name) { static unsigned tick = 0; name = s.tmpdir + "/typequery_umod_" + lex_cast(++tick) + ".so"; // make the module // // NB: As with kmod, using -include makes relative paths more useful. The // cwd in this case will be the cwd of stap itself though, which may be // trickier to deal with. It might be better to "cd `dirname $script`" // first... vector cmd; cmd.push_back("gcc"); cmd.push_back("-shared"); cmd.push_back("-g"); cmd.push_back("-fno-eliminate-unused-debug-types"); cmd.push_back("-xc"); cmd.push_back("/dev/null"); cmd.push_back("-o"); cmd.push_back(name); for (size_t i = 0; i < headers.size(); ++i) { cmd.push_back("-include"); cmd.push_back(headers[i]); } bool quiet = (s.verbose < 4); int rc = stap_system (s.verbose, cmd, quiet, quiet); if (rc) s.set_try_server (); return rc; } int make_typequery(systemtap_session& s, string& module) { int rc; string new_module; vector headers; bool kernel = startswith(module, "kernel"); for (size_t end, i = kernel ? 6 : 0; i < module.size(); i = end + 1) { if (module[i] != '<') return -1; end = module.find('>', ++i); if (end == string::npos) return -1; string header = module.substr(i, end - i); vector matches; if (regexp_match(header, "^[a-zA-Z0-9/_.+-]+$", matches)) s.print_warning("skipping malformed @cast header \""+ header + "\""); else headers.push_back(header); } if (headers.empty()) return -1; if (kernel) rc = make_typequery_kmod(s, headers, new_module); else rc = make_typequery_umod(s, headers, new_module); if (!rc) module = new_module; return rc; } /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/buildrun.h000066400000000000000000000016251260561570600154260ustar00rootroot00000000000000// -*- C++ -*- // Copyright (C) 2005 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #ifndef BUILDRUN_H #define BUILDRUN_H #include "elaborate.h" int compile_pass (systemtap_session& s); int uprobes_pass (systemtap_session& s); std::vector make_run_command (systemtap_session& s, const std::string& remotedir="", const std::string& version=VERSION); std::map make_tracequeries(systemtap_session& s, const std::map& contents); int make_typequery(systemtap_session& s, std::string& module); #endif // BUILDRUN_H /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/cache.cxx000066400000000000000000000316101260561570600152150ustar00rootroot00000000000000// systemtap cache manager // Copyright (C) 2006-2009 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #include "config.h" #include "session.h" #include "cache.h" #include "util.h" #include "stap-probe.h" #include #include #include #include #include #include #include extern "C" { #include #include #include #include #include #include #include #include } using namespace std; #define SYSTEMTAP_CACHE_MAX_FILENAME "cache_mb_limit" #define SYSTEMTAP_CACHE_DEFAULT_MB 256 #define SYSTEMTAP_CACHE_CLEAN_INTERVAL_FILENAME "cache_clean_interval_s" #define SYSTEMTAP_CACHE_CLEAN_DEFAULT_INTERVAL_S 300 struct cache_ent_info { vector paths; off_t size; // sum across all paths time_t mtime; // newest of all paths cache_ent_info(const vector& paths); bool operator<(const struct cache_ent_info& other) const; void unlink() const; }; void add_stapconf_to_cache(systemtap_session& s) { bool verbose = s.verbose > 1; string stapconf_src_path = s.tmpdir + "/" + s.stapconf_name; if (!copy_file(stapconf_src_path, s.stapconf_path, verbose)) { // NB: this is not so severe as to prevent reuse of the .ko // already copied. // // s.use_script_cache = false; // return; } } void add_script_to_cache(systemtap_session& s) { bool verbose = s.verbose > 1; // PR10543: clean the cache *before* we try putting something new into it. // We don't want to risk having the brand new contents being erased again. clean_cache(s); string module_src_path = s.tmpdir + "/" + s.module_filename(); PROBE2(stap, cache__add__module, module_src_path.c_str(), s.hash_path.c_str()); if (!copy_file(module_src_path, s.hash_path, verbose)) { s.use_script_cache = false; return; } // Copy the signature file, if any. It is not an error if this fails. if (file_exists (module_src_path + ".sgn")) copy_file(module_src_path + ".sgn", s.hash_path + ".sgn", verbose); string c_dest_path = s.hash_path; if (endswith(c_dest_path, ".ko") || endswith(c_dest_path, ".so")) c_dest_path.resize(c_dest_path.size() - 3); c_dest_path += ".c"; PROBE2(stap, cache__add__source, s.translated_source.c_str(), c_dest_path.c_str()); if (!copy_file(s.translated_source, c_dest_path, verbose)) { // NB: this is not so severe as to prevent reuse of the .ko // already copied. // // s.use_script_cache = false; } } bool get_stapconf_from_cache(systemtap_session& s) { if (s.poison_cache) return false; string stapconf_dest_path = s.tmpdir + "/" + s.stapconf_name; int fd_stapconf; // See if stapconf exists fd_stapconf = open(s.stapconf_path.c_str(), O_RDONLY); if (fd_stapconf == -1) { // It isn't in cache. return false; } // Copy the stapconf header file to the destination if (!get_file_size(fd_stapconf) || !copy_file(s.stapconf_path, stapconf_dest_path)) { close(fd_stapconf); return false; } // We're done with this file handle. close(fd_stapconf); if (s.verbose > 1) clog << _("Pass 4: using cached ") << s.stapconf_path << endl; return true; } bool get_script_from_cache(systemtap_session& s) { if (s.poison_cache) return false; string module_dest_path = s.tmpdir + "/" + s.module_filename(); string c_src_path = s.hash_path; int fd_module, fd_c; if (endswith(c_src_path, ".ko") || endswith(c_src_path, ".so")) c_src_path.resize(c_src_path.size() - 3); c_src_path += ".c"; // See if module exists fd_module = open(s.hash_path.c_str(), O_RDONLY); if (fd_module == -1) { // It isn't in cache. return false; } // See if C file exists. fd_c = open(c_src_path.c_str(), O_RDONLY); if (fd_c == -1) { // The module is there, but the C file isn't. Cleanup and // return. close(fd_module); unlink(s.hash_path.c_str()); return false; } // Check that the files aren't empty, and then // copy the cached C file to the destination if (!get_file_size(fd_module) || !get_file_size(fd_c) || !copy_file(c_src_path, s.translated_source)) { close(fd_module); close(fd_c); return false; } // Copy the cached module to the destination (if needed) if (s.last_pass != 3) { if (!copy_file(s.hash_path, module_dest_path)) { unlink(c_src_path.c_str()); close(fd_module); close(fd_c); return false; } // Copy the module signature file, if any. // It is not an error if this fails. if (file_exists (s.hash_path + ".sgn")) copy_file(s.hash_path + ".sgn", module_dest_path + ".sgn"); } // We're done with these file handles. close(fd_module); close(fd_c); // To preserve semantics (since this will happen if we're not // caching), display the C source if the last pass is 3. if (s.last_pass == 3) { ifstream i (s.translated_source.c_str()); cout << i.rdbuf(); } // And similarly, display probe module name for -p4. if (s.last_pass == 4) cout << s.hash_path << endl; // If everything worked, tell the user. We need to do this here, // since if copying the cached C file works, but copying the cached // module fails, we remove the cached C file and let the C file get // regenerated. // NB: don't use s.verbose here, since we're still in pass-2, // i.e., s.verbose = s.perpass_verbose[1]. if (s.perpass_verbose[2]) clog << _("Pass 3: using cached ") << c_src_path << endl; if (s.perpass_verbose[3] && s.last_pass != 3) clog << _("Pass 4: using cached ") << s.hash_path << endl; PROBE2(stap, cache__get, c_src_path.c_str(), s.hash_path.c_str()); return true; } void clean_cache(systemtap_session& s) { if (s.cache_path != "") { /* Get cache size limit from file in the stap cache dir */ string cache_max_filename = s.cache_path + "/"; cache_max_filename += SYSTEMTAP_CACHE_MAX_FILENAME; ifstream cache_max_file(cache_max_filename.c_str(), ios::in); unsigned long cache_mb_max; if (cache_max_file.is_open()) { cache_max_file >> cache_mb_max; cache_max_file.close(); } else { //file doesnt exist, create a default size ofstream default_cache_max(cache_max_filename.c_str(), ios::out); default_cache_max << SYSTEMTAP_CACHE_DEFAULT_MB << endl; cache_mb_max = SYSTEMTAP_CACHE_DEFAULT_MB; if (s.verbose > 1) clog << _F("Cache limit file %s/%s missing, creating default.", s.cache_path.c_str(), SYSTEMTAP_CACHE_MAX_FILENAME) << endl; } /* Get cache clean interval from file in the stap cache dir */ string cache_clean_interval_filename = s.cache_path + "/"; cache_clean_interval_filename += SYSTEMTAP_CACHE_CLEAN_INTERVAL_FILENAME; ifstream cache_clean_interval_file(cache_clean_interval_filename.c_str(), ios::in); unsigned long cache_clean_interval; if (cache_clean_interval_file.is_open()) { cache_clean_interval_file >> cache_clean_interval; cache_clean_interval_file.close(); } else { //file doesnt exist, create a default interval ofstream default_cache_clean_interval(cache_clean_interval_filename.c_str(), ios::out); default_cache_clean_interval << SYSTEMTAP_CACHE_CLEAN_DEFAULT_INTERVAL_S << endl; cache_clean_interval = SYSTEMTAP_CACHE_CLEAN_DEFAULT_INTERVAL_S; if (s.verbose > 1) clog << _F("Cache clean interval file %s missing, creating default.", cache_clean_interval_filename.c_str())<< endl; } /* Check the cache cleaning interval */ struct stat sb; if(stat(cache_clean_interval_filename.c_str(), &sb) < 0) { const char* e = strerror (errno); cerr << _F("clean_cache stat error: %s", e) << endl; return; } struct timeval current_time; gettimeofday(¤t_time, NULL); if(difftime(current_time.tv_sec, sb.st_mtime) < cache_clean_interval) { //interval not passed, don't continue if (s.verbose > 1) clog << _F("Cache cleaning skipped, interval not reached %lu s / %lu s.", (current_time.tv_sec-sb.st_mtime), cache_clean_interval) << endl; return; } else { //interval reached, continue if (s.verbose > 1) clog << _F("Cleaning cache, interval reached %lu s > %lu s.", (current_time.tv_sec-sb.st_mtime), cache_clean_interval) << endl; } // glob for all files that look like hashes glob_t cache_glob; ostringstream glob_pattern; glob_pattern << s.cache_path << "/*/*"; for (unsigned int i = 0; i < 32; i++) glob_pattern << "[[:xdigit:]]"; glob_pattern << "*"; int rc = glob(glob_pattern.str().c_str(), 0, NULL, &cache_glob); if (rc) { cerr << _F("clean_cache glob error rc=%d", rc) << endl; return; } regex_t hash_len_re; rc = regcomp (&hash_len_re, "([[:xdigit:]]{32}_[[:digit:]]+)", REG_EXTENDED); if (rc) { cerr << _F("clean_cache regcomp error rc=%d", rc) << endl; globfree(&cache_glob); return; } // group all files with the same HASH_LEN map > cache_groups; for (size_t i = 0; i < cache_glob.gl_pathc; i++) { const char* path = cache_glob.gl_pathv[i]; regmatch_t hash_len; rc = regexec(&hash_len_re, path, 1, &hash_len, 0); if (rc || hash_len.rm_so == -1 || hash_len.rm_eo == -1) cache_groups[path].push_back(path); // ungrouped else cache_groups[string(path + hash_len.rm_so, hash_len.rm_eo - hash_len.rm_so)] .push_back(path); } regfree(&hash_len_re); globfree(&cache_glob); // create each cache entry and accumulate the sum off_t cache_size_b = 0; set cache_contents; for (map >::const_iterator it = cache_groups.begin(); it != cache_groups.end(); ++it) { cache_ent_info cur_info(it->second); if (cache_contents.insert(cur_info).second) cache_size_b += cur_info.size; } unsigned long r_cache_size = cache_size_b; vector removed; //unlink .ko and .c until the cache size is under the limit for (set::iterator i = cache_contents.begin(); i != cache_contents.end(); ++i) { if (r_cache_size < cache_mb_max * 1024 * 1024) //convert cache_mb_max to bytes break; //remove this (*i) cache_entry, add to removed list for (size_t j = 0; j < i->paths.size(); ++j) PROBE1(stap, cache__clean, i->paths[j].c_str()); i->unlink(); r_cache_size -= i->size; removed.push_back(&*i); } if (s.verbose > 1 && !removed.empty()) { clog << _("Cache cleaning successful, removed entries: ") << endl; for (size_t i = 0; i < removed.size(); ++i) for (size_t j = 0; j < removed[i]->paths.size(); ++j) clog << " " << removed[i]->paths[j] << endl; } if(utime(cache_clean_interval_filename.c_str(), NULL)<0) { const char* e = strerror (errno); cerr << _F("clean_cache utime error: %s", e) << endl; return; } } else { if (s.verbose > 1) clog << _("Cache cleaning skipped, no cache path.") << endl; } } cache_ent_info::cache_ent_info(const vector& paths): paths(paths), size(0), mtime(0) { struct stat file_info; for (size_t i = 0; i < paths.size(); ++i) if (stat(paths[i].c_str(), &file_info) == 0) { size += file_info.st_size; if (file_info.st_mtime > mtime) mtime = file_info.st_mtime; } } // The ordering here determines the order that // files will be removed from the cache. bool cache_ent_info::operator<(const struct cache_ent_info& other) const { if (mtime != other.mtime) return mtime < other.mtime; if (size != other.size) return size < other.size; if (paths.size() != other.paths.size()) return paths.size() < other.paths.size(); for (size_t i = 0; i < paths.size(); ++i) if (paths[i] != other.paths[i]) return paths[i] < other.paths[i]; return false; } void cache_ent_info::unlink() const { for (size_t i = 0; i < paths.size(); ++i) ::unlink(paths[i].c_str()); } /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/cache.h000066400000000000000000000004601260561570600146410ustar00rootroot00000000000000void add_script_to_cache(systemtap_session& s); bool get_script_from_cache(systemtap_session& s); void add_stapconf_to_cache(systemtap_session& s); bool get_stapconf_from_cache(systemtap_session& s); void clean_cache(systemtap_session& s); /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/cmdline.cxx000066400000000000000000000107561260561570600155750ustar00rootroot00000000000000// Shared data for parsing the stap command line // Copyright (C) 2014 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #include #include "cmdline.h" // NB: when adding new options, consider very carefully whether they // should be restricted from stap clients (after --client-options)! struct option stap_long_options[] = { { "skip-badvars", no_argument, NULL, LONG_OPT_SKIP_BADVARS }, { "vp", required_argument, NULL, LONG_OPT_VERBOSE_PASS }, { "unprivileged", no_argument, NULL, LONG_OPT_UNPRIVILEGED }, #define OWE5 "tter" #define OWE1 "uild-" #define OWE6 "fu-kb" #define OWE2 "i-kno" #define OWE4 "st" #define OWE3 "w-be" { OWE4 OWE6 OWE1 OWE2 OWE3 OWE5, no_argument, NULL, LONG_OPT_OMIT_WERROR }, { "client-options", no_argument, NULL, LONG_OPT_CLIENT_OPTIONS }, { "help", no_argument, NULL, LONG_OPT_HELP }, { "disable-cache", no_argument, NULL, LONG_OPT_DISABLE_CACHE }, { "poison-cache", no_argument, NULL, LONG_OPT_POISON_CACHE }, { "clean-cache", no_argument, NULL, LONG_OPT_CLEAN_CACHE }, { "compatible", required_argument, NULL, LONG_OPT_COMPATIBLE }, { "ldd", no_argument, NULL, LONG_OPT_LDD }, { "use-server", optional_argument, NULL, LONG_OPT_USE_SERVER }, { "list-servers", optional_argument, NULL, LONG_OPT_LIST_SERVERS }, { "trust-servers", optional_argument, NULL, LONG_OPT_TRUST_SERVERS }, { "use-server-on-error", optional_argument, NULL, LONG_OPT_USE_SERVER_ON_ERROR }, { "all-modules", no_argument, NULL, LONG_OPT_ALL_MODULES }, { "remote", required_argument, NULL, LONG_OPT_REMOTE }, { "remote-prefix", no_argument, NULL, LONG_OPT_REMOTE_PREFIX }, { "check-version", no_argument, NULL, LONG_OPT_CHECK_VERSION }, { "version", no_argument, NULL, LONG_OPT_VERSION }, { "tmpdir", required_argument, NULL, LONG_OPT_TMPDIR }, { "download-debuginfo", optional_argument, NULL, LONG_OPT_DOWNLOAD_DEBUGINFO }, { "dump-probe-types", no_argument, NULL, LONG_OPT_DUMP_PROBE_TYPES }, { "dump-probe-aliases", no_argument, NULL, LONG_OPT_DUMP_PROBE_ALIASES }, { "dump-functions", no_argument, NULL, LONG_OPT_DUMP_FUNCTIONS }, { "privilege", required_argument, NULL, LONG_OPT_PRIVILEGE }, { "suppress-handler-errors", no_argument, NULL, LONG_OPT_SUPPRESS_HANDLER_ERRORS }, { "modinfo", required_argument, NULL, LONG_OPT_MODINFO }, { "rlimit-as", required_argument, NULL, LONG_OPT_RLIMIT_AS }, { "rlimit-cpu", required_argument, NULL, LONG_OPT_RLIMIT_CPU }, { "rlimit-nproc", required_argument, NULL, LONG_OPT_RLIMIT_NPROC }, { "rlimit-stack", required_argument, NULL, LONG_OPT_RLIMIT_STACK }, { "rlimit-fsize", required_argument, NULL, LONG_OPT_RLIMIT_FSIZE }, { "sysroot", required_argument, NULL, LONG_OPT_SYSROOT }, { "sysenv", required_argument, NULL, LONG_OPT_SYSENV }, { "suppress-time-limits", no_argument, NULL, LONG_OPT_SUPPRESS_TIME_LIMITS }, { "runtime", required_argument, NULL, LONG_OPT_RUNTIME }, { "dyninst", no_argument, NULL, LONG_OPT_RUNTIME_DYNINST }, { "benchmark-sdt", no_argument, NULL, LONG_OPT_BENCHMARK_SDT }, { "benchmark-sdt-loops", required_argument, NULL, LONG_OPT_BENCHMARK_SDT_LOOPS }, { "benchmark-sdt-threads", required_argument, NULL, LONG_OPT_BENCHMARK_SDT_THREADS }, { "color", optional_argument, NULL, LONG_OPT_COLOR_ERRS }, { "colour", optional_argument, NULL, LONG_OPT_COLOR_ERRS }, { "prologue-searching", optional_argument, NULL, LONG_OPT_PROLOGUE_SEARCHING }, { "save-uprobes", no_argument, NULL, LONG_OPT_SAVE_UPROBES }, { "target-namespaces", required_argument, NULL, LONG_OPT_TARGET_NAMESPACES }, { NULL, 0, NULL, 0 } }; systemtap-2.9/cmdline.h000066400000000000000000000043231260561570600152130ustar00rootroot00000000000000// -*- C++ -*- // Copyright (C) 2014 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #ifndef CMDLINE_H #define CMDLINE_H 1 extern "C" { #include } // NB: when adding new options, consider very carefully whether they // should be restricted from stap clients (after --client-options)! // NB: The values of these enumerators must not conflict with the values of ordinary // characters, since those are returned by getopt_long for short options. enum { LONG_OPT_VERBOSE_PASS = 256, LONG_OPT_SKIP_BADVARS, LONG_OPT_UNPRIVILEGED, LONG_OPT_OMIT_WERROR, LONG_OPT_CLIENT_OPTIONS, LONG_OPT_HELP, LONG_OPT_DISABLE_CACHE, LONG_OPT_POISON_CACHE, LONG_OPT_CLEAN_CACHE, LONG_OPT_COMPATIBLE, LONG_OPT_LDD, LONG_OPT_USE_SERVER, LONG_OPT_LIST_SERVERS, LONG_OPT_TRUST_SERVERS, LONG_OPT_ALL_MODULES, LONG_OPT_REMOTE, LONG_OPT_CHECK_VERSION, LONG_OPT_USE_SERVER_ON_ERROR, LONG_OPT_VERSION, LONG_OPT_REMOTE_PREFIX, LONG_OPT_TMPDIR, LONG_OPT_DOWNLOAD_DEBUGINFO, LONG_OPT_DUMP_PROBE_TYPES, LONG_OPT_DUMP_PROBE_ALIASES, LONG_OPT_DUMP_FUNCTIONS, LONG_OPT_PRIVILEGE, LONG_OPT_SUPPRESS_HANDLER_ERRORS, LONG_OPT_MODINFO, LONG_OPT_RLIMIT_AS, LONG_OPT_RLIMIT_CPU, LONG_OPT_RLIMIT_NPROC, LONG_OPT_RLIMIT_STACK, LONG_OPT_RLIMIT_FSIZE, LONG_OPT_SYSROOT, LONG_OPT_SYSENV, LONG_OPT_SUPPRESS_TIME_LIMITS, LONG_OPT_RUNTIME, LONG_OPT_RUNTIME_DYNINST, LONG_OPT_BENCHMARK_SDT, LONG_OPT_BENCHMARK_SDT_LOOPS, LONG_OPT_BENCHMARK_SDT_THREADS, LONG_OPT_COLOR_ERRS, LONG_OPT_PROLOGUE_SEARCHING, LONG_OPT_SAVE_UPROBES, LONG_OPT_TARGET_NAMESPACES, }; // NB: when adding new options, consider very carefully whether they // should be restricted from stap clients (after --client-options)! #define STAP_SHORT_OPTIONS "hVvtp:I:e:E:o:R:r:a:m:kgPc:x:D:bs:uqwl:d:L:FS:B:J:jWG:" #define OWE5 "tter" #define OWE1 "uild-" #define OWE6 "fu-kb" #define OWE2 "i-kno" #define OWE4 "st" #define OWE3 "w-be" #define OMIT_WERROR_NAME OWE4 OWE6 OWE1 OWE2 OWE3 OWE5 extern struct option stap_long_options[]; #endif // CMDLINE_H systemtap-2.9/compile000077500000000000000000000162451260561570600150130ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: systemtap-2.9/config.guess000077500000000000000000001303611260561570600157510ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: systemtap-2.9/config.in000066400000000000000000000120041260561570600152170ustar00rootroot00000000000000/* config.in. Generated from configure.ac by autoheader. */ /* Configuration/build date */ #undef DATE /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* make -P prologue-searching default */ #undef ENABLE_PROLOGUES /* Define to 1 to enable process.mark probes in stap, staprun, stapio. */ #undef ENABLE_SDT_PROBES /* Define to 1 if you have the avahi libraries. */ #undef HAVE_AVAHI /* Define to 1 if you have the header file. */ #undef HAVE_BOOST_SHARED_PTR_HPP /* Define to 1 if you have the header file. */ #undef HAVE_BOOST_UTILITY_STRING_REF_HPP /* Define to 1 if you have the header file. */ #undef HAVE_BPATCH_OBJECT_H /* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have the header file. */ #undef HAVE_CRASH_DEFS_H /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if Dyninst is enabled */ #undef HAVE_DYNINST /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Flag indicating that libHelperSDT.so is available (can be found in PKGLIBDIR) */ #undef HAVE_JAVA /* Define to 1 if you have the `dw' library (-ldw). */ #undef HAVE_LIBDW /* Define to 1 if you have the `elf' library (-lelf). */ #undef HAVE_LIBELF /* have librpm */ #undef HAVE_LIBRPM /* have librpmio */ #undef HAVE_LIBRPMIO /* Define to 1 if you have the 'sqlite3' library (-lsqlite3). */ #undef HAVE_LIBSQLITE3 /* Define to 1 if libvirt development libraries are installed */ #undef HAVE_LIBVIRT /* Define to 1 if libxml2 development libraries are installed */ #undef HAVE_LIBXML2 /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the nss libraries. */ #undef HAVE_NSS /* Define to 1 if you have the `openat' function. */ #undef HAVE_OPENAT /* Define to 1 if you have the `ppoll' function. */ #undef HAVE_PPOLL /* Define to 1 if you have the SELinux libraries. */ #undef HAVE_SELINUX /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_TR1_MEMORY /* Define to 1 if you have the header file. */ #undef HAVE_TR1_UNORDERED_MAP /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* extra stap version code */ #undef STAP_EXTRA_VERSION /* configure prefix location */ #undef STAP_PREFIX /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE systemtap-2.9/config.rpath000077500000000000000000000442161260561570600157440ustar00rootroot00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2014 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: systemtap-2.9/configure000077500000000000000000014405441260561570600153500ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for systemtap 2.9. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: systemtap@sourceware.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='systemtap' PACKAGE_TARNAME='systemtap' PACKAGE_VERSION='2.9' PACKAGE_STRING='systemtap 2.9' PACKAGE_BUGREPORT='systemtap@sourceware.org' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gt_needs= enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS subdirs STAP_PREFIX cxx11 STAP_EXTRA_VERSION LOCALEDIR ENABLE_NLS HAVE_JAVA_FALSE HAVE_JAVA_TRUE JAVADIR have_jar have_javac HAVE_SELINUX_FALSE HAVE_SELINUX_TRUE selinux_LIBS selinux_CFLAGS support_section_question BUILD_VIRT_FALSE BUILD_VIRT_TRUE HAVE_LIBXML2_FALSE HAVE_LIBXML2_TRUE libxml2_LIBS libxml2_CFLAGS HAVE_LIBVIRT_FALSE HAVE_LIBVIRT_TRUE libvirt_LIBS libvirt_CFLAGS HAVE_DYNINST_FALSE HAVE_DYNINST_TRUE DYNINST_LDFLAGS DYNINST_CXXFLAGS CXXCPP DATE staprun_LIBS stap_LIBS elfutils_abs_srcdir BUILD_ELFUTILS_FALSE BUILD_ELFUTILS_TRUE python HAVE_AVAHI_FALSE HAVE_AVAHI_TRUE avahi_LIBS avahi_CFLAGS BUILD_SERVER_FALSE BUILD_SERVER_TRUE dracutstap HAVE_NSS_FALSE HAVE_NSS_TRUE nss_LIBS nss_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG BUILD_PDFREFDOCS_FALSE BUILD_PDFREFDOCS_TRUE XMLTO_STRINGPARAM_FALSE XMLTO_STRINGPARAM_TRUE HAVE_XMLTO_FALSE HAVE_XMLTO_TRUE HAVE_FOP_FALSE HAVE_FOP_TRUE have_fop BUILD_REFDOCS_FALSE BUILD_REFDOCS_TRUE have_xmlto BUILD_DOCS_FALSE BUILD_DOCS_TRUE have_latex2html have_ps2pdf have_dvips have_latex BUILD_CRASHMOD_FALSE BUILD_CRASHMOD_TRUE staplog_CPPFLAGS BUILD_TRANSLATOR_FALSE BUILD_TRANSLATOR_TRUE sqlite3_LIBS PIECXXFLAGS PIECFLAGS PIELDFLAGS POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS SED RANLIB am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX LN_S EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking enable_largefile enable_nls with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix enable_prologues enable_sdt_probes enable_ssp enable_pie enable_sqlite enable_translator enable_crash enable_docs enable_refdocs with_nss with_dracutstap enable_server with_avahi with_rpm with_python3 with_elfutils with_dyninst enable_virt with_selinux with_java with_extra_version ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR nss_CFLAGS nss_LIBS avahi_CFLAGS avahi_LIBS CXXCPP libvirt_CFLAGS libvirt_LIBS libxml2_CFLAGS libxml2_LIBS selinux_CFLAGS selinux_LIBS' ac_subdirs_all='testsuite' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures systemtap 2.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/systemtap] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of systemtap 2.9:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-largefile omit support for large files --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --enable-prologues make -P prologue-searching default --disable-sdt-probes disable process.mark probes in stap, staprun, stapio --disable-ssp disable gcc stack-protector --enable-pie enable position-independent-executable --enable-sqlite build with sqlite support --disable-translator build only runtime utilities --enable-crash[=DIRECTORY] enable crash extension (default is disabled). Optional DIRECTORY is the path to the crash header file (needed if installed in a non-standard location). --enable-docs enable building documentation (default on if latex etc. found). --enable-refdocs enable building reference documentation (default on if xmlto etc. found and other documentation built). --enable-server enable building of stap-server (default on if nss etc. found). --enable-virt enable building of stapvirt support (default on if libvirt etc. found). Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --without-nss Do not use NSS even if present --with-dracutstap=DIR Install dracut module files in DIR --without-avahi Do not use Avahi even if present --with-rpm query rpm database for missing debuginfos --with-python3 prefer /usr/bin/python3 --with-elfutils=DIRECTORY find elfutils source code in DIRECTORY --with-dyninst=DIRECTORY find dyninst headers/libraries in DIRECTORY --without-selinux Do not use libselinux even if present --with-java=DIRECTORY Specify JDK directory to compile libHelperSDT.so against (default is /usr/lib/jvm/java) --with-extra-version=STRING Add STRING to stap -V version Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path nss_CFLAGS C compiler flags for nss, overriding pkg-config nss_LIBS linker flags for nss, overriding pkg-config avahi_CFLAGS C compiler flags for avahi, overriding pkg-config avahi_LIBS linker flags for avahi, overriding pkg-config CXXCPP C++ preprocessor libvirt_CFLAGS C compiler flags for libvirt, overriding pkg-config libvirt_LIBS linker flags for libvirt, overriding pkg-config libxml2_CFLAGS C compiler flags for libxml2, overriding pkg-config libxml2_LIBS linker flags for libxml2, overriding pkg-config selinux_CFLAGS C compiler flags for selinux, overriding pkg-config selinux_LIBS linker flags for selinux, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF systemtap configure 2.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------------- ## ## Report this to systemtap@sourceware.org ## ## --------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------------- ## ## Report this to systemtap@sourceware.org ## ## --------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by systemtap $as_me 2.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='systemtap' VERSION='2.9' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi for ac_func in ppoll do : ac_fn_c_check_func "$LINENO" "ppoll" "ac_cv_func_ppoll" if test "x$ac_cv_func_ppoll" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PPOLL 1 _ACEOF fi done for ac_func in openat do : ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat" if test "x$ac_cv_func_openat" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENAT 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.19 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" if test "x$GMSGFMT" = "x:"; then as_fn_error $? "missing gnu /usr/bin/msgfmt" "$LINENO" 5 fi if test "${enable_prologues+set}" != set; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if prologue searching should be the default" >&5 $as_echo_n "checking to see if prologue searching should be the default... " >&6; } if { echo '#if __i386__ == 1 && __GNUC__ < 4' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then enable_prologues=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi # Check whether --enable-prologues was given. if test "${enable_prologues+set}" = set; then : enableval=$enable_prologues; if test "$enable_prologues" = yes; then $as_echo "#define ENABLE_PROLOGUES /**/" >>confdefs.h fi fi if test "${enable_sdt_probes+set}" != set; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if sdt probes should be the default" >&5 $as_echo_n "checking to see if sdt probes should be the default... " >&6; } if { echo '#if __GNUC__ < 4' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then enable_sdt_probes=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi # Check whether --enable-sdt-probes was given. if test "${enable_sdt_probes+set}" = set; then : enableval=$enable_sdt_probes; fi if test "x$enable_sdt_probes" != xno; then : $as_echo "#define ENABLE_SDT_PROBES 1" >>confdefs.h fi # Check whether --enable-ssp was given. if test "${enable_ssp+set}" = set; then : enableval=$enable_ssp; fi if test "x$enable_ssp" != xno; then : save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" CFLAGS="$CFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int something (); _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling with gcc -fstack-protector-all et al." >&5 $as_echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} CFLAGS="$save_CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" CXXFLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" else { $as_echo "$as_me:${as_lineno-$LINENO}: Compiler does not support -fstack-protector-all et al." >&5 $as_echo "$as_me: Compiler does not support -fstack-protector-all et al." >&6;} CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Compiling without fPIE by default (see PR 9922) # Check whether --enable-pie was given. if test "${enable_pie+set}" = set; then : enableval=$enable_pie; fi if test "x$enable_pie" == xyes; then : PIECFLAGS='-fPIE' PIECXXFLAGS='-fPIE' PIELDFLAGS='-pie -Wl,-z,relro -Wl,-z,now' save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS $PIECFLAGS" CXXFLAGS="$CXXFLAGS $PIECXXFLAGS" LDFLAGS="$LDFLAGS $PIELDFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void main () {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling with gcc pie et al." >&5 $as_echo "$as_me: Compiling with gcc pie et al." >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: Compiler does not support -pie et al." >&5 $as_echo "$as_me: Compiler does not support -pie et al." >&6;} PIECFLAGS="" PIECXXFLAGS="" PIELDFLAGS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" LDFLAGS="$save_LDFLAGS" fi # Check whether --enable-sqlite was given. if test "${enable_sqlite+set}" = set; then : enableval=$enable_sqlite; else enable_sqlite=check fi sqlite3_LIBS= if test "x$enable_sqlite" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5 $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; } if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqlite3_open (); int main () { return sqlite3_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sqlite3_sqlite3_open=yes else ac_cv_lib_sqlite3_sqlite3_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5 $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; } if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then : sqlite3_LIBS=-lsqlite3 $as_echo "#define HAVE_LIBSQLITE3 1" >>confdefs.h else if test "x$enable_sqlite" != xcheck; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "--enable-sqlite was given, but test for sqlite failed See \`config.log' for more details" "$LINENO" 5; } fi fi fi # Check whether --enable-translator was given. if test "${enable_translator+set}" = set; then : enableval=$enable_translator; else enable_translator="yes" fi if test "$enable_translator" == "yes"; then BUILD_TRANSLATOR_TRUE= BUILD_TRANSLATOR_FALSE='#' else BUILD_TRANSLATOR_TRUE='#' BUILD_TRANSLATOR_FALSE= fi # Check whether --enable-crash was given. if test "${enable_crash+set}" = set; then : enableval=$enable_crash; if test "$enable_crash" != "no"; then save_CPPFLAGS="$CPPFLAGS" if test "$enable_crash" != "yes"; then staplog_CPPFLAGS=-I$enable_crash CPPFLAGS="${staplog_CPPFLAGS} $CPPFLAGS" fi for ac_header in crash/defs.h do : ac_fn_c_check_header_compile "$LINENO" "crash/defs.h" "ac_cv_header_crash_defs_h" " #define NR_CPUS 256 " if test "x$ac_cv_header_crash_defs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CRASH_DEFS_H 1 _ACEOF else as_fn_error $? "cannot find required crash header (crash-devel may need to be installed)" "$LINENO" 5 fi done CPPFLAGS="$save_CPPFLAGS" fi else enable_crash="no" fi if test "$enable_crash" != "no"; then BUILD_CRASHMOD_TRUE= BUILD_CRASHMOD_FALSE='#' else BUILD_CRASHMOD_TRUE='#' BUILD_CRASHMOD_FALSE= fi building_docs="no" # Check whether --enable-docs was given. if test "${enable_docs+set}" = set; then : enableval=$enable_docs; enable_docs=$enableval else enable_docs="check" fi # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_latex+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_latex"; then ac_cv_prog_have_latex="$have_latex" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_latex="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_latex" && ac_cv_prog_have_latex="no" fi fi have_latex=$ac_cv_prog_have_latex if test -n "$have_latex"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_latex" >&5 $as_echo "$have_latex" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_dvips+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_dvips"; then ac_cv_prog_have_dvips="$have_dvips" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_dvips="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_dvips" && ac_cv_prog_have_dvips="no" fi fi have_dvips=$ac_cv_prog_have_dvips if test -n "$have_dvips"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dvips" >&5 $as_echo "$have_dvips" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "ps2pdf", so it can be a program name with args. set dummy ps2pdf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_ps2pdf+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_ps2pdf"; then ac_cv_prog_have_ps2pdf="$have_ps2pdf" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_ps2pdf="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_ps2pdf" && ac_cv_prog_have_ps2pdf="no" fi fi have_ps2pdf=$ac_cv_prog_have_ps2pdf if test -n "$have_ps2pdf"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ps2pdf" >&5 $as_echo "$have_ps2pdf" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "latex2html", so it can be a program name with args. set dummy latex2html; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_latex2html+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_latex2html"; then ac_cv_prog_have_latex2html="$have_latex2html" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_latex2html="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_latex2html" && ac_cv_prog_have_latex2html="no" fi fi have_latex2html=$ac_cv_prog_have_latex2html if test -n "$have_latex2html"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_latex2html" >&5 $as_echo "$have_latex2html" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then if test "$enable_docs" == "yes"; then as_fn_error $? "cannot find all tools for building documentation" "$LINENO" 5 fi if test "$enable_docs" == "check"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build documentation, cannot find all tools" >&5 $as_echo "$as_me: WARNING: will not build documentation, cannot find all tools" >&2;} fi fi if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"; then building_docs="yes" fi if test "$building_docs" == "yes"; then BUILD_DOCS_TRUE= BUILD_DOCS_FALSE='#' else BUILD_DOCS_TRUE='#' BUILD_DOCS_FALSE= fi building_refdocs="no" # Check whether --enable-refdocs was given. if test "${enable_refdocs+set}" = set; then : enableval=$enable_refdocs; enable_refdocs=$enableval else enable_refdocs="check" fi if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then as_fn_error $? "must use --enable-docs with --enable-refdocs" "$LINENO" 5 fi # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_xmlto+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_xmlto"; then ac_cv_prog_have_xmlto="$have_xmlto" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_xmlto="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_xmlto" && ac_cv_prog_have_xmlto="no" fi fi have_xmlto=$ac_cv_prog_have_xmlto if test -n "$have_xmlto"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_xmlto" >&5 $as_echo "$have_xmlto" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$enable_refdocs" == "yes"; then if test "x${have_xmlto}" != "xyes"; then as_fn_error $? "cannot find xmlto for building reference documentation" "$LINENO" 5 fi fi if test "x${have_xmlto}" == "xyes" -a "$enable_refdocs" != "no" -a "${building_docs}" == "yes"; then building_refdocs="yes" fi if test "$building_refdocs" == "yes"; then BUILD_REFDOCS_TRUE= BUILD_REFDOCS_FALSE='#' else BUILD_REFDOCS_TRUE='#' BUILD_REFDOCS_FALSE= fi # Extract the first word of "fop", so it can be a program name with args. set dummy fop; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_fop+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_fop"; then ac_cv_prog_have_fop="$have_fop" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_fop="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_fop" && ac_cv_prog_have_fop="no" fi fi have_fop=$ac_cv_prog_have_fop if test -n "$have_fop"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_fop" >&5 $as_echo "$have_fop" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x${have_fop}" == "xyes"; then # Due to rhbz505364 / 830266, we must actually test-run fop, not just # hope that it works. { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if xmlto --with-fop actually works" >&5 $as_echo_n "checking to see if xmlto --with-fop actually works... " >&6; } if xmlto --with-fop pdf ${srcdir}/doc/SystemTap_Tapset_Reference/dummy-tapsets.xml >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: it's dead, Jim" >&5 $as_echo "it's dead, Jim" >&6; } have_fop="broken" fi rm -f dummy-tapsets.pdf fi if test "$have_fop" == "yes"; then HAVE_FOP_TRUE= HAVE_FOP_FALSE='#' else HAVE_FOP_TRUE='#' HAVE_FOP_FALSE= fi if test "$have_xmlto" == "yes"; then HAVE_XMLTO_TRUE= HAVE_XMLTO_FALSE='#' else HAVE_XMLTO_TRUE='#' HAVE_XMLTO_FALSE= fi cat > conftest.xml << 'EOF' foo Logging Tapset log logging Description baz EOF if test "x${have_xmlto}" == "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlto --stringparam support" >&5 $as_echo_n "checking for xmlto --stringparam support... " >&6; } xmlto --stringparam man.authors.section.enabled=0 html-nochunks conftest.xml >/dev/null 2>&1 if test $? == 0; then have_xmlto_stringparam="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest.html fi if test "$have_xmlto_stringparam" == "yes"; then XMLTO_STRINGPARAM_TRUE= XMLTO_STRINGPARAM_FALSE='#' else XMLTO_STRINGPARAM_TRUE='#' XMLTO_STRINGPARAM_FALSE= fi if test "x${building_refdocs}" == "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlto pdf support" >&5 $as_echo_n "checking for xmlto pdf support... " >&6; } # xmlto pdf may work *only* with --with-fop # XXX: To an extent this test is redundant in that the --with-fop test # already ran xmlto --with-fop pdf .... if test "x$have_fop" == "xyes"; then XMLTOPDF_FOP=--with-fop else XMLTOPDF_FOP= fi xmlto $XMLTOPDF_FOP pdf conftest.xml >& /dev/null if test $? == 0; then have_xmlto_pdf="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not building reference documentation in PDF format" >&5 $as_echo "$as_me: WARNING: Not building reference documentation in PDF format" >&2;} fi rm -f conftest.pdf fi if test "$have_xmlto_pdf" == "yes"; then BUILD_PDFREFDOCS_TRUE= BUILD_PDFREFDOCS_FALSE='#' else BUILD_PDFREFDOCS_TRUE='#' BUILD_PDFREFDOCS_FALSE= fi rm -f conftest.xml # Check whether --with-nss was given. if test "${with_nss+set}" = set; then : withval=$with_nss; fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi if test "x$with_nss" != "xno"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss" >&5 $as_echo_n "checking for nss... " >&6; } if test -n "$nss_CFLAGS"; then pkg_cv_nss_CFLAGS="$nss_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nss >= 3\""; } >&5 ($PKG_CONFIG --exists --print-errors "nss >= 3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_nss_CFLAGS=`$PKG_CONFIG --cflags "nss >= 3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$nss_LIBS"; then pkg_cv_nss_LIBS="$nss_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nss >= 3\""; } >&5 ($PKG_CONFIG --exists --print-errors "nss >= 3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_nss_LIBS=`$PKG_CONFIG --libs "nss >= 3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nss >= 3" 2>&1` else nss_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nss >= 3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$nss_PKG_ERRORS" >&5 have_nss=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_nss=no else nss_CFLAGS=$pkg_cv_nss_CFLAGS nss_LIBS=$pkg_cv_nss_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_nss=yes $as_echo "#define HAVE_NSS 1" >>confdefs.h fi else have_nss=no fi if test "${have_nss}" = "yes"; then HAVE_NSS_TRUE= HAVE_NSS_FALSE='#' else HAVE_NSS_TRUE='#' HAVE_NSS_FALSE= fi # Check whether --with-dracutstap was given. if test "${with_dracutstap+set}" = set; then : withval=$with_dracutstap; fi if test "x$with_dracutstap" != "x"; then : dracutstap="$with_dracutstap" else dracutstap=/usr/lib/dracut/modules.d/99stap fi { $as_echo "$as_me:${as_lineno-$LINENO}: using dracut module directory $dracutstap" >&5 $as_echo "$as_me: using dracut module directory $dracutstap" >&6;} # Check whether --enable-server was given. if test "${enable_server+set}" = set; then : enableval=$enable_server; enable_server=$enableval else enable_server="check" fi if test "$enable_server" != "no"; then if test "x${have_nss}" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap compile server, cannot find nss headers" >&5 $as_echo "$as_me: WARNING: will not build systemtap compile server, cannot find nss headers" >&2;} fi fi if test "${have_nss}" == "yes" -a "$enable_server" != "no"; then BUILD_SERVER_TRUE= BUILD_SERVER_FALSE='#' else BUILD_SERVER_TRUE='#' BUILD_SERVER_FALSE= fi if test "${have_nss}" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compile-server client functionality will be disabled, cannot find nss development files" >&5 $as_echo "$as_me: WARNING: compile-server client functionality will be disabled, cannot find nss development files" >&2;} fi # Check whether --with-avahi was given. if test "${with_avahi+set}" = set; then : withval=$with_avahi; fi if test "x$with_avahi" != "xno"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi" >&5 $as_echo_n "checking for avahi... " >&6; } if test -n "$avahi_CFLAGS"; then pkg_cv_avahi_CFLAGS="$avahi_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"avahi-client\""; } >&5 ($PKG_CONFIG --exists --print-errors "avahi-client") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_avahi_CFLAGS=`$PKG_CONFIG --cflags "avahi-client" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$avahi_LIBS"; then pkg_cv_avahi_LIBS="$avahi_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"avahi-client\""; } >&5 ($PKG_CONFIG --exists --print-errors "avahi-client") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_avahi_LIBS=`$PKG_CONFIG --libs "avahi-client" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then avahi_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "avahi-client" 2>&1` else avahi_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "avahi-client" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$avahi_PKG_ERRORS" >&5 have_avahi=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_avahi=no else avahi_CFLAGS=$pkg_cv_avahi_CFLAGS avahi_LIBS=$pkg_cv_avahi_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_avahi=yes $as_echo "#define HAVE_AVAHI 1" >>confdefs.h fi else have_avahi=no fi if test "${have_avahi}" = "yes"; then HAVE_AVAHI_TRUE= HAVE_AVAHI_FALSE='#' else HAVE_AVAHI_TRUE='#' HAVE_AVAHI_FALSE= fi if test "${have_avahi}" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: some compile-server functionality will be restricted, cannot find avahi development files" >&5 $as_echo "$as_me: WARNING: some compile-server functionality will be restricted, cannot find avahi development files" >&2;} fi # Check whether --with-rpm was given. if test "${with_rpm+set}" = set; then : withval=$with_rpm; else with_rpm="auto" fi if test "$with_rpm" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpmtsInitIterator in -lrpm" >&5 $as_echo_n "checking for rpmtsInitIterator in -lrpm... " >&6; } if ${ac_cv_lib_rpm_rpmtsInitIterator+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrpm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rpmtsInitIterator (); int main () { return rpmtsInitIterator (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rpm_rpmtsInitIterator=yes else ac_cv_lib_rpm_rpmtsInitIterator=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpm_rpmtsInitIterator" >&5 $as_echo "$ac_cv_lib_rpm_rpmtsInitIterator" >&6; } if test "x$ac_cv_lib_rpm_rpmtsInitIterator" = xyes; then : $as_echo "#define HAVE_LIBRPM 1" >>confdefs.h stap_LIBS="$stap_LIBS -lc -lrpm" have_librpm="yes" else have_librpm="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpmFreeCrypto in -lrpmio" >&5 $as_echo_n "checking for rpmFreeCrypto in -lrpmio... " >&6; } if ${ac_cv_lib_rpmio_rpmFreeCrypto+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrpmio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rpmFreeCrypto (); int main () { return rpmFreeCrypto (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rpmio_rpmFreeCrypto=yes else ac_cv_lib_rpmio_rpmFreeCrypto=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpmio_rpmFreeCrypto" >&5 $as_echo "$ac_cv_lib_rpmio_rpmFreeCrypto" >&6; } if test "x$ac_cv_lib_rpmio_rpmFreeCrypto" = xyes; then : $as_echo "#define HAVE_LIBRPMIO 1" >>confdefs.h stap_LIBS="$stap_LIBS -lc -lrpmio" have_librpmio="yes" else have_librpmio="no" fi if test "x$have_librpm" != "xyes" -a "$with_rpm" == "yes"; then as_fn_error $? "cannot find librpm" "$LINENO" 5 fi if test "x$have_librpmio" != "xyes" -a "$with_rpm" == "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find librpmio" >&5 $as_echo "$as_me: WARNING: cannot find librpmio" >&2;} fi fi # Check whether --with-python3 was given. if test "${with_python3+set}" = set; then : withval=$with_python3; fi if test "x$with_python3" = "xyes"; then : python=python3 else python=python fi build_elfutils=no # Check whether --with-elfutils was given. if test "${with_elfutils+set}" = set; then : withval=$with_elfutils; case "$with_elfutils" in yes) as_fn_error $? "--with-elfutils requires an argument" "$LINENO" 5 ;; ''|no) ;; *) build_elfutils=yes ;; esac fi if test $build_elfutils = yes; then BUILD_ELFUTILS_TRUE= BUILD_ELFUTILS_FALSE='#' else BUILD_ELFUTILS_TRUE='#' BUILD_ELFUTILS_FALSE= fi elfutils_abs_srcdir=`if test $build_elfutils = yes; then : cd $with_elfutils && pwd fi` if test $enable_translator = yes; then if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils http://elfutils.fedorahosted.org/ # On modern debian/ubuntu, libebl has been merged into libdw # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=457543 save_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ebl_get_elfmachine in -lebl" >&5 $as_echo_n "checking for ebl_get_elfmachine in -lebl... " >&6; } if ${ac_cv_lib_ebl_ebl_get_elfmachine+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lebl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ebl_get_elfmachine (); int main () { return ebl_get_elfmachine (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ebl_ebl_get_elfmachine=yes else ac_cv_lib_ebl_ebl_get_elfmachine=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ebl_ebl_get_elfmachine" >&5 $as_echo "$ac_cv_lib_ebl_ebl_get_elfmachine" >&6; } if test "x$ac_cv_lib_ebl_ebl_get_elfmachine" = xyes; then : ebl_LIBS=-lebl else ebl_LIBS= fi LIBS="$save_LIBS" save_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dwfl_module_getsym in -ldw" >&5 $as_echo_n "checking for dwfl_module_getsym in -ldw... " >&6; } if ${ac_cv_lib_dw_dwfl_module_getsym+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldw -Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dwfl_module_getsym (); int main () { return dwfl_module_getsym (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dw_dwfl_module_getsym=yes else ac_cv_lib_dw_dwfl_module_getsym=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dw_dwfl_module_getsym" >&5 $as_echo "$ac_cv_lib_dw_dwfl_module_getsym" >&6; } if test "x$ac_cv_lib_dw_dwfl_module_getsym" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDW 1 _ACEOF LIBS="-ldw $LIBS" else as_fn_error $? "missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dwarf_next_unit in -ldw" >&5 $as_echo_n "checking for dwarf_next_unit in -ldw... " >&6; } if ${ac_cv_lib_dw_dwarf_next_unit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldw -Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dwarf_next_unit (); int main () { return dwarf_next_unit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dw_dwarf_next_unit=yes else ac_cv_lib_dw_dwarf_next_unit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dw_dwarf_next_unit" >&5 $as_echo "$ac_cv_lib_dw_dwarf_next_unit" >&6; } if test "x$ac_cv_lib_dw_dwarf_next_unit" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDW 1 _ACEOF LIBS="-ldw $LIBS" else as_fn_error $? "elfutils, libdw too old, need 0.148+" "$LINENO" 5 fi stap_LIBS="$stap_LIBS -Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf" LIBS="$save_LIBS" else # We built our own and stap_LDFLAGS points at the install. stap_LIBS="$stap_LIBS -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: stap will link $stap_LIBS" >&5 $as_echo "$as_me: stap will link $stap_LIBS" >&6;} # staprun has more modest libelf needs if test $build_elfutils = no; then save_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_getshdrstrndx in -lelf" >&5 $as_echo_n "checking for elf_getshdrstrndx in -lelf... " >&6; } if ${ac_cv_lib_elf_elf_getshdrstrndx+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lelf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char elf_getshdrstrndx (); int main () { return elf_getshdrstrndx (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_elf_elf_getshdrstrndx=yes else ac_cv_lib_elf_elf_getshdrstrndx=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_getshdrstrndx" >&5 $as_echo "$ac_cv_lib_elf_elf_getshdrstrndx" >&6; } if test "x$ac_cv_lib_elf_elf_getshdrstrndx" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBELF 1 _ACEOF LIBS="-lelf $LIBS" else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "libelf too old, need 0.142+ See \`config.log' for more details" "$LINENO" 5; } fi staprun_LIBS="$staprun_LIBS -lelf" LIBS="$save_LIBS" else # We built our own and staprun_LDFLAGS points at the install. staprun_LIBS="$staprun_LIBS -lelf" fi { $as_echo "$as_me:${as_lineno-$LINENO}: staprun will link $staprun_LIBS" >&5 $as_echo "$as_me: staprun will link $staprun_LIBS" >&6;} date=`date +%Y-%m-%d` cat >>confdefs.h <<_ACEOF #define DATE "$date" _ACEOF DATE="$date" # Before PR4037, we used to arrange to pass CFLAGS+=-m64 for a staprun # being compiled on 32-bit userspace but running against 64-bit kernels. # This is no longer necessary. # Use tr1/unordered_map if available ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_header in tr1/unordered_map do : ac_fn_cxx_check_header_mongrel "$LINENO" "tr1/unordered_map" "ac_cv_header_tr1_unordered_map" "$ac_includes_default" if test "x$ac_cv_header_tr1_unordered_map" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TR1_UNORDERED_MAP 1 _ACEOF fi done for ac_header in tr1/memory do : ac_fn_cxx_check_header_mongrel "$LINENO" "tr1/memory" "ac_cv_header_tr1_memory" "$ac_includes_default" if test "x$ac_cv_header_tr1_memory" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TR1_MEMORY 1 _ACEOF fi done for ac_header in boost/shared_ptr.hpp do : ac_fn_cxx_check_header_mongrel "$LINENO" "boost/shared_ptr.hpp" "ac_cv_header_boost_shared_ptr_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_shared_ptr_hpp" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BOOST_SHARED_PTR_HPP 1 _ACEOF fi done for ac_header in boost/utility/string_ref.hpp do : ac_fn_cxx_check_header_mongrel "$LINENO" "boost/utility/string_ref.hpp" "ac_cv_header_boost_utility_string_ref_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_utility_string_ref_hpp" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BOOST_UTILITY_STRING_REF_HPP 1 _ACEOF fi done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check for Dyninst headers and libraries # Check whether --with-dyninst was given. if test "${with_dyninst+set}" = set; then : withval=$with_dyninst; fi case "$with_dyninst" in no) ;; ''|yes) # Try a simple-minded distro search DYNINST_CXXFLAGS="-I/usr/include/dyninst" DYNINST_LDFLAGS="-L/usr/lib64/dyninst -L/usr/lib/dyninst" # XXX both lib paths!?! ;; *) # Use paths in the user-specified prefix DYNINST_CXXFLAGS="-I$with_dyninst/include" DYNINST_LDFLAGS="-L$with_dyninst/lib/" # XXX need lib64 too? ;; esac if test "$with_dyninst" != "no"; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $DYNINST_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking dyninst support" >&5 $as_echo "$as_me: checking dyninst support" >&6;} for ac_header in BPatch_object.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "BPatch_object.h" "ac_cv_header_BPatch_object_h" "$ac_includes_default" if test "x$ac_cv_header_BPatch_object_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BPATCH_OBJECT_H 1 _ACEOF $as_echo "#define HAVE_DYNINST 1" >>confdefs.h have_dyninst=yes { $as_echo "$as_me:${as_lineno-$LINENO}: dyninst support available" >&5 $as_echo "$as_me: dyninst support available" >&6;} fi done if test -n "$with_dyninst" -a "$have_dyninst" != "yes"; then as_fn_error $? "Dyninst does not appear to be usable" "$LINENO" 5 fi CPPFLAGS="$old_CPPFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "${have_dyninst}" = "yes"; then HAVE_DYNINST_TRUE= HAVE_DYNINST_FALSE='#' else HAVE_DYNINST_TRUE='#' HAVE_DYNINST_FALSE= fi # Check whether --enable-virt was given. if test "${enable_virt+set}" = set; then : enableval=$enable_virt; enable_virt=$enableval else enable_virt="check" fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libvirt" >&5 $as_echo_n "checking for libvirt... " >&6; } if test -n "$libvirt_CFLAGS"; then pkg_cv_libvirt_CFLAGS="$libvirt_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libvirt >= 1.0.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libvirt >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libvirt_CFLAGS=`$PKG_CONFIG --cflags "libvirt >= 1.0.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libvirt_LIBS"; then pkg_cv_libvirt_LIBS="$libvirt_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libvirt >= 1.0.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libvirt >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libvirt_LIBS=`$PKG_CONFIG --libs "libvirt >= 1.0.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libvirt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libvirt >= 1.0.2" 2>&1` else libvirt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libvirt >= 1.0.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libvirt_PKG_ERRORS" >&5 have_libvirt=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_libvirt=no else libvirt_CFLAGS=$pkg_cv_libvirt_CFLAGS libvirt_LIBS=$pkg_cv_libvirt_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_libvirt=yes $as_echo "#define HAVE_LIBVIRT 1" >>confdefs.h fi if test "${have_libvirt}" = "yes"; then HAVE_LIBVIRT_TRUE= HAVE_LIBVIRT_FALSE='#' else HAVE_LIBVIRT_TRUE='#' HAVE_LIBVIRT_FALSE= fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2" >&5 $as_echo_n "checking for libxml2... " >&6; } if test -n "$libxml2_CFLAGS"; then pkg_cv_libxml2_CFLAGS="$libxml2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libxml2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libxml2_LIBS"; then pkg_cv_libxml2_LIBS="$libxml2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libxml2_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libxml2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` else libxml2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libxml2_PKG_ERRORS" >&5 have_libxml2=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_libxml2=no else libxml2_CFLAGS=$pkg_cv_libxml2_CFLAGS libxml2_LIBS=$pkg_cv_libxml2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_libxml2=yes $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h fi if test "${have_libxml2}" = "yes"; then HAVE_LIBXML2_TRUE= HAVE_LIBXML2_FALSE='#' else HAVE_LIBXML2_TRUE='#' HAVE_LIBXML2_FALSE= fi if test "$enable_virt" != "no"; then if test "x${have_libvirt}" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap virt support, cannot find libvirt headers" >&5 $as_echo "$as_me: WARNING: will not build systemtap virt support, cannot find libvirt headers" >&2;} fi if test "x${have_libxml2}" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap virt support, cannot find xml2 headers" >&5 $as_echo "$as_me: WARNING: will not build systemtap virt support, cannot find xml2 headers" >&2;} fi fi if test "${have_libvirt}" == "yes" -a "${have_libxml2}" == "yes" -a "$enable_virt" != "no"; then BUILD_VIRT_TRUE= BUILD_VIRT_FALSE='#' else BUILD_VIRT_TRUE='#' BUILD_VIRT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .section \"?\" flags support" >&5 $as_echo_n "checking for assembler .section \"?\" flags support... " >&6; } if ${stap_cv_sectionq+:} false; then : $as_echo_n "(cached) " >&6 else old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wa,--fatal-warnings" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ asm(".section .note.foo,\"?\",\"note\"\n" ".byte 1, 2, 3\n" ".previous\n" ".section .text,\"axG\",\"progbits\",foogroup,comdat\n" ".byte 1\n" ".pushsection .note.foo,\"?\",\"note\"\n" ".byte 4, 5, 6\n" ".popsection\n" ".byte 2\n"); _ACEOF if ac_fn_c_try_compile "$LINENO"; then : stap_cv_sectionq=yes else stap_cv_sectionq=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$old_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $stap_cv_sectionq" >&5 $as_echo "$stap_cv_sectionq" >&6; } support_section_question=0 if test $stap_cv_sectionq = yes; then support_section_question=1 fi ac_config_files="$ac_config_files includes/sys/sdt-config.h po/Makefile.in" if test $build_elfutils = yes -a $enable_translator = yes; then here=`pwd` case "$with_elfutils" in /*) elfutils_srcdir="$with_elfutils" ;; *) elfutils_srcdir="${here}/$with_elfutils" ;; esac if ! test -f ${elfutils_srcdir}/configure; then as_fn_error $? "No ${elfutils_srcdir}/configure, forgot to run autoreconf -i?" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: running ${elfutils_srcdir}/configure" >&5 $as_echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fgnu89-inline" CFLAGS="$CFLAGS -fgnu89-inline" gnu89_inline_flag="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int something (); _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling elfutils with gcc -fgnu89-inline" >&5 $as_echo "$as_me: Compiling elfutils with gcc -fgnu89-inline" >&6;} gnu89_inline_flag="-fgnu89-inline" else { $as_echo "$as_me:${as_lineno-$LINENO}: Compiler does not support -fgnu89-inline" >&5 $as_echo "$as_me: Compiler does not support -fgnu89-inline" >&6;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" # Our libdw.so's libebl will look in $ORIGIN/../lib/... but that # $ORIGIN is where libdw.so resides, which is not where there is a ../lib. # Note that $libdir might be using a quoted use of $exec_prefix or $prefix. # So we must make sure to pass those settings to elfutils configure. elfutils_rpath="-Wl,--enable-new-dtags,-rpath,${libdir}/${PACKAGE_NAME}" # Check whether this is a source release, or a source checkout. # We need --enable-maintainer-mode if it isn't a source release. # elfutils.spec is only distributed in source releases. if test -f ${elfutils_srcdir}/elfutils.spec; then need_maintainer_option="" else need_maintainer_option="--enable-maintainer-mode" fi (mkdir -p build-elfutils && cd build-elfutils && bash ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \ --includedir="${here}/include-elfutils" \ --libdir="${here}/lib-elfutils" \ --exec-prefix="$exec_prefix" \ --prefix="$prefix" \ --enable-dwz \ ${need_maintainer_option} \ CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag -fexceptions" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && if test -f ${elfutils_srcdir}/config/version.h.in; then echo Found elfutils/version.h header... else echo elfutils/version.h header not found, need elfutils 0.142+... exit -1 fi ) if test $? != 0; then exit -1; fi fi # Check whether --with-selinux was given. if test "${with_selinux+set}" = set; then : withval=$with_selinux; fi if test "x$with_selinux" != "xno"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for selinux" >&5 $as_echo_n "checking for selinux... " >&6; } if test -n "$selinux_CFLAGS"; then pkg_cv_selinux_CFLAGS="$selinux_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux\""; } >&5 ($PKG_CONFIG --exists --print-errors "libselinux") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_selinux_CFLAGS=`$PKG_CONFIG --cflags "libselinux" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$selinux_LIBS"; then pkg_cv_selinux_LIBS="$selinux_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux\""; } >&5 ($PKG_CONFIG --exists --print-errors "libselinux") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_selinux_LIBS=`$PKG_CONFIG --libs "libselinux" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then selinux_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libselinux" 2>&1` else selinux_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libselinux" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$selinux_PKG_ERRORS" >&5 have_selinux=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_selinux=no else selinux_CFLAGS=$pkg_cv_selinux_CFLAGS selinux_LIBS=$pkg_cv_selinux_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_selinux=yes $as_echo "#define HAVE_SELINUX 1" >>confdefs.h fi else have_selinux=no fi if test "${have_selinux}" = "yes"; then HAVE_SELINUX_TRUE= HAVE_SELINUX_FALSE='#' else HAVE_SELINUX_TRUE='#' HAVE_SELINUX_FALSE= fi # Extract the first word of "javac", so it can be a program name with args. set dummy javac; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_javac+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_javac"; then ac_cv_prog_have_javac="$have_javac" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_javac="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_javac" && ac_cv_prog_have_javac="no" fi fi have_javac=$ac_cv_prog_have_javac if test -n "$have_javac"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_javac" >&5 $as_echo "$have_javac" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "jar", so it can be a program name with args. set dummy jar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_jar+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_jar"; then ac_cv_prog_have_jar="$have_jar" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_jar="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_jar" && ac_cv_prog_have_jar="no" fi fi have_jar=$ac_cv_prog_have_jar if test -n "$have_jar"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_jar" >&5 $as_echo "$have_jar" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$have_javac" != no -a "$have_jar" != no; then echo java found, will try to configure Byteman support # Check whether --with-java was given. if test "${with_java+set}" = set; then : withval=$with_java; else with_java=/usr/lib/jvm/java fi if test ! -d "$with_java"; then with_java=no fi JAVADIR="${with_java}" # always needed to compile if test "$with_java" != "no"; then cat >>confdefs.h <<_ACEOF #define HAVE_JAVA "1" _ACEOF fi if test "$with_java" != "no"; then HAVE_JAVA_TRUE= HAVE_JAVA_FALSE='#' else HAVE_JAVA_TRUE='#' HAVE_JAVA_FALSE= fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not run per-method java probing, missing byteman or java requirements" >&5 $as_echo "$as_me: WARNING: will not run per-method java probing, missing byteman or java requirements" >&2;} if false; then HAVE_JAVA_TRUE= HAVE_JAVA_FALSE='#' else HAVE_JAVA_TRUE='#' HAVE_JAVA_FALSE= fi fi # java+byteman support ENABLE_NLS="$USE_NLS" localedir="$localedir" LOCALEDIR="$localedir" # Check whether --with-extra-version was given. if test "${with_extra_version+set}" = set; then : withval=$with_extra_version; fi if test "x$with_extra_version" != "xno"; then : stap_extra_version="$with_extra_version" { $as_echo "$as_me:${as_lineno-$LINENO}: Adding extra version $stap_extra_version" >&5 $as_echo "$as_me: Adding extra version $stap_extra_version" >&6;} else stap_extra_version="" fi cat >>confdefs.h <<_ACEOF #define STAP_EXTRA_VERSION "$stap_extra_version" _ACEOF STAP_EXTRA_VERSION="$stap_extra_version" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -std=c++11" >&5 $as_echo_n "checking whether C compiler accepts -std=c++11... " >&6; } if ${ax_cv_check_cflags___std_cpp11+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___std_cpp11=yes else ax_cv_check_cflags___std_cpp11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___std_cpp11" >&5 $as_echo "$ax_cv_check_cflags___std_cpp11" >&6; } if test "x$ax_cv_check_cflags___std_cpp11" = xyes; then : cxx11="-std=c++11" else cxx11="" fi if test "x$cxx11" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling parts of systemtap with -std=c++11" >&5 $as_echo "$as_me: Compiling parts of systemtap with -std=c++11" >&6;} fi stap_prefix=$prefix test "$stap_prefix" = NONE && stap_prefix=$ac_default_prefix cat >>confdefs.h <<_ACEOF #define STAP_PREFIX "$stap_prefix" _ACEOF STAP_PREFIX="$stap_prefix" ac_config_headers="$ac_config_headers config.h:config.in" ac_config_files="$ac_config_files Makefile doc/Makefile man/Makefile doc/beginners/Makefile doc/SystemTap_Tapset_Reference/Makefile man/stappaths.7 man/systemtap.8 initscript/config.systemtap initscript/config.stap-server initscript/systemtap initscript/stap-server initscript/99stap/module-setup.sh" subdirs="$subdirs testsuite" if test $enable_translator == "yes"; then ac_config_files="$ac_config_files run-stap" fi ac_config_files="$ac_config_files dtrace" ac_config_files="$ac_config_files stapdyn/Makefile" ac_config_files="$ac_config_files java/Makefile" ac_config_files="$ac_config_files java/stapbm" ac_config_files="$ac_config_files staprun/Makefile" ac_config_files="$ac_config_files staprun/run-staprun" ac_config_files="$ac_config_files staprun/guest/stapshd" ac_config_files="$ac_config_files staprun/guest/stapsh-daemon" ac_config_files="$ac_config_files staprun/guest/stapsh@.service" # Setup "shadow" directory doc/beginners that has the basic directories setup for # xmlto in one directory (through directory links if necessary). # It would be nice to use AC_CONFIG_LINKS, but automake complains when # the src is a directory and not a file. ac_config_commands="$ac_config_commands doc/beginners" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_TRANSLATOR_TRUE}" && test -z "${BUILD_TRANSLATOR_FALSE}"; then as_fn_error $? "conditional \"BUILD_TRANSLATOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CRASHMOD_TRUE}" && test -z "${BUILD_CRASHMOD_FALSE}"; then as_fn_error $? "conditional \"BUILD_CRASHMOD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then as_fn_error $? "conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_REFDOCS_TRUE}" && test -z "${BUILD_REFDOCS_FALSE}"; then as_fn_error $? "conditional \"BUILD_REFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FOP_TRUE}" && test -z "${HAVE_FOP_FALSE}"; then as_fn_error $? "conditional \"HAVE_FOP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then as_fn_error $? "conditional \"HAVE_XMLTO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XMLTO_STRINGPARAM_TRUE}" && test -z "${XMLTO_STRINGPARAM_FALSE}"; then as_fn_error $? "conditional \"XMLTO_STRINGPARAM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PDFREFDOCS_TRUE}" && test -z "${BUILD_PDFREFDOCS_FALSE}"; then as_fn_error $? "conditional \"BUILD_PDFREFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_NSS_TRUE}" && test -z "${HAVE_NSS_FALSE}"; then as_fn_error $? "conditional \"HAVE_NSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_SERVER_TRUE}" && test -z "${BUILD_SERVER_FALSE}"; then as_fn_error $? "conditional \"BUILD_SERVER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_AVAHI_TRUE}" && test -z "${HAVE_AVAHI_FALSE}"; then as_fn_error $? "conditional \"HAVE_AVAHI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ELFUTILS_TRUE}" && test -z "${BUILD_ELFUTILS_FALSE}"; then as_fn_error $? "conditional \"BUILD_ELFUTILS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DYNINST_TRUE}" && test -z "${HAVE_DYNINST_FALSE}"; then as_fn_error $? "conditional \"HAVE_DYNINST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBVIRT_TRUE}" && test -z "${HAVE_LIBVIRT_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBVIRT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBXML2_TRUE}" && test -z "${HAVE_LIBXML2_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBXML2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_VIRT_TRUE}" && test -z "${BUILD_VIRT_FALSE}"; then as_fn_error $? "conditional \"BUILD_VIRT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SELINUX_TRUE}" && test -z "${HAVE_SELINUX_FALSE}"; then as_fn_error $? "conditional \"HAVE_SELINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_JAVA_TRUE}" && test -z "${HAVE_JAVA_FALSE}"; then as_fn_error $? "conditional \"HAVE_JAVA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_JAVA_TRUE}" && test -z "${HAVE_JAVA_FALSE}"; then as_fn_error $? "conditional \"HAVE_JAVA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by systemtap $as_me 2.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ systemtap config.status 2.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "includes/sys/sdt-config.h") CONFIG_FILES="$CONFIG_FILES includes/sys/sdt-config.h" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "doc/beginners/Makefile") CONFIG_FILES="$CONFIG_FILES doc/beginners/Makefile" ;; "doc/SystemTap_Tapset_Reference/Makefile") CONFIG_FILES="$CONFIG_FILES doc/SystemTap_Tapset_Reference/Makefile" ;; "man/stappaths.7") CONFIG_FILES="$CONFIG_FILES man/stappaths.7" ;; "man/systemtap.8") CONFIG_FILES="$CONFIG_FILES man/systemtap.8" ;; "initscript/config.systemtap") CONFIG_FILES="$CONFIG_FILES initscript/config.systemtap" ;; "initscript/config.stap-server") CONFIG_FILES="$CONFIG_FILES initscript/config.stap-server" ;; "initscript/systemtap") CONFIG_FILES="$CONFIG_FILES initscript/systemtap" ;; "initscript/stap-server") CONFIG_FILES="$CONFIG_FILES initscript/stap-server" ;; "initscript/99stap/module-setup.sh") CONFIG_FILES="$CONFIG_FILES initscript/99stap/module-setup.sh" ;; "run-stap") CONFIG_FILES="$CONFIG_FILES run-stap" ;; "dtrace") CONFIG_FILES="$CONFIG_FILES dtrace" ;; "stapdyn/Makefile") CONFIG_FILES="$CONFIG_FILES stapdyn/Makefile" ;; "java/Makefile") CONFIG_FILES="$CONFIG_FILES java/Makefile" ;; "java/stapbm") CONFIG_FILES="$CONFIG_FILES java/stapbm" ;; "staprun/Makefile") CONFIG_FILES="$CONFIG_FILES staprun/Makefile" ;; "staprun/run-staprun") CONFIG_FILES="$CONFIG_FILES staprun/run-staprun" ;; "staprun/guest/stapshd") CONFIG_FILES="$CONFIG_FILES staprun/guest/stapshd" ;; "staprun/guest/stapsh-daemon") CONFIG_FILES="$CONFIG_FILES staprun/guest/stapsh-daemon" ;; "staprun/guest/stapsh@.service") CONFIG_FILES="$CONFIG_FILES staprun/guest/stapsh@.service" ;; "doc/beginners") CONFIG_COMMANDS="$CONFIG_COMMANDS doc/beginners" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; "run-stap":F) chmod +x run-stap ;; "dtrace":F) chmod +x dtrace ;; "java/stapbm":F) chmod +x java/stapbm ;; "staprun/run-staprun":F) chmod +x staprun/run-staprun ;; "staprun/guest/stapshd":F) chmod +x staprun/guest/stapshd ;; "staprun/guest/stapsh-daemon":F) chmod +x staprun/guest/stapsh-daemon ;; "doc/beginners":C) rm -f $ac_abs_top_builddir/doc/beginners/en-US $ac_abs_top_builddir/doc/beginners/build/en-US/testsuite && mkdir -p $ac_abs_top_builddir/doc/beginners/build/en-US && ln -s $ac_abs_top_srcdir/doc/SystemTap_Beginners_Guide/en-US $ac_abs_top_builddir/doc/beginners/en-US && ln -s $ac_abs_top_srcdir/testsuite $ac_abs_top_builddir/doc/beginners/build/en-US/testsuite ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 $as_echo "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir" done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test "${prefix}" = "/usr/local"; then { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 $as_echo "$as_me: " >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: For a private or temporary build of systemtap, we recommend" >&5 $as_echo "$as_me: For a private or temporary build of systemtap, we recommend" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: configuring with a prefix. For example, try" >&5 $as_echo "$as_me: configuring with a prefix. For example, try" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&5 $as_echo "$as_me: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Running systemtap uninstalled, entirely out of the build tree," >&5 $as_echo "$as_me: Running systemtap uninstalled, entirely out of the build tree," >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: is not supported." >&5 $as_echo "$as_me: is not supported." >&6;} fi systemtap-2.9/configure.ac000066400000000000000000000653431260561570600157260ustar00rootroot00000000000000dnl configure.ac --- autoconf input file for systemtap dnl Process this file with autoconf to produce a configure script. AC_INIT([systemtap], 2.9, systemtap@sourceware.org, systemtap) dnl ^^^ see also NEWS, systemtap.spec, testsuite/configure.ac dnl doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml dnl Get the target arch for libHelperSDT.so AC_CANONICAL_TARGET AC_PREREQ(2.63) dnl We don't maintain a ChangeLog, which makes us non-GNU -> foreign. AM_INIT_AUTOMAKE([no-dist foreign]) AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_USE_SYSTEM_EXTENSIONS AC_PROG_MKDIR_P AC_SUBST(MKDIR_P) AC_PROG_LN_S AC_PROG_CC AC_PROG_CXX AC_PROG_CPP AM_PROG_CC_STDC AM_PROG_CC_C_O AC_PROG_RANLIB AC_OBJEXT AC_EXEEXT AC_PROG_INSTALL AC_PROG_MAKE_SET AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SYS_LARGEFILE AC_CHECK_FUNCS(ppoll) AC_CHECK_FUNCS(openat) AM_GNU_GETTEXT(external) AM_GNU_GETTEXT_VERSION([0.19.4]) if test "x$GMSGFMT" = "x:"; then AC_MSG_ERROR([missing gnu /usr/bin/msgfmt]) fi dnl Handle the prologues option. dnl dnl If the user didn't specify --enable-prologues/--disable-prologues dnl and the x86 system has a version of gcc less than version 4, dnl automatically enable prologues. if test "${enable_prologues+set}" != set; then AC_MSG_CHECKING([to see if prologue searching should be the default]) if { echo '#if __i386__ == 1 && __GNUC__ < 4' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then enable_prologues=yes AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi AC_ARG_ENABLE([prologues], AS_HELP_STRING([--enable-prologues], [make -P prologue-searching default]), [ if test "$enable_prologues" = yes; then AC_DEFINE([ENABLE_PROLOGUES],[],[make -P prologue-searching default]) fi]) dnl Handle the disable-sdt-probes option. dnl dnl Default to --disable-sdt-probes if --enable-sdt-probes/--disable-prologues dnl was not specified and the gcc version is less than version 4, if test "${enable_sdt_probes+set}" != set; then AC_MSG_CHECKING([to see if sdt probes should be the default]) if { echo '#if __GNUC__ < 4' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then enable_sdt_probes=no AC_MSG_RESULT([no]) else AC_MSG_RESULT([yes]) fi fi AC_ARG_ENABLE([sdt-probes], [AS_HELP_STRING([--disable-sdt-probes], [disable process.mark probes in stap, staprun, stapio])]) AS_IF([test "x$enable_sdt_probes" != xno], [ AC_DEFINE([ENABLE_SDT_PROBES], [1], [Define to 1 to enable process.mark probes in stap, staprun, stapio.]) ]) AC_ARG_ENABLE([ssp], [AS_HELP_STRING([--disable-ssp], [disable gcc stack-protector])]) AS_IF([test "x$enable_ssp" != xno],[ save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" CFLAGS="$CFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" AC_COMPILE_IFELSE([AC_LANG_SOURCE([int something ();])], [ AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.]) CFLAGS="$save_CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" CXXFLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"],[ AC_MSG_NOTICE([Compiler does not support -fstack-protector-all et al.]) CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS"])]) dnl Link with gold if possible dnl but: https://bugzilla.redhat.com/show_bug.cgi?id=636603 dnl dnl AC_PATH_PROG(GOLD, [ld.gold], [no]) dnl if test "x$GOLD" != "xno" dnl then dnl mkdir -p Bdir dnl ln -sf $GOLD Bdir/ld dnl LDFLAGS="$LDFLAGS -B`pwd`/Bdir/" dnl AC_MSG_NOTICE([using ld.gold to link]) dnl fi # Compiling without fPIE by default (see PR 9922) AC_ARG_ENABLE([pie], [AS_HELP_STRING([--enable-pie], [enable position-independent-executable])]) AS_IF([test "x$enable_pie" == xyes],[ PIECFLAGS='-fPIE' PIECXXFLAGS='-fPIE' PIELDFLAGS='-pie -Wl,-z,relro -Wl,-z,now' save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS $PIECFLAGS" CXXFLAGS="$CXXFLAGS $PIECXXFLAGS" LDFLAGS="$LDFLAGS $PIELDFLAGS" AC_LINK_IFELSE([AC_LANG_SOURCE([void main () {}])], [ AC_MSG_NOTICE([Compiling with gcc pie et al.]) ], [ AC_MSG_NOTICE([Compiler does not support -pie et al.]) PIECFLAGS="" PIECXXFLAGS="" PIELDFLAGS="" ]) CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" LDFLAGS="$save_LDFLAGS" ]) AC_SUBST(PIELDFLAGS) AC_SUBST(PIECFLAGS) AC_SUBST(PIECXXFLAGS) dnl Handle optional sqlite support. If enabled/disabled by the user, dnl do the right thing. If not specified by the user, use it if dnl present. AC_ARG_ENABLE([sqlite], AS_HELP_STRING([--enable-sqlite], [build with sqlite support]), [], dnl ACTION-IF-GIVEN [enable_sqlite=check]) dnl ACTION-IF-NOT-GIVEN sqlite3_LIBS= AS_IF([test "x$enable_sqlite" != xno], [AC_CHECK_LIB([sqlite3], [sqlite3_open], [AC_SUBST([sqlite3_LIBS], [-lsqlite3]) AC_DEFINE([HAVE_LIBSQLITE3], [1], [Define to 1 if you have the 'sqlite3' library (-lsqlite3).])], [if test "x$enable_sqlite" != xcheck; then AC_MSG_FAILURE([--enable-sqlite was given, but test for sqlite failed]) fi])]) dnl Handle the option to only build runtime AC_ARG_ENABLE([translator], AS_HELP_STRING([--disable-translator], [build only runtime utilities]), [], [enable_translator="yes"]) AM_CONDITIONAL([BUILD_TRANSLATOR], [test "$enable_translator" == "yes"]) dnl Handle the option to build the crash extension AC_ARG_ENABLE([crash], AS_HELP_STRING([--enable-crash@<:@=DIRECTORY@:>@], [enable crash extension (default is disabled). Optional DIRECTORY is the path to the crash header file (needed if installed in a non-standard location).]), [if test "$enable_crash" != "no"; then dnl Handle custom install dir (if needed) save_CPPFLAGS="$CPPFLAGS" if test "$enable_crash" != "yes"; then staplog_CPPFLAGS=-I$enable_crash CPPFLAGS="${staplog_CPPFLAGS} $CPPFLAGS" AC_SUBST([staplog_CPPFLAGS]) fi AC_CHECK_HEADERS([crash/defs.h], [], [AC_MSG_ERROR([cannot find required crash header (crash-devel may need to be installed)])], [ #define NR_CPUS 256 ]) CPPFLAGS="$save_CPPFLAGS" fi], [enable_crash="no"]) AM_CONDITIONAL([BUILD_CRASHMOD], [test "$enable_crash" != "no"]) dnl Handle the option to build the documentation building_docs="no" AC_ARG_ENABLE([docs], AS_HELP_STRING([--enable-docs], [enable building documentation (default on if latex etc. found).]), [enable_docs=$enableval], [enable_docs="check"]) AC_CHECK_PROG(have_latex, latex, yes, no) AC_CHECK_PROG(have_dvips, dvips, yes, no) AC_CHECK_PROG(have_ps2pdf, ps2pdf, yes, no) AC_CHECK_PROG(have_latex2html, latex2html, yes, no) if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then if test "$enable_docs" == "yes"; then AC_MSG_ERROR([cannot find all tools for building documentation]) fi if test "$enable_docs" == "check"; then AC_MSG_WARN([will not build documentation, cannot find all tools]) fi fi if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"; then building_docs="yes" fi AM_CONDITIONAL([BUILD_DOCS], [test "$building_docs" == "yes"]) dnl Handle the option to build the reference documentation building_refdocs="no" AC_ARG_ENABLE([refdocs], AS_HELP_STRING([--enable-refdocs], [enable building reference documentation (default on if xmlto etc. found and other documentation built).]), [enable_refdocs=$enableval], [enable_refdocs="check"]) if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then AC_MSG_ERROR([must use --enable-docs with --enable-refdocs]) fi AC_CHECK_PROG(have_xmlto, xmlto, yes, no) if test "$enable_refdocs" == "yes"; then if test "x${have_xmlto}" != "xyes"; then AC_MSG_ERROR([cannot find xmlto for building reference documentation]) fi fi if test "x${have_xmlto}" == "xyes" -a "$enable_refdocs" != "no" -a "${building_docs}" == "yes"; then building_refdocs="yes" fi AM_CONDITIONAL([BUILD_REFDOCS], [test "$building_refdocs" == "yes"]) AC_CHECK_PROG(have_fop, fop, yes, no) if test "x${have_fop}" == "xyes"; then # Due to rhbz505364 / 830266, we must actually test-run fop, not just # hope that it works. AC_MSG_CHECKING([to see if xmlto --with-fop actually works]) if xmlto --with-fop pdf ${srcdir}/doc/SystemTap_Tapset_Reference/dummy-tapsets.xml >/dev/null 2>&1; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([it's dead, Jim]) have_fop="broken" fi rm -f dummy-tapsets.pdf fi AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" == "yes"]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" == "yes"]) dnl There is a strange bug in older versions of xmlto when generating pdf. dnl https://bugzilla.redhat.com/show_bug.cgi?id=526273 dnl So make sure to have a chapter title starting with L plus an refentry. dnl This will make sure the xmlto pdf support test fails on buggy versions. cat > conftest.xml << 'EOF' foo Logging Tapset log logging Description baz EOF if test "x${have_xmlto}" == "xyes"; then AC_MSG_CHECKING([for xmlto --stringparam support]) xmlto --stringparam man.authors.section.enabled=0 html-nochunks conftest.xml >/dev/null 2>&1 if test $? == 0; then have_xmlto_stringparam="yes" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi rm -f conftest.html fi AM_CONDITIONAL([XMLTO_STRINGPARAM], [test "$have_xmlto_stringparam" == "yes"]) if test "x${building_refdocs}" == "xyes"; then AC_MSG_CHECKING([for xmlto pdf support]) # xmlto pdf may work *only* with --with-fop # XXX: To an extent this test is redundant in that the --with-fop test # already ran xmlto --with-fop pdf .... if test "x$have_fop" == "xyes"; then XMLTOPDF_FOP=--with-fop else XMLTOPDF_FOP= fi xmlto $XMLTOPDF_FOP pdf conftest.xml >& /dev/null if test $? == 0; then have_xmlto_pdf="yes" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_WARN([Not building reference documentation in PDF format]) fi rm -f conftest.pdf fi AM_CONDITIONAL([BUILD_PDFREFDOCS], [test "$have_xmlto_pdf" == "yes"]) rm -f conftest.xml dnl See if we have the nss/nspr headers and libraries AC_ARG_WITH([nss], AS_HELP_STRING([--without-nss], [Do not use NSS even if present])) AS_IF([test "x$with_nss" != "xno"], [ PKG_CHECK_MODULES([nss], [nss >= 3], [have_nss=yes AC_DEFINE([HAVE_NSS], [1], [Define to 1 if you have the nss libraries.]) ], [have_nss=no]) ], [have_nss=no]) AM_CONDITIONAL([HAVE_NSS], [test "${have_nss}" = "yes"]) dnl Handle dracut directory configuration. Note we hard-code /usr by default, dnl instead of $prefix, because dracut is a system service that doesn't listen dnl at relocatable directories. AC_ARG_WITH([dracutstap], AS_HELP_STRING([--with-dracutstap=DIR], [Install dracut module files in DIR])) AS_IF([test "x$with_dracutstap" != "x"],[dracutstap="$with_dracutstap"], [dracutstap=/usr/lib/dracut/modules.d/99stap]) AC_MSG_NOTICE([using dracut module directory $dracutstap]) AC_SUBST(dracutstap) dnl Handle the option to build the compile server. AC_ARG_ENABLE([server], AS_HELP_STRING([--enable-server], [enable building of stap-server (default on if nss etc. found).]), [enable_server=$enableval], [enable_server="check"]) if test "$enable_server" != "no"; then dnl See if we have enough libraries and tools to build the compile server if test "x${have_nss}" != "xyes"; then AC_MSG_WARN([will not build systemtap compile server, cannot find nss headers]) fi fi AM_CONDITIONAL([BUILD_SERVER], [test "${have_nss}" == "yes" -a "$enable_server" != "no"]) if test "${have_nss}" != "yes"; then AC_MSG_WARN([compile-server client functionality will be disabled, cannot find nss development files]) fi dnl See if we have the avahi libraries and headers AC_ARG_WITH([avahi], AS_HELP_STRING([--without-avahi], [Do not use Avahi even if present])) AS_IF([test "x$with_avahi" != "xno"], [ PKG_CHECK_MODULES([avahi], [avahi-client], [have_avahi=yes AC_DEFINE([HAVE_AVAHI], [1], [Define to 1 if you have the avahi libraries.]) ], [have_avahi=no]) ], [have_avahi=no]) AM_CONDITIONAL([HAVE_AVAHI], [test "${have_avahi}" = "yes"]) if test "${have_avahi}" != "yes"; then AC_MSG_WARN([some compile-server functionality will be restricted, cannot find avahi development files]) fi dnl Look for librpm. AC_ARG_WITH([rpm], [AS_HELP_STRING([--with-rpm], [query rpm database for missing debuginfos])], [], [with_rpm="auto"]) if test "$with_rpm" != "no"; then AC_CHECK_LIB(rpm, rpmtsInitIterator, [ AC_DEFINE([HAVE_LIBRPM],[1],[have librpm]) stap_LIBS="$stap_LIBS -lc -lrpm" have_librpm="yes"], [have_librpm="no"]) AC_CHECK_LIB(rpmio, rpmFreeCrypto, [ AC_DEFINE([HAVE_LIBRPMIO],[1],[have librpmio]) stap_LIBS="$stap_LIBS -lc -lrpmio" have_librpmio="yes"], [have_librpmio="no"]) if test "x$have_librpm" != "xyes" -a "$with_rpm" == "yes"; then AC_MSG_ERROR([cannot find librpm]) fi if test "x$have_librpmio" != "xyes" -a "$with_rpm" == "yes"; then AC_MSG_WARN([cannot find librpmio]) fi fi dnl Allow user to choose python3 for /usr/bin/dtrace AC_ARG_WITH([python3], AS_HELP_STRING([--with-python3],[prefer /usr/bin/python3])) AS_IF([test "x$with_python3" = "xyes"], [AC_SUBST(python,[python3])], [AC_SUBST(python,[python])]) dnl Handle elfutils. If '--with-elfutils=DIR' wasn't specified, used dnl the system's elfutils. build_elfutils=no AC_ARG_WITH([elfutils], AS_HELP_STRING([--with-elfutils=DIRECTORY], [find elfutils source code in DIRECTORY]), [ case "$with_elfutils" in yes) AC_MSG_ERROR([--with-elfutils requires an argument]) ;; ''|no) ;; *) build_elfutils=yes ;; esac]) AM_CONDITIONAL(BUILD_ELFUTILS, test $build_elfutils = yes) AC_SUBST(elfutils_abs_srcdir, `AS_IF([test $build_elfutils = yes], [cd $with_elfutils && pwd])`) if test $enable_translator = yes; then if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils http://elfutils.fedorahosted.org/ # On modern debian/ubuntu, libebl has been merged into libdw # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=457543 save_LIBS="$LIBS" AC_CHECK_LIB(ebl, ebl_get_elfmachine,[ebl_LIBS=-lebl],[ebl_LIBS=]) LIBS="$save_LIBS" save_LIBS="$LIBS" AC_CHECK_LIB(dw, dwfl_module_getsym,[],[ AC_MSG_ERROR([missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)])], [-Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf]) AC_CHECK_LIB(dw, dwarf_next_unit,[],[ AC_MSG_ERROR([elfutils, libdw too old, need 0.148+])], [-Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf]) stap_LIBS="$stap_LIBS -Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf" LIBS="$save_LIBS" else # We built our own and stap_LDFLAGS points at the install. stap_LIBS="$stap_LIBS -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf" fi fi AC_SUBST(stap_LIBS) AC_MSG_NOTICE([stap will link $stap_LIBS]) # staprun has more modest libelf needs if test $build_elfutils = no; then save_LIBS="$LIBS" dnl this will only succeed with elfutils 0.142+ AC_CHECK_LIB(elf,elf_getshdrstrndx,[],[ AC_MSG_FAILURE([libelf too old, need 0.142+])]) staprun_LIBS="$staprun_LIBS -lelf" LIBS="$save_LIBS" else # We built our own and staprun_LDFLAGS points at the install. staprun_LIBS="$staprun_LIBS -lelf" fi AC_SUBST(staprun_LIBS) AC_MSG_NOTICE([staprun will link $staprun_LIBS]) dnl Plop in the build (configure) date date=`date +%Y-%m-%d` AC_DEFINE_UNQUOTED(DATE, "$date", [Configuration/build date]) AC_SUBST(DATE, "$date") # Before PR4037, we used to arrange to pass CFLAGS+=-m64 for a staprun # being compiled on 32-bit userspace but running against 64-bit kernels. # This is no longer necessary. # Use tr1/unordered_map if available AC_LANG_PUSH(C++) AC_CHECK_HEADERS([tr1/unordered_map]) AC_CHECK_HEADERS([tr1/memory]) AC_CHECK_HEADERS([boost/shared_ptr.hpp]) AC_CHECK_HEADERS([boost/utility/string_ref.hpp]) AC_LANG_POP(C++) # Check for Dyninst headers and libraries AC_ARG_WITH([dyninst], AS_HELP_STRING([--with-dyninst=DIRECTORY], [find dyninst headers/libraries in DIRECTORY])) case "$with_dyninst" in no) ;; ''|yes) # Try a simple-minded distro search DYNINST_CXXFLAGS="-I/usr/include/dyninst" DYNINST_LDFLAGS="-L/usr/lib64/dyninst -L/usr/lib/dyninst" # XXX both lib paths!?! ;; *) # Use paths in the user-specified prefix DYNINST_CXXFLAGS="-I$with_dyninst/include" DYNINST_LDFLAGS="-L$with_dyninst/lib/" # XXX need lib64 too? ;; esac if test "$with_dyninst" != "no"; then AC_LANG_PUSH(C++) old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $DYNINST_CXXFLAGS" AC_MSG_NOTICE([checking dyninst support]) AC_CHECK_HEADERS([BPatch_object.h], [ AC_SUBST(DYNINST_CXXFLAGS) AC_SUBST(DYNINST_LDFLAGS) AC_DEFINE([HAVE_DYNINST],[1],[Define to 1 if Dyninst is enabled]) have_dyninst=yes AC_MSG_NOTICE([dyninst support available])]) if test -n "$with_dyninst" -a "$have_dyninst" != "yes"; then AC_MSG_ERROR([Dyninst does not appear to be usable]) fi CPPFLAGS="$old_CPPFLAGS" AC_LANG_POP(C++) fi AM_CONDITIONAL([HAVE_DYNINST], [test "${have_dyninst}" = "yes"]) dnl Check for the libvirt and libxml2 devel packages AC_ARG_ENABLE([virt], AS_HELP_STRING([--enable-virt], [enable building of stapvirt support (default on if libvirt etc. found).]), [enable_virt=$enableval], [enable_virt="check"]) dnl We require libvirt >= 1.0.2 because stapvirt relies on the dnl virDomainOpenChannel function, which was implemented in 1.0.2. PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ have_libvirt=yes AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) ], [have_libvirt=no]) AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"]) PKG_CHECK_MODULES([libxml2], [libxml-2.0], [ have_libxml2=yes AC_DEFINE([HAVE_LIBXML2],[1],[Define to 1 if libxml2 development libraries are installed]) ], [have_libxml2=no]) AM_CONDITIONAL([HAVE_LIBXML2], [test "${have_libxml2}" = "yes"]) if test "$enable_virt" != "no"; then dnl See if we have enough libraries and tools to build the virt server if test "x${have_libvirt}" != "xyes"; then AC_MSG_WARN([will not build systemtap virt support, cannot find libvirt headers]) fi if test "x${have_libxml2}" != "xyes"; then AC_MSG_WARN([will not build systemtap virt support, cannot find xml2 headers]) fi fi AM_CONDITIONAL([BUILD_VIRT], [test "${have_libvirt}" == "yes" -a "${have_libxml2}" == "yes" -a "$enable_virt" != "no"]) AC_CACHE_CHECK([for assembler .section "?" flags support], stap_cv_sectionq, [ old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wa,--fatal-warnings" AC_COMPILE_IFELSE([AC_LANG_SOURCE([asm(".section .note.foo,\"?\",\"note\"\n" ".byte 1, 2, 3\n" ".previous\n" ".section .text,\"axG\",\"progbits\",foogroup,comdat\n" ".byte 1\n" ".pushsection .note.foo,\"?\",\"note\"\n" ".byte 4, 5, 6\n" ".popsection\n" ".byte 2\n");])], stap_cv_sectionq=yes, stap_cv_sectionq=no) CFLAGS="$old_CFLAGS"]) AC_SUBST(support_section_question) support_section_question=0 if test $stap_cv_sectionq = yes; then support_section_question=1 fi AC_CONFIG_FILES([includes/sys/sdt-config.h po/Makefile.in]) if test $build_elfutils = yes -a $enable_translator = yes; then here=`pwd` case "$with_elfutils" in /*) elfutils_srcdir="$with_elfutils" ;; *) elfutils_srcdir="${here}/$with_elfutils" ;; esac if ! test -f ${elfutils_srcdir}/configure; then AC_MSG_ERROR([No ${elfutils_srcdir}/configure, forgot to run autoreconf -i?]) fi AC_MSG_NOTICE([running ${elfutils_srcdir}/configure]) save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fgnu89-inline" CFLAGS="$CFLAGS -fgnu89-inline" gnu89_inline_flag="" AC_COMPILE_IFELSE([AC_LANG_SOURCE([int something ();])], [ AC_MSG_NOTICE([Compiling elfutils with gcc -fgnu89-inline]) gnu89_inline_flag="-fgnu89-inline"],[ AC_MSG_NOTICE([Compiler does not support -fgnu89-inline])]) CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" # Our libdw.so's libebl will look in $ORIGIN/../lib/... but that # $ORIGIN is where libdw.so resides, which is not where there is a ../lib. # Note that $libdir might be using a quoted use of $exec_prefix or $prefix. # So we must make sure to pass those settings to elfutils configure. elfutils_rpath="-Wl,--enable-new-dtags,-rpath,${libdir}/${PACKAGE_NAME}" # Check whether this is a source release, or a source checkout. # We need --enable-maintainer-mode if it isn't a source release. # elfutils.spec is only distributed in source releases. if test -f ${elfutils_srcdir}/elfutils.spec; then need_maintainer_option="" else need_maintainer_option="--enable-maintainer-mode" fi (mkdir -p build-elfutils && cd build-elfutils && bash ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \ --includedir="${here}/include-elfutils" \ --libdir="${here}/lib-elfutils" \ --exec-prefix="$exec_prefix" \ --prefix="$prefix" \ --enable-dwz \ ${need_maintainer_option} \ CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag -fexceptions" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && if test -f ${elfutils_srcdir}/config/version.h.in; then echo Found elfutils/version.h header... else echo elfutils/version.h header not found, need elfutils 0.142+... exit -1 fi ) if test $? != 0; then exit -1; fi fi dnl Optional libselinux support allows stapdyn to check dnl for booleans that would prevent Dyninst from working. AC_ARG_WITH([selinux], AS_HELP_STRING([--without-selinux], [Do not use libselinux even if present])) AS_IF([test "x$with_selinux" != "xno"], [ PKG_CHECK_MODULES([selinux], [libselinux], [have_selinux=yes AC_DEFINE([HAVE_SELINUX], [1], [Define to 1 if you have the SELinux libraries.]) ], [have_selinux=no]) ], [have_selinux=no]) AM_CONDITIONAL([HAVE_SELINUX], [test "${have_selinux}" = "yes"]) dnl Handle java+byteman support AC_CHECK_PROG(have_javac, javac, yes, no) AC_CHECK_PROG(have_jar, jar, yes, no) if test "$have_javac" != no -a "$have_jar" != no; then echo java found, will try to configure Byteman support AC_ARG_WITH([java], [AS_HELP_STRING([--with-java=DIRECTORY], [Specify JDK directory to compile libHelperSDT.so against (default is /usr/lib/jvm/java)])], [], [with_java=/usr/lib/jvm/java]) dnl don't use AC_CHECK_FILE here, as that blocks cross-compiling if test ! -d "$with_java"; then with_java=no fi AC_SUBST(JAVADIR, "${with_java}") # always needed to compile if test "$with_java" != "no"; then AC_DEFINE_UNQUOTED(HAVE_JAVA, "1", [Flag indicating that libHelperSDT.so is available (can be found in PKGLIBDIR)]) fi AM_CONDITIONAL([HAVE_JAVA], [test "$with_java" != "no"]) else AC_MSG_WARN([will not run per-method java probing, missing byteman or java requirements]) AM_CONDITIONAL([HAVE_JAVA],false) fi # java+byteman support AC_SUBST(ENABLE_NLS, "$USE_NLS") AC_SUBST(localedir, "$localedir") AC_SUBST(LOCALEDIR, "$localedir") AC_ARG_WITH([extra-version], AS_HELP_STRING([--with-extra-version=STRING], [Add STRING to stap -V version])) AS_IF([test "x$with_extra_version" != "xno"], [ stap_extra_version="$with_extra_version" AC_MSG_NOTICE([Adding extra version $stap_extra_version])], [ stap_extra_version=""]) AC_DEFINE_UNQUOTED(STAP_EXTRA_VERSION, "$stap_extra_version", [extra stap version code]) AC_SUBST(STAP_EXTRA_VERSION, "$stap_extra_version") dnl The stap translator stringtable benefits performance-wise from c++11 constructs. AX_CHECK_COMPILE_FLAG([-std=c++11],[cxx11="-std=c++11"],[cxx11=""]) AS_IF([test "x$cxx11" != "x"],[ AC_MSG_NOTICE([Compiling parts of systemtap with -std=c++11])]) AC_SUBST(cxx11) dnl This is here mainly to make sure that configure --prefix=... changes dnl the config.h files so files depending on it are recompiled dnl prefix is passed through indirectly in the Makefile.am AM_CPPFLAGS. dnl Formerly: Don't use this directly (when not given it is set to NONE). dnl Currently: inline autoconf's later defaulting stap_prefix=$prefix test "$stap_prefix" = NONE && stap_prefix=$ac_default_prefix AC_DEFINE_UNQUOTED(STAP_PREFIX, "$stap_prefix", [configure prefix location]) AC_SUBST(STAP_PREFIX, "$stap_prefix") AC_CONFIG_HEADERS([config.h:config.in]) AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile \ doc/beginners/Makefile doc/SystemTap_Tapset_Reference/Makefile \ man/stappaths.7 man/systemtap.8 \ initscript/config.systemtap initscript/config.stap-server \ initscript/systemtap initscript/stap-server \ initscript/99stap/module-setup.sh ]) AC_CONFIG_SUBDIRS(testsuite) if test $enable_translator == "yes"; then AC_CONFIG_FILES([run-stap], [chmod +x run-stap]) fi AC_CONFIG_FILES([dtrace], [chmod +x dtrace]) AC_CONFIG_FILES(stapdyn/Makefile) AC_CONFIG_FILES(java/Makefile) AC_CONFIG_FILES([java/stapbm], [chmod +x java/stapbm]) AC_CONFIG_FILES(staprun/Makefile) AC_CONFIG_FILES([staprun/run-staprun], [chmod +x staprun/run-staprun]) AC_CONFIG_FILES([staprun/guest/stapshd], [chmod +x staprun/guest/stapshd]) AC_CONFIG_FILES([staprun/guest/stapsh-daemon], [chmod +x staprun/guest/stapsh-daemon]) AC_CONFIG_FILES([staprun/guest/stapsh@.service]) # Setup "shadow" directory doc/beginners that has the basic directories setup for # xmlto in one directory (through directory links if necessary). # It would be nice to use AC_CONFIG_LINKS, but automake complains when # the src is a directory and not a file. AC_CONFIG_COMMANDS([doc/beginners], [rm -f $ac_abs_top_builddir/doc/beginners/en-US $ac_abs_top_builddir/doc/beginners/build/en-US/testsuite && mkdir -p $ac_abs_top_builddir/doc/beginners/build/en-US && ln -s $ac_abs_top_srcdir/doc/SystemTap_Beginners_Guide/en-US $ac_abs_top_builddir/doc/beginners/en-US && ln -s $ac_abs_top_srcdir/testsuite $ac_abs_top_builddir/doc/beginners/build/en-US/testsuite]) AC_OUTPUT if test "${prefix}" = "/usr/local"; then AC_MSG_NOTICE([]) AC_MSG_NOTICE([For a private or temporary build of systemtap, we recommend]) AC_MSG_NOTICE([configuring with a prefix. For example, try]) AC_MSG_NOTICE([$0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$]) AC_MSG_NOTICE([Running systemtap uninstalled, entirely out of the build tree,]) AC_MSG_NOTICE([is not supported.]) fi systemtap-2.9/coveragedb.cxx000066400000000000000000000243631260561570600162620ustar00rootroot00000000000000// coveragedb.cxx // Copyright (C) 2007 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #include "parse.h" #include "coveragedb.h" #include "config.h" #include "elaborate.h" #include "tapsets.h" #include "session.h" #include "util.h" #ifdef HAVE_LIBSQLITE3 #include #include #include using namespace std; void print_coverage_info(systemtap_session &s) { // print out used probes clog << _("---- used probes-----") << endl; for (unsigned i=0; i used_probe_list; s.probes[i]->collect_derivation_chain(used_probe_list); for (unsigned j=0; jlocations.size(); ++k) clog << _("probe: ") << used_probe_list[j]->locations[k]->components.front()->tok->location << endl; } clog << "----" << endl; // for each probe print used and unused variables for (unsigned j=0; jlocals.size(); ++j) { clog << _("local: ") << s.probes[i]->locals[j]->tok->location << endl; } for (unsigned j=0; junused_locals.size(); ++j) { clog << _("unused_local: ") << s.probes[i]->unused_locals[j]->tok->location << endl; } } // print out unused probes clog << _("---- unused probes----- ") << endl; for (unsigned i=0; i unused_probe_list; s.unused_probes[i]->collect_derivation_chain(unused_probe_list); for (unsigned j=0; jlocations.size(); ++k) clog << _("probe: ") << unused_probe_list[j]->locations[k]->components.front()->tok->location << endl; } } // print out used functions clog << _("---- used functions----- ") << endl; for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { clog << "function: " << it->second->tok->location << " " << it->second->name << endl; } // print out unused functions clog << _("---- unused functions----- ") << endl; for (unsigned i=0; itok->location << " " << s.unused_functions[i]->name << endl; } // print out used globals clog << _("---- used globals----- ") << endl; for (unsigned i=0; itok->location << " " << s.globals[i]->name << endl; } // print out unused globals clog << _("---- unused globals----- ") << endl; for (unsigned i=0; itok->location << " " << s.unused_globals[i]->name << endl; } } bool has_table(sqlite3 *db, const char * table) { int rc, rows, columns; char *errmsg; char **results = NULL; ostringstream command; command << "SELECT name FROM sqlite_master " << "WHERE type='table' AND name='" << table << "'"; rc = sqlite3_get_table(db, command.str().c_str(), &results, &rows, &columns, &errmsg); if(rc != SQLITE_OK) { cerr << _("Error in statement: ") << command.str() << " [" << errmsg << "]." << endl; } sqlite3_free_table(results); return (rows !=0); } bool has_index(sqlite3 *db, const char * index) { int rc, rows, columns; char *errmsg; char **results = NULL; ostringstream command; command << "SELECT name FROM sqlite_master " << "WHERE type='index' AND name='" << index << "'"; rc = sqlite3_get_table(db, command.str().c_str(), &results, &rows, &columns, &errmsg); if(rc != SQLITE_OK) { cerr << _("Error in statement: ") << command.str() << " [" << errmsg << "]." << endl; } sqlite3_free_table(results); return (rows !=0); } void sql_stmt(sqlite3 *db, const char* stmt) { char *errmsg; int ret; // cerr << "sqlite: " << stmt << endl; ret = sqlite3_exec(db, stmt, 0, 0, &errmsg); if(ret != SQLITE_OK) { cerr << _("Error in statement: ") << stmt << " [" << errmsg << "]." << endl; } } void enter_element(sqlite3 *db, coverage_element &x) { ostringstream command; command << "insert or ignore into counts values ('" << x.file << "', '" << x.line << "', '" << x.col << "', '" << x.type << "','" << x.name << "', '" << x.parent <<"'," << "'0', '0')"; sql_stmt(db, command.str().c_str()); } void increment_element(sqlite3 *db, coverage_element &x) { ostringstream command; // make sure value in table command << "insert or ignore into counts values ('" << x.file << "', '" << x.line << "', '" << x.col << "', '" << x.type << "','" << x.name << "', '" << x.parent <<"'," << "'0', '0'); " // increment appropriate value << "update counts set compiled=compiled+" << x.compiled << " where (" << "file=='" << x.file << "' and " << "line=='" << x.line << "' and " << "col=='" << x.col << "' and " << "type=='" << x.type << "' and " << "name=='" << x.name << "')"; sql_stmt(db, command.str().c_str()); } void sql_update_used_probes(sqlite3 *db, systemtap_session &s) { // update database used probes for (unsigned i=0; i used_probe_list; s.probes[i]->collect_derivation_chain(used_probe_list); for (unsigned j=0; jlocations.size(); ++k){ struct source_loc place = used_probe_list[j]->locations[k]->components.front()->tok->location; coverage_element x(place); x.type = db_type_probe; x.name = used_probe_list[j]->locations[k]->str(); x.compiled = 1; increment_element(db, x); } } // for each probe update used and unused variables for (unsigned j=0; jlocals.size(); ++j) { struct source_loc place = s.probes[i]->locals[j]->tok->location; coverage_element x(place); x.type = db_type_local; x.name = s.probes[i]->locals[j]->tok->content; x.compiled = 1; increment_element(db, x); } for (unsigned j=0; junused_locals.size(); ++j) { struct source_loc place = s.probes[i]->unused_locals[j]->tok->location; coverage_element x(place); x.type = db_type_local; x.name = s.probes[i]->unused_locals[j]->tok->content; x.compiled = 0; increment_element(db, x); } } } void sql_update_unused_probes(sqlite3 *db, systemtap_session &s) { // update database unused probes for (unsigned i=0; i unused_probe_list; s.unused_probes[i]->collect_derivation_chain(unused_probe_list); for (unsigned j=0; jlocations.size(); ++k) { struct source_loc place = unused_probe_list[j]->locations[k]->components.front()->tok->location; coverage_element x(place); x.type = db_type_probe; x.name = unused_probe_list[j]->locations[k]->str(); x.compiled = 0; increment_element(db, x); } } } } void sql_update_used_functions(sqlite3 *db, systemtap_session &s) { // update db used functions for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { struct source_loc place = it->second->tok->location; coverage_element x(place); x.type = db_type_function; x.name = it->second->name; x.compiled = 1; increment_element(db, x); } } void sql_update_unused_functions(sqlite3 *db, systemtap_session &s) { // update db unused functions for (unsigned i=0; itok->location; coverage_element x(place); x.type = db_type_function; x.name = s.unused_functions[i]->name; x.compiled = 0; increment_element(db, x); } } void sql_update_used_globals(sqlite3 *db, systemtap_session &s) { // update db used globals for (unsigned i=0; itok->location; coverage_element x(place); x.type = db_type_global; x.name = s.globals[i]->name; x.compiled = 1; increment_element(db, x); } } void sql_update_unused_globals(sqlite3 *db, systemtap_session &s) { // update db unused globals for (unsigned i=0; itok->location; coverage_element x(place); x.type = db_type_global; x.name = s.unused_globals[i]->name; x.compiled = 0; increment_element(db, x); } } void update_coverage_db(systemtap_session &s) { sqlite3 *db; int rc; string filename(s.data_path + "/" + s.kernel_release + ".db"); rc = sqlite3_open(filename.c_str(), &db); if( rc ){ cerr << "Can't open database: " << sqlite3_errmsg(db) << endl; sqlite3_close(db); return; } // lock the database sql_stmt(db, "begin"); string create_table("create table counts (" "file text, line integer, col integer, " "type text, name text, parent text, " "compiled integer, executed integer)"); string create_index("create unique index tokens on counts (file, line, col, " "type, name)"); // make sure the table is there if (!has_table(db, "counts")) sql_stmt(db, create_table.c_str()); // make sure the index is there if (!has_index(db, "tokens")) sql_stmt(db, create_index.c_str()); sql_update_used_probes(db, s); sql_update_unused_probes(db, s); sql_update_used_functions(db, s); sql_update_unused_functions(db, s); sql_update_used_globals(db, s); sql_update_unused_globals(db, s); // unlock the database and close database sql_stmt(db, "commit"); sqlite3_close(db); } #endif /* HAVE_LIBSQLITE3 */ /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/coveragedb.h000066400000000000000000000035501260561570600157020ustar00rootroot00000000000000// coveragedb.cxx // Copyright (C) 2007 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #ifndef COVERAGEDB_H #define COVERAGEDB_H #include "session.h" #include "staptree.h" #include /* tuples: file, line number, column, type of object, name values: number of times object "pulled_in", number of times "removed", times executed if (compiled == 0) object never compiled if (compiled > 0) object compiled The following are not currently implemented. if (executed == 0) never executed if (executed > 0) executed Want to make sure that the data base accurately reflects testing. 1) atomic updates, either commit all or none of information 2) only update coverage db compile info, if compile successful 3) only update coverage db execute info, if instrumentation run suscessfully Would like to have something that looks for interesting features in db: list which things are not compile list which things are not exectuted ratio of compiled/total (overall, by file, by line) ratio of executed/total (overall, by file, by line) */ enum db_type { db_type_probe = 1, db_type_function = 2, db_type_local = 3, db_type_global = 4, }; class coverage_element { public: std::string file; int line; int col; int type; std::string name; std::string parent; int compiled; int executed; coverage_element(): line(0), col(0), compiled(0), executed(0) {} coverage_element(source_loc &place): file(place.file->name), line(place.line), col(place.column), type(0), compiled(0), executed(0) {} }; void print_coverage_info(systemtap_session &s); void update_coverage_db(systemtap_session &s); #endif /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/csclient.cxx000066400000000000000000003320241260561570600157610ustar00rootroot00000000000000/* Compile server client functions Copyright (C) 2010-2014 Red Hat Inc. This file is part of systemtap, and is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License (GPL); either version 2, or (at your option) any later version. */ // Completely disable the client if NSS is not available. #include "config.h" #if HAVE_NSS #include "session.h" #include "cscommon.h" #include "csclient.h" #include "util.h" #include "stap-probe.h" #include #include #include #include #include #include #include #include extern "C" { #include #include #include #include #include #include #include #include #include #include #include } #if HAVE_AVAHI extern "C" { #include #include #include #include #include #include } #endif // HAVE_AVAHI extern "C" { #include #include #include #include #include #include #include #include } #include "nsscommon.h" using namespace std; #define STAP_CSC_01 _("WARNING: The domain name, %s, does not match the DNS name(s) on the server certificate:\n") #define STAP_CSC_02 _("could not find input file %s\n") #define STAP_CSC_03 _("could not open input file %s\n") #define STAP_CSC_04 _("Unable to open output file %s\n") #define STAP_CSC_05 _("could not write to %s\n") #define MOK_PUBLIC_CERT_NAME "signing_key.x509" static PRIPv6Addr ©Address (PRIPv6Addr &PRin6, const in6_addr &in6); static PRNetAddr ©NetAddr (PRNetAddr &x, const PRNetAddr &y); bool operator!= (const PRNetAddr &x, const PRNetAddr &y); bool operator== (const PRNetAddr &x, const PRNetAddr &y); extern "C" void nsscommon_error (const char *msg, int logit __attribute ((unused))) { clog << msg << endl << flush; } // Information about compile servers. struct compile_server_info { compile_server_info () : port(0), fully_specified(false) { memset (& address, 0, sizeof (address)); } string host_name; PRNetAddr address; unsigned short port; bool fully_specified; string version; string sysinfo; string certinfo; vector mok_fingerprints; bool empty () const { return this->host_name.empty () && ! this->hasAddress () && certinfo.empty (); } bool hasAddress () const { return this->address.raw.family != 0; } unsigned short setAddressPort (unsigned short port) { if (this->address.raw.family == PR_AF_INET) return this->address.inet.port = htons (port); if (this->address.raw.family == PR_AF_INET6) return this->address.ipv6.port = htons (port); assert (0); return 0; } bool isComplete () const { return this->hasAddress () && port != 0; } bool operator== (const compile_server_info &that) const { // If one item or the other has only a name, and possibly a port specified, // then allow a match by name and port only. This is so that the user can specify // names which are returned by avahi, but are not dns resolvable. // Otherwise, we will ignore the host_name. if ((! this->hasAddress() && this->version.empty () && this->sysinfo.empty () && this->certinfo.empty ()) || (! that.hasAddress() && that.version.empty () && that.sysinfo.empty () && that.certinfo.empty ())) { if (this->host_name != that.host_name) return false; } // Compare the other fields only if they have both been set. if (this->hasAddress() && that.hasAddress() && this->address != that.address) return false; if (this->port != 0 && that.port != 0 && this->port != that.port) return false; if (! this->version.empty () && ! that.version.empty () && this->version != that.version) return false; if (! this->sysinfo.empty () && ! that.sysinfo.empty () && this->sysinfo != that.sysinfo) return false; if (! this->certinfo.empty () && ! that.certinfo.empty () && this->certinfo != that.certinfo) return false; if (! this->mok_fingerprints.empty () && ! that.mok_fingerprints.empty () && this->mok_fingerprints != that.mok_fingerprints) return false; return true; // They are equal } // Used to sort servers by preference for order of contact. The preferred server is // "less" than the other one. bool operator< (const compile_server_info &that) const { // Prefer servers with a later (higher) version number. cs_protocol_version this_version (this->version.c_str ()); cs_protocol_version that_version (that.version.c_str ()); return that_version < this_version; } }; ostream &operator<< (ostream &s, const compile_server_info &i); ostream &operator<< (ostream &s, const vector &v); static void preferred_order (vector &servers) { // Sort the given list of servers into the preferred order for contacting. // Don't bother if there are less than 2 servers in the list. if (servers.size () < 2) return; // Sort the list using compile_server_info::operator< sort (servers.begin (), servers.end ()); } struct resolved_host // see also PR16326, PR16342 { string host_name; PRNetAddr address; resolved_host(string chost_name, PRNetAddr caddress): host_name(chost_name), address(caddress) {} }; struct compile_server_cache { vector default_servers; vector specified_servers; vector trusted_servers; vector signing_servers; vector online_servers; vector all_servers; map > resolved_hosts; }; // For filtering queries. enum compile_server_properties { compile_server_all = 0x1, compile_server_trusted = 0x2, compile_server_online = 0x4, compile_server_compatible = 0x8, compile_server_signer = 0x10, compile_server_specified = 0x20 }; // Static functions. static compile_server_cache* cscache(systemtap_session& s); static void query_server_status (systemtap_session &s, const string &status_string); static void get_server_info (systemtap_session &s, int pmask, vector &servers); static void get_all_server_info (systemtap_session &s, vector &servers); static void get_default_server_info (systemtap_session &s, vector &servers); static void get_specified_server_info (systemtap_session &s, vector &servers, bool no_default = false); static void get_or_keep_online_server_info (systemtap_session &s, vector &servers, bool keep); static void get_or_keep_trusted_server_info (systemtap_session &s, vector &servers, bool keep); static void get_or_keep_signing_server_info (systemtap_session &s, vector &servers, bool keep); static void get_or_keep_compatible_server_info (systemtap_session &s, vector &servers, bool keep); static void keep_common_server_info (const compile_server_info &info_to_keep, vector &filtered_info); static void keep_common_server_info (const vector &info_to_keep, vector &filtered_info); static void keep_server_info_with_cert_and_port (systemtap_session &s, const compile_server_info &server, vector &servers); static void add_server_info (const compile_server_info &info, vector& list); static void add_server_info (const vector &source, vector &target); static void merge_server_info (const compile_server_info &source, compile_server_info &target); #if 0 // not used right now static void merge_server_info (const compile_server_info &source, vector &target); static void merge_server_info (const vector &source, vector &target); #endif static void resolve_host (systemtap_session& s, compile_server_info &server, vector &servers); /* Exit error codes */ #define SUCCESS 0 #define GENERAL_ERROR 1 #define CA_CERT_INVALID_ERROR 2 #define SERVER_CERT_EXPIRED_ERROR 3 // ----------------------------------------------------- // NSS related code used by the compile server client // ----------------------------------------------------- static void add_server_trust (systemtap_session &s, const string &cert_db_path, vector &server_list); static void revoke_server_trust (systemtap_session &s, const string &cert_db_path, const vector &server_list); static void get_server_info_from_db (systemtap_session &s, vector &servers, const string &cert_db_path); static string global_client_cert_db_path () { return SYSCONFDIR "/systemtap/ssl/client"; } static string private_ssl_cert_db_path () { return local_client_cert_db_path (); } static string global_ssl_cert_db_path () { return global_client_cert_db_path (); } static string signing_cert_db_path () { return SYSCONFDIR "/systemtap/staprun"; } /* Connection state. */ typedef struct connectionState_t { const char *hostName; PRNetAddr addr; const char *infileName; const char *outfileName; const char *trustNewServerMode; } connectionState_t; #if 0 /* No client authorization */ static char * myPasswd(PK11SlotInfo *info, PRBool retry, void *arg) { char * passwd = NULL; if ( (!retry) && arg ) passwd = PORT_Strdup((char *)arg); return passwd; } #endif /* Add the server's certificate to our database of trusted servers. */ static SECStatus trustNewServer (CERTCertificate *serverCert) { SECStatus secStatus; CERTCertTrust *trust = NULL; PK11SlotInfo *slot = NULL; /* Import the certificate. */ slot = PK11_GetInternalKeySlot(); const char *nickname = server_cert_nickname (); secStatus = PK11_ImportCert(slot, serverCert, CK_INVALID_HANDLE, nickname, PR_FALSE); if (secStatus != SECSuccess) goto done; /* Make it a trusted peer. */ trust = (CERTCertTrust *)PORT_ZAlloc(sizeof(CERTCertTrust)); if (! trust) { secStatus = SECFailure; goto done; } secStatus = CERT_DecodeTrustString(trust, "P,P,P"); if (secStatus != SECSuccess) goto done; secStatus = CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), serverCert, trust); done: if (slot) PK11_FreeSlot (slot); if (trust) PORT_Free(trust); return secStatus; } /* Called when the server certificate verification fails. This gives us the chance to trust the server anyway and add the certificate to the local database. */ static SECStatus badCertHandler(void *arg, PRFileDesc *sslSocket) { SECStatus secStatus; PRErrorCode errorNumber; CERTCertificate *serverCert = NULL; SECItem subAltName; PRArenaPool *tmpArena = NULL; CERTGeneralName *nameList, *current; char *expected = NULL; const connectionState_t *connectionState = (connectionState_t *)arg; errorNumber = PR_GetError (); switch (errorNumber) { case SSL_ERROR_BAD_CERT_DOMAIN: /* Since we administer our own client-side databases of trustworthy certificates, we don't need the domain name(s) on the certificate to match. If the cert is in our database, then we can trust it. If we know the expected domain name, then issue a warning but, in any case, accept the certificate. */ secStatus = SECSuccess; expected = SSL_RevealURL (sslSocket); if (expected == NULL || *expected == '\0') break; fprintf (stderr, STAP_CSC_01, expected); /* List the DNS names from the server cert as part of the warning. First, find the alt-name extension on the certificate. */ subAltName.data = NULL; serverCert = SSL_PeerCertificate (sslSocket); secStatus = CERT_FindCertExtension (serverCert, SEC_OID_X509_SUBJECT_ALT_NAME, & subAltName); if (secStatus != SECSuccess || ! subAltName.data) { fprintf (stderr, _("Unable to find alt name extension on the server certificate\n")); secStatus = SECSuccess; /* Not a fatal error */ break; } // Now, decode the extension. tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (! tmpArena) { fprintf (stderr, _("Out of memory\n")); SECITEM_FreeItem(& subAltName, PR_FALSE); secStatus = SECSuccess; /* Not a fatal error here */ break; } nameList = CERT_DecodeAltNameExtension (tmpArena, & subAltName); SECITEM_FreeItem(& subAltName, PR_FALSE); if (! nameList) { fprintf (stderr, _("Unable to decode alt name extension on server certificate\n")); secStatus = SECSuccess; /* Not a fatal error */ break; } /* List the DNS names from the server cert as part of the warning. The names are in a circular list. */ current = nameList; do { /* Make sure this is a DNS name. */ if (current->type == certDNSName) { fprintf (stderr, " %.*s\n", (int)current->name.other.len, current->name.other.data); } current = CERT_GetNextGeneralName (current); } while (current != nameList); break; case SEC_ERROR_CA_CERT_INVALID: /* The server's certificate is not trusted. Should we trust it? */ secStatus = SECFailure; /* Do not trust by default. */ if (! connectionState->trustNewServerMode) break; /* Trust it for this session only? */ if (strcmp (connectionState->trustNewServerMode, "session") == 0) { secStatus = SECSuccess; break; } /* Trust it permanently? */ if (strcmp (connectionState->trustNewServerMode, "permanent") == 0) { /* The user wants to trust this server. Get the server's certificate so and add it to our database. */ serverCert = SSL_PeerCertificate (sslSocket); if (serverCert != NULL) { secStatus = trustNewServer (serverCert); } } break; default: secStatus = SECFailure; /* Do not trust this server */ break; } if (expected) PORT_Free (expected); if (tmpArena) PORT_FreeArena (tmpArena, PR_FALSE); if (serverCert != NULL) { CERT_DestroyCertificate (serverCert); } return secStatus; } static PRFileDesc * setupSSLSocket (connectionState_t *connectionState) { PRFileDesc *tcpSocket; PRFileDesc *sslSocket; PRSocketOptionData socketOption; PRStatus prStatus; SECStatus secStatus; tcpSocket = PR_OpenTCPSocket(connectionState->addr.raw.family); if (tcpSocket == NULL) goto loser; /* Make the socket blocking. */ socketOption.option = PR_SockOpt_Nonblocking; socketOption.value.non_blocking = PR_FALSE; prStatus = PR_SetSocketOption(tcpSocket, &socketOption); if (prStatus != PR_SUCCESS) goto loser; /* Import the socket into the SSL layer. */ sslSocket = SSL_ImportFD(NULL, tcpSocket); if (!sslSocket) goto loser; /* Set configuration options. */ secStatus = SSL_OptionSet(sslSocket, SSL_SECURITY, PR_TRUE); if (secStatus != SECSuccess) goto loser; secStatus = SSL_OptionSet(sslSocket, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE); if (secStatus != SECSuccess) goto loser; /* Set SSL callback routines. */ #if 0 /* no client authentication */ secStatus = SSL_GetClientAuthDataHook(sslSocket, (SSLGetClientAuthData)myGetClientAuthData, (void *)certNickname); if (secStatus != SECSuccess) goto loser; #endif #if 0 /* Use the default */ secStatus = SSL_AuthCertificateHook(sslSocket, (SSLAuthCertificate)myAuthCertificate, (void *)CERT_GetDefaultCertDB()); if (secStatus != SECSuccess) goto loser; #endif secStatus = SSL_BadCertHook(sslSocket, (SSLBadCertHandler)badCertHandler, connectionState); if (secStatus != SECSuccess) goto loser; #if 0 /* No handshake callback */ secStatus = SSL_HandshakeCallback(sslSocket, myHandshakeCallback, NULL); if (secStatus != SECSuccess) goto loser; #endif return sslSocket; loser: if (tcpSocket) PR_Close(tcpSocket); return NULL; } static SECStatus handle_connection (PRFileDesc *sslSocket, connectionState_t *connectionState) { PRInt32 numBytes; char *readBuffer; PRFileInfo info; PRFileDesc *local_file_fd; PRStatus prStatus; SECStatus secStatus = SECSuccess; #define READ_BUFFER_SIZE (60 * 1024) /* If we don't have both the input and output file names, then we're contacting this server only in order to establish trust. In this case send 0 as the file size and exit. */ if (! connectionState->infileName || ! connectionState->outfileName) { numBytes = htonl ((PRInt32)0); numBytes = PR_Write (sslSocket, & numBytes, sizeof (numBytes)); if (numBytes < 0) return SECFailure; return SECSuccess; } /* read and send the data. */ /* Try to open the local file named. * If successful, then write it to the server */ prStatus = PR_GetFileInfo(connectionState->infileName, &info); if (prStatus != PR_SUCCESS || info.type != PR_FILE_FILE || info.size < 0) { fprintf (stderr, STAP_CSC_02, connectionState->infileName); return SECFailure; } local_file_fd = PR_Open(connectionState->infileName, PR_RDONLY, 0); if (local_file_fd == NULL) { fprintf (stderr, STAP_CSC_03, connectionState->infileName); return SECFailure; } /* Send the file size first, so the server knows when it has the entire file. */ numBytes = htonl ((PRInt32)info.size); numBytes = PR_Write(sslSocket, & numBytes, sizeof (numBytes)); if (numBytes < 0) { PR_Close(local_file_fd); return SECFailure; } /* Transmit the local file across the socket. */ numBytes = PR_TransmitFile(sslSocket, local_file_fd, NULL, 0, PR_TRANSMITFILE_KEEP_OPEN, PR_INTERVAL_NO_TIMEOUT); if (numBytes < 0) { PR_Close(local_file_fd); return SECFailure; } PR_Close(local_file_fd); /* read until EOF */ readBuffer = (char *)PORT_Alloc(READ_BUFFER_SIZE); if (! readBuffer) { fprintf (stderr, _("Out of memory\n")); return SECFailure; } local_file_fd = PR_Open(connectionState->outfileName, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IWGRP | PR_IROTH); if (local_file_fd == NULL) { fprintf (stderr, STAP_CSC_04, connectionState->outfileName); return SECFailure; } while (PR_TRUE) { // No need for PR_Read_Complete here, since we're already managing multiple // reads to a fixed size buffer. numBytes = PR_Read (sslSocket, readBuffer, READ_BUFFER_SIZE); if (numBytes == 0) break; /* EOF */ if (numBytes < 0) { secStatus = SECFailure; break; } /* Write to output file */ numBytes = PR_Write(local_file_fd, readBuffer, numBytes); if (numBytes < 0) { fprintf (stderr, STAP_CSC_05, connectionState->outfileName); secStatus = SECFailure; break; } } PR_Free(readBuffer); PR_Close(local_file_fd); /* Caller closes the socket. */ return secStatus; } /* make the connection. */ static SECStatus do_connect (connectionState_t *connectionState) { PRFileDesc *sslSocket; PRStatus prStatus; SECStatus secStatus; secStatus = SECSuccess; /* Set up SSL secure socket. */ sslSocket = setupSSLSocket (connectionState); if (sslSocket == NULL) return SECFailure; #if 0 /* no client authentication */ secStatus = SSL_SetPKCS11PinArg(sslSocket, password); if (secStatus != SECSuccess) goto done; #endif secStatus = SSL_SetURL(sslSocket, connectionState->hostName); if (secStatus != SECSuccess) goto done; prStatus = PR_Connect(sslSocket, & connectionState->addr, PR_INTERVAL_NO_TIMEOUT); if (prStatus != PR_SUCCESS) { secStatus = SECFailure; goto done; } /* Established SSL connection, ready to send data. */ secStatus = SSL_ResetHandshake(sslSocket, /* asServer */ PR_FALSE); if (secStatus != SECSuccess) goto done; /* This is normally done automatically on the first I/O operation, but doing it here catches any authentication problems early. */ secStatus = SSL_ForceHandshake(sslSocket); if (secStatus != SECSuccess) goto done; // Connect to the server and make the request. secStatus = handle_connection(sslSocket, connectionState); done: prStatus = PR_Close(sslSocket); return secStatus; } static bool isIPv6LinkLocal (const PRNetAddr &address) { // Link-local addresses are members of the address block fe80:: if (address.raw.family == PR_AF_INET6 && address.ipv6.ip.pr_s6_addr[0] == 0xfe && address.ipv6.ip.pr_s6_addr[1] == 0x80) return true; return false; } int client_connect (const compile_server_info &server, const char* infileName, const char* outfileName, const char* trustNewServer) { SECStatus secStatus; PRErrorCode errorNumber; int attempt; int errCode = GENERAL_ERROR; struct connectionState_t connectionState; // Set up a connection state for use by NSS error callbacks. memset (& connectionState, 0, sizeof (connectionState)); connectionState.hostName = server.host_name.c_str (); connectionState.addr = server.address; connectionState.infileName = infileName; connectionState.outfileName = outfileName; connectionState.trustNewServerMode = trustNewServer; /* Some errors (see below) represent a situation in which trying again should succeed. However, don't try forever. */ for (attempt = 0; attempt < 5; ++attempt) { secStatus = do_connect (& connectionState); if (secStatus == SECSuccess) return SUCCESS; errorNumber = PR_GetError (); switch (errorNumber) { case PR_CONNECT_RESET_ERROR: /* Server was not ready. */ sleep (1); break; /* Try again */ case SEC_ERROR_EXPIRED_CERTIFICATE: /* The server's certificate has expired. It should generate a new certificate. Return now and we'll try again. */ errCode = SERVER_CERT_EXPIRED_ERROR; return errCode; case SEC_ERROR_CA_CERT_INVALID: /* The server's certificate is not trusted. The exit code must reflect this. */ errCode = CA_CERT_INVALID_ERROR; return errCode; default: /* This error is fatal. */ return errCode; } } return errCode; } int compile_server_client::passes_0_4 () { PROBE1(stap, client__start, &s); // arguments parsed; get down to business if (s.verbose || ! s.auto_server_msgs.empty ()) clog << _("Using a compile server.") << endl; struct tms tms_before; times (& tms_before); struct timeval tv_before; gettimeofday (&tv_before, NULL); // Create the request package. int rc = initialize (); assert_no_interrupts(); if (rc != 0) goto done; rc = create_request (); assert_no_interrupts(); if (rc != 0) goto done; rc = package_request (); assert_no_interrupts(); if (rc != 0) goto done; // Submit it to the server. rc = find_and_connect_to_server (); assert_no_interrupts(); if (rc != 0) goto done; // Unpack and process the response. rc = unpack_response (); assert_no_interrupts(); if (rc != 0) goto done; rc = process_response (); done: struct tms tms_after; times (& tms_after); unsigned _sc_clk_tck = sysconf (_SC_CLK_TCK); struct timeval tv_after; gettimeofday (&tv_after, NULL); #define TIMESPRINT "in " << \ (tms_after.tms_cutime + tms_after.tms_utime \ - tms_before.tms_cutime - tms_before.tms_utime) * 1000 / (_sc_clk_tck) << "usr/" \ << (tms_after.tms_cstime + tms_after.tms_stime \ - tms_before.tms_cstime - tms_before.tms_stime) * 1000 / (_sc_clk_tck) << "sys/" \ << ((tv_after.tv_sec - tv_before.tv_sec) * 1000 + \ ((long)tv_after.tv_usec - (long)tv_before.tv_usec) / 1000) << "real ms." if (rc == 0) { // Save the module, if necessary. if (s.last_pass == 4) s.save_module = true; // Copy module to the current directory. if (! pending_interrupts) { if (s.save_module) { string module_src_path = s.tmpdir + "/" + s.module_filename(); string module_dest_path = s.module_filename(); copy_file (module_src_path, module_dest_path, s.verbose >= 3); // Also copy the module signature, it it exists. module_src_path += ".sgn"; if (file_exists (module_src_path)) { module_dest_path += ".sgn"; copy_file(module_src_path, module_dest_path, s.verbose >= 3); } } // Print the name of the module if (s.last_pass == 4) { cout << s.module_filename() << endl; } } } // syntax errors, if any, are already printed if (s.verbose) { string ws = s.winning_server; if (ws == "") ws = "?"; clog << _("Passes: via server ") << ws << " " << getmemusage() << TIMESPRINT << endl; } if (rc && !s.dump_mode) { clog << _("Passes: via server failed. Try again with another '-v' option.") << endl; } PROBE1(stap, client__end, &s); return rc; } // Initialize a client/server session. int compile_server_client::initialize () { int rc = 0; // Initialize session state argc = 0; // Private location for server certificates. private_ssl_dbs.push_back (private_ssl_cert_db_path ()); // Additional public location. public_ssl_dbs.push_back (global_ssl_cert_db_path ()); // Create a temporary directory to package things in. client_tmpdir = s.tmpdir + "/client"; rc = create_dir (client_tmpdir.c_str ()); if (rc != 0) { const char* e = strerror (errno); clog << _("ERROR: cannot create temporary directory (\"") << client_tmpdir << "\"): " << e << endl; } return rc; } // Create the request package. int compile_server_client::create_request () { // Add the current protocol version. int rc = write_to_file (client_tmpdir + "/version", CURRENT_CS_PROTOCOL_VERSION); if (rc != 0) return rc; // Add the script file or script option if (s.script_file != "") { if (s.script_file == "-") { // Copy the script from stdin string packaged_script_dir = client_tmpdir + "/script"; rc = create_dir (packaged_script_dir.c_str ()); if (rc != 0) { const char* e = strerror (errno); clog << _("ERROR: cannot create temporary directory ") << packaged_script_dir << ": " << e << endl; return rc; } rc = ! copy_file("/dev/stdin", packaged_script_dir + "/-"); if (rc != 0) return rc; // Name the script in the packaged arguments. rc = add_package_arg ("script/-"); if (rc != 0) return rc; } else { // Add the script to our package. This will also name the script // in the packaged arguments. rc = include_file_or_directory ("script", s.script_file); if (rc != 0) return rc; } } // Add -I paths. Skip the default directory. if (s.include_arg_start != -1) { unsigned limit = s.include_path.size (); for (unsigned i = s.include_arg_start; i < limit; ++i) { rc = add_package_arg ("-I"); if (rc != 0) return rc; rc = include_file_or_directory ("tapset", s.include_path[i]); if (rc != 0) return rc; } } // Add other options. rc = add_package_args (); if (rc != 0) return rc; // Add the sysinfo file string sysinfo = "sysinfo: " + s.kernel_release + " " + s.architecture; rc = write_to_file (client_tmpdir + "/sysinfo", sysinfo); if (rc != 0) return rc; // Add localization data rc = add_localization_variables(); // Add the machine owner key (MOK) fingerprints file, if needed. if (! s.mok_fingerprints.empty()) { ostringstream fingerprints; vector::const_iterator it; for (it = s.mok_fingerprints.begin(); it != s.mok_fingerprints.end(); it++) fingerprints << *it << endl; rc = write_to_file(client_tmpdir + "/mok_fingerprints", fingerprints.str()); if (rc != 0) return rc; } return rc; } // Add the arguments specified on the command line to the server request // package, as appropriate. int compile_server_client::add_package_args () { // stap arguments to be passed to the server. int rc = 0; unsigned limit = s.server_args.size(); for (unsigned i = 0; i < limit; ++i) { rc = add_package_arg (s.server_args[i]); if (rc != 0) return rc; } // Script arguments. limit = s.args.size(); if (limit > 0) { rc = add_package_arg ("--"); if (rc != 0) return rc; for (unsigned i = 0; i < limit; ++i) { rc = add_package_arg (s.args[i]); if (rc != 0) return rc; } } return rc; } int compile_server_client::add_package_arg (const string &arg) { int rc = 0; ostringstream fname; fname << client_tmpdir << "/argv" << ++argc; write_to_file (fname.str (), arg); // NB: No terminating newline return rc; } // Symbolically link the given file or directory into the client's temp // directory under the given subdirectory. int compile_server_client::include_file_or_directory ( const string &subdir, const string &path ) { // Must predeclare these because we do use 'goto done' to // exit from error situations. vector components; string name; int rc; // Canonicalize the given path and remove the leading /. string rpath; char *cpath = canonicalize_file_name (path.c_str ()); if (! cpath) { // It can not be canonicalized. Use the name relative to // the current working directory and let the server deal with it. char cwd[PATH_MAX]; if (getcwd (cwd, sizeof (cwd)) == NULL) { rpath = path; rc = 1; goto done; } rpath = string (cwd) + "/" + path; } else { // It can be canonicalized. Use the canonicalized name and add this // file or directory to the request package. rpath = cpath; free (cpath); // Including / would require special handling in the code below and // is a bad idea anyway. Let's not allow it. if (rpath == "/") { if (rpath != path) clog << _F("%s resolves to %s\n", path.c_str (), rpath.c_str ()); clog << _F("Unable to send %s to the server\n", path.c_str ()); return 1; } // First create the requested subdirectory. name = client_tmpdir + "/" + subdir; rc = create_dir (name.c_str ()); if (rc) goto done; // Now create each component of the path within the sub directory. assert (rpath[0] == '/'); tokenize (rpath.substr (1), components, "/"); assert (components.size () >= 1); unsigned i; for (i = 0; i < components.size() - 1; ++i) { if (components[i].empty ()) continue; // embedded '//' name += "/" + components[i]; rc = create_dir (name.c_str ()); if (rc) goto done; } // Now make a symbolic link to the actual file or directory. assert (i == components.size () - 1); name += "/" + components[i]; rc = symlink (rpath.c_str (), name.c_str ()); if (rc) goto done; } // Name this file or directory in the packaged arguments. rc = add_package_arg (subdir + "/" + rpath.substr (1)); done: if (rc != 0) { const char* e = strerror (errno); clog << "ERROR: unable to add " << rpath << " to temp directory as " << name << ": " << e << endl; } return rc; } // Add the localization variables to the server request // package. int compile_server_client::add_localization_variables() { int rc; string envVar; string fname; const set &locVars = localization_variables(); set::iterator it; /* Note: We don't have to check for the contents of the environment * variables here, since they will be checked extensively on the * server. */ for (it = locVars.begin(); it != locVars.end(); it++) { char* var = getenv((*it).c_str()); if (var) envVar += *it + "=" + (string)var + "\n"; } fname = client_tmpdir + "/locale"; rc = write_to_file(fname, envVar); return rc; } // Package the client's temp directory into a form suitable for sending to the // server. int compile_server_client::package_request () { // Package up the temporary directory into a zip file. client_zipfile = client_tmpdir + ".zip"; string cmd = "cd " + cmdstr_quoted(client_tmpdir) + " && zip -qr " + cmdstr_quoted(client_zipfile) + " *"; vector sh_cmd; sh_cmd.push_back("sh"); sh_cmd.push_back("-c"); sh_cmd.push_back(cmd); int rc = stap_system (s.verbose, sh_cmd); return rc; } int compile_server_client::find_and_connect_to_server () { // Accumulate info on the specified servers. vector specified_servers; get_specified_server_info (s, specified_servers); // Examine the specified servers to make sure that each has been resolved // with a host name, ip address and port. If not, try to obtain this // information by examining online servers. vector server_list; for (vector::const_iterator i = specified_servers.begin (); i != specified_servers.end (); ++i) { // If we have an ip address and were given a port number, then just use the one we've // been given. Otherwise, check for matching compatible online servers and try their // ip addresses and ports. if (i->hasAddress() && i->fully_specified) add_server_info (*i, server_list); else { // Obtain a list of online servers. vector online_servers; get_or_keep_online_server_info (s, online_servers, false/*keep*/); // If no specific server (port) has been specified, // then we'll need the servers to be // compatible and possibly trusted as signers as well. if (! i->fully_specified) { get_or_keep_compatible_server_info (s, online_servers, true/*keep*/); if (! pr_contains (s.privilege, pr_stapdev)) get_or_keep_signing_server_info (s, online_servers, true/*keep*/); } // Keep the ones (if any) which match our server. keep_common_server_info (*i, online_servers); // Add these servers (if any) to the server list. add_server_info (online_servers, server_list); } } // Did we identify any potential servers? unsigned limit = server_list.size (); if (limit == 0) { clog << _("Unable to find a suitable compile server. [man stap-server]") << endl; // Try to explain why. vector online_servers; get_or_keep_online_server_info (s, online_servers, false/*keep*/); if (online_servers.empty ()) clog << _("No servers online to select from.") << endl; else { clog << _("The following servers are online:") << endl; clog << online_servers; if (! specified_servers.empty ()) { clog << _("The following servers were requested:") << endl; clog << specified_servers; } else { string criteria = "online,trusted,compatible"; if (! pr_contains (s.privilege, pr_stapdev)) criteria += ",signer"; clog << _F("No servers matched the selection criteria of %s.", criteria.c_str()) << endl; } } return 1; } // Sort the list of servers into a preferred order. preferred_order (server_list); // Now try each of the identified servers in turn. int rc = compile_using_server (server_list); if (rc == SUCCESS) return 0; // success! // If the error was that a server's cert was expired, try again. This is because the server // should generate a new cert which may be automatically trusted by us if it is our server. // Give the server a chance to do this before retrying. if (rc == SERVER_CERT_EXPIRED_ERROR) { if (s.verbose >= 2) clog << _("The server's certificate was expired. Trying again") << endl << flush; sleep (2); rc = compile_using_server (server_list); if (rc == SUCCESS) return 0; // success! } // We were unable to use any available server clog << _("Unable to connect to a server.") << endl; if (s.verbose == 1) { // This information is redundant at higher verbosity levels. clog << _("The following servers were tried:") << endl; clog << server_list; } return 1; // Failure } int compile_server_client::compile_using_server ( vector &servers ) { // Make sure NSPR is initialized. Must be done before NSS is initialized s.NSPR_init (); // Attempt connection using each of the available client certificate // databases. Assume the server certificate is invalid until proven otherwise. PR_SetError (SEC_ERROR_CA_CERT_INVALID, 0); vector dbs = private_ssl_dbs; vector::iterator i = dbs.end(); dbs.insert (i, public_ssl_dbs.begin (), public_ssl_dbs.end ()); int rc = GENERAL_ERROR; // assume failure bool serverCertExpired = false; for (i = dbs.begin (); i != dbs.end (); ++i) { // Make sure the database directory exists. It is not an error if it // doesn't. if (! file_exists (*i)) continue; #if 0 // no client authentication for now. // Set our password function callback. PK11_SetPasswordFunc (myPasswd); #endif // Initialize the NSS libraries. const char *cert_dir = i->c_str (); SECStatus secStatus = nssInit (cert_dir); if (secStatus != SECSuccess) { // Message already issued. continue; // try next database } // Enable all cipher suites. // SSL_ClearSessionCache is required for the new settings to take effect. /* Some NSS versions don't do this correctly in NSS_SetDomesticPolicy. */ do { const PRUint16 *cipher; for (cipher = SSL_GetImplementedCiphers(); *cipher != 0; ++cipher) SSL_CipherPolicySet(*cipher, SSL_ALLOWED); } while (0); SSL_ClearSessionCache (); server_zipfile = s.tmpdir + "/server.zip"; // Try each server in turn. for (vector::iterator j = servers.begin (); j != servers.end (); ++j) { // At a minimum we need an ip_address along with a port // number in order to contact the server. if (! j->hasAddress() || j->port == 0) continue; // Set the port within the address. j->setAddressPort (j->port); if (s.verbose >= 2) clog << _F("Attempting SSL connection with %s\n" " using certificates from the database in %s\n", lex_cast(*j).c_str(), cert_dir); rc = client_connect (*j, client_zipfile.c_str(), server_zipfile.c_str (), NULL/*trustNewServer_p*/); if (rc == SUCCESS) { s.winning_server = lex_cast(*j); break; // Success! } // Server cert has expired. Try other servers and/or databases, but take note because // server should generate a new certificate. If no other servers succeed, we'll try again // in case the new cert works. if (rc == SERVER_CERT_EXPIRED_ERROR) { serverCertExpired = true; continue; } if (s.verbose >= 2) { clog << _(" Unable to connect: "); nssError (); // Additional information: if the address is IPv6 and is link-local, then it must // have a scope_id. if (isIPv6LinkLocal (j->address) && j->address.ipv6.scope_id == 0) { clog << _(" The address is an IPv6 link-local address with no scope specifier.") << endl; } } } // SSL_ClearSessionCache is required before shutdown for client applications. SSL_ClearSessionCache (); nssCleanup (cert_dir); if (rc == SECSuccess) break; // Success! } // Indicate whether a server cert was expired, so we can try again, if desired. if (rc != SUCCESS) { if (serverCertExpired) rc = SERVER_CERT_EXPIRED_ERROR; } return rc; } int compile_server_client::unpack_response () { // Unzip the response package. server_tmpdir = s.tmpdir + "/server"; vector cmd; cmd.push_back("unzip"); cmd.push_back("-qd"); cmd.push_back(server_tmpdir); cmd.push_back(server_zipfile); int rc = stap_system (s.verbose, cmd); if (rc != 0) { clog << _F("Unable to unzip the server response '%s'\n", server_zipfile.c_str()); return rc; } // Determine the server protocol version. string filename = server_tmpdir + "/version"; if (file_exists (filename)) ::read_from_file (filename, server_version); // Warn about the shortcomings of this server, if it is down level. show_server_compatibility (); // If the server's response contains a systemtap temp directory, move // its contents to our temp directory. glob_t globbuf; string filespec = server_tmpdir + "/stap??????"; if (s.verbose >= 3) clog << _F("Searching \"%s\"\n", filespec.c_str()); int r = glob(filespec.c_str (), 0, NULL, & globbuf); if (r != GLOB_NOSPACE && r != GLOB_ABORTED && r != GLOB_NOMATCH) { if (globbuf.gl_pathc > 1) { clog << _("Incorrect number of files in server response") << endl; rc = 1; goto done; } assert (globbuf.gl_pathc == 1); string dirname = globbuf.gl_pathv[0]; if (s.verbose >= 3) clog << _(" found ") << dirname << endl; filespec = dirname + "/*"; if (s.verbose >= 3) clog << _F("Searching \"%s\"\n", filespec.c_str()); int r = glob(filespec.c_str (), GLOB_PERIOD, NULL, & globbuf); if (r != GLOB_NOSPACE && r != GLOB_ABORTED && r != GLOB_NOMATCH) { unsigned prefix_len = dirname.size () + 1; for (unsigned i = 0; i < globbuf.gl_pathc; ++i) { string oldname = globbuf.gl_pathv[i]; if (oldname.substr (oldname.size () - 2) == "/." || oldname.substr (oldname.size () - 3) == "/..") continue; string newname = s.tmpdir + "/" + oldname.substr (prefix_len); if (s.verbose >= 3) clog << _F(" found %s -- linking from %s", oldname.c_str(), newname.c_str()); rc = symlink (oldname.c_str (), newname.c_str ()); if (rc != 0) { clog << _F("Unable to link '%s' to '%s':%s\n", oldname.c_str(), newname.c_str(), strerror(errno)); goto done; } } } } // If the server version is less that 1.6, remove the output line due to the synthetic // server-side -k. Look for a message containing the name of the temporary directory. // We can look for the English message since server versions before 1.6 do not support // localization. if (server_version < "1.6") { cmd.clear(); cmd.push_back("sed"); cmd.push_back("-i"); cmd.push_back("/^Keeping temporary directory.*/ d"); cmd.push_back(server_tmpdir + "/stderr"); stap_system (s.verbose, cmd); } // Remove the output line due to the synthetic server-side -p4 cmd.clear(); cmd.push_back("sed"); cmd.push_back("-i"); cmd.push_back("/^.*\\.ko$/ d"); cmd.push_back(server_tmpdir + "/stdout"); stap_system (s.verbose, cmd); done: globfree (& globbuf); return rc; } int compile_server_client::process_response () { // Pick up the results of running stap on the server. string filename = server_tmpdir + "/rc"; int stap_rc; int rc = read_from_file (filename, stap_rc); if (rc != 0) return rc; rc = stap_rc; if (s.last_pass >= 4) { // The server should have returned a module. string filespec = s.tmpdir + "/*.ko"; if (s.verbose >= 3) clog << _F("Searching \"%s\"\n", filespec.c_str()); glob_t globbuf; int r = glob(filespec.c_str (), 0, NULL, & globbuf); if (r != GLOB_NOSPACE && r != GLOB_ABORTED && r != GLOB_NOMATCH) { if (globbuf.gl_pathc > 1) clog << _("Incorrect number of modules in server response") << endl; else { assert (globbuf.gl_pathc == 1); string modname = globbuf.gl_pathv[0]; if (s.verbose >= 3) clog << _(" found ") << modname << endl; // If a module name was not specified by the user, then set it to // be the one generated by the server. if (! s.save_module) { vector components; tokenize (modname, components, "/"); s.module_name = components.back (); s.module_name.erase(s.module_name.size() - 3); } // If a uprobes.ko module was returned, then make note of it. string uprobes_ko; if (server_version < "1.6") uprobes_ko = s.tmpdir + "/server/uprobes.ko"; else uprobes_ko = s.tmpdir + "/uprobes/uprobes.ko"; if (file_exists (uprobes_ko)) { s.need_uprobes = true; s.uprobes_path = uprobes_ko; } } } else if (s.have_script) { if (rc == 0) { clog << _("No module was returned by the server.") << endl; rc = 1; } } globfree (& globbuf); } // If the server returned a MOK certificate, copy it to the user's // current directory. string server_MOK_public_cert = s.tmpdir + "/server/" MOK_PUBLIC_CERT_NAME; if (file_exists (server_MOK_public_cert)) { string dst = MOK_PUBLIC_CERT_NAME; copy_file (server_MOK_public_cert, dst, (s.verbose >= 3)); } // Output stdout and stderr. filename = server_tmpdir + "/stderr"; flush_to_stream (filename, clog); filename = server_tmpdir + "/stdout"; flush_to_stream (filename, cout); return rc; } int compile_server_client::read_from_file (const string &fname, int &data) { // C++ streams may not set errno in the even of a failure. However if we // set it to 0 before each operation and it gets set during the operation, // then we can use its value in order to determine what happened. errno = 0; ifstream f (fname.c_str ()); if (! f.good ()) { clog << _F("Unable to open file '%s' for reading: ", fname.c_str()); goto error; } // Read the data; errno = 0; f >> data; if (f.fail ()) { clog << _F("Unable to read from file '%s': ", fname.c_str()); goto error; } // NB: not necessary to f.close (); return 0; // Success error: if (errno) clog << strerror (errno) << endl; else clog << _("unknown error") << endl; return 1; // Failure } template int compile_server_client::write_to_file (const string &fname, const T &data) { // C++ streams may not set errno in the even of a failure. However if we // set it to 0 before each operation and it gets set during the operation, // then we can use its value in order to determine what happened. errno = 0; ofstream f (fname.c_str ()); if (! f.good ()) { clog << _F("Unable to open file '%s' for writing: ", fname.c_str()); goto error; } // Write the data; f << data; errno = 0; if (f.fail ()) { clog << _F("Unable to write to file '%s': ", fname.c_str()); goto error; } // NB: not necessary to f.close (); return 0; // Success error: if (errno) clog << strerror (errno) << endl; else clog << _("unknown error") << endl; return 1; // Failure } int compile_server_client::flush_to_stream (const string &fname, ostream &o) { // C++ streams may not set errno in the even of a failure. However if we // set it to 0 before each operation and it gets set during the operation, // then we can use its value in order to determine what happened. errno = 0; ifstream f (fname.c_str ()); if (! f.good ()) { clog << _F("Unable to open file '%s' for reading: ", fname.c_str()); goto error; } // Stream the data // NB: o << f.rdbuf() misbehaves for some reason, appearing to close o, // which is unfortunate if o == clog or cout. while (1) { errno = 0; int c = f.get(); if (f.eof ()) return 0; // normal exit if (! f.good()) break; o.put(c); if (! o.good()) break; } // NB: not necessary to f.close (); error: if (errno) clog << strerror (errno) << endl; else clog << _("unknown error") << endl; return 1; // Failure } void compile_server_client::show_server_compatibility () const { // Locale sensitivity was added in version 1.6 if (server_version < "1.6") { clog << _F("Server protocol version is %s\n", server_version.v); clog << _("The server does not use localization information passed by the client\n"); } } // Issue a status message for when a server's trust is already in place. static void trust_already_in_place ( const compile_server_info &server, const vector &server_list, const string cert_db_path, bool revoking ) { // What level of trust? string purpose; if (cert_db_path == signing_cert_db_path ()) purpose = _("as a module signer for all users"); else { purpose = _("as an SSL peer"); if (cert_db_path == global_ssl_cert_db_path ()) purpose += _(" for all users"); else purpose += _(" for the current user"); } // Issue a message for each server in the list with the same certificate. unsigned limit = server_list.size (); for (unsigned i = 0; i < limit; ++i) { if (server.certinfo != server_list[i].certinfo) continue; clog << server_list[i] << _(" is already "); if (revoking) clog << _("untrusted ") << purpose << endl; else clog << _("trusted ") << purpose << endl; } } // Add the given servers to the given database of trusted servers. static void add_server_trust ( systemtap_session &s, const string &cert_db_path, vector &server_list ) { // Get a list of servers already trusted. This opens the database, so do it // before we open it for our own purposes. vector already_trusted; get_server_info_from_db (s, already_trusted, cert_db_path); // Make sure the given path exists. if (create_dir (cert_db_path.c_str (), 0755) != 0) { clog << _F("Unable to find or create the client certificate database directory %s: ", cert_db_path.c_str()); perror (""); return; } // Must predeclare this because of jumps to cleanup: below. vector processed_certs; // Make sure NSPR is initialized. Must be done before NSS is initialized s.NSPR_init (); // Initialize the NSS libraries -- read/write SECStatus secStatus = nssInit (cert_db_path.c_str (), 1/*readwrite*/); if (secStatus != SECSuccess) { // Message already issued. goto cleanup; } // Enable all cipher suites. // SSL_ClearSessionCache is required for the new settings to take effect. /* Some NSS versions don't do this correctly in NSS_SetDomesticPolicy. */ do { const PRUint16 *cipher; for (cipher = SSL_GetImplementedCiphers(); *cipher != 0; ++cipher) SSL_CipherPolicySet(*cipher, SSL_ALLOWED); } while (0); SSL_ClearSessionCache (); // Iterate over the servers to become trusted. Contact each one and // add it to the list of trusted servers if it is not already trusted. // client_connect will issue any error messages. for (vector::iterator server = server_list.begin(); server != server_list.end (); ++server) { // Trust is based on certificates. We need only add trust in the // same certificate once. // // RHBZ 1075685: If the new server to be trusted is selected by address + port, // and there is no avahi assistance available, or the server is not known // to avahi, then its certificate serial number field will be empty. We // therefore have no basis for comparing it to the serial numbers on already-trusted // certificates. In this case, unconditionally contact the new server to obtain // its certificate. if (! server->certinfo.empty ()) { // We need not contact the server if it has already been processed. if (find (processed_certs.begin (), processed_certs.end (), server->certinfo) != processed_certs.end ()) continue; processed_certs.push_back (server->certinfo); // We need not contact the server if it is already trusted. if (find (already_trusted.begin (), already_trusted.end (), *server) != already_trusted.end ()) { if (s.verbose >= 2) trust_already_in_place (*server, server_list, cert_db_path, false/*revoking*/); continue; } } // At a minimum we need an ip_address along with a port // number in order to contact the server. if (! server->hasAddress() || server->port == 0) continue; // Set the port within the address. server->setAddressPort (server->port); int rc = client_connect (*server, NULL, NULL, "permanent"); if (rc != SUCCESS) { clog << _F("Unable to connect to %s", lex_cast(*server).c_str()) << endl; nssError (); // Additional information: if the address is IPv6 and is link-local, then it must // have a scope_id. if (isIPv6LinkLocal (server->address) && server->address.ipv6.scope_id == 0) { clog << _(" The address is an IPv6 link-local address with no scope specifier.") << endl; } } } cleanup: // Shutdown NSS. // SSL_ClearSessionCache is required before shutdown for client applications. SSL_ClearSessionCache (); nssCleanup (cert_db_path.c_str ()); // Make sure the database files are readable. glob_t globbuf; string filespec = cert_db_path + "/*.db"; if (s.verbose >= 3) clog << _F("Searching \"%s\"\n", filespec.c_str()); int r = glob (filespec.c_str (), 0, NULL, & globbuf); if (r != GLOB_NOSPACE && r != GLOB_ABORTED && r != GLOB_NOMATCH) { for (unsigned i = 0; i < globbuf.gl_pathc; ++i) { string filename = globbuf.gl_pathv[i]; if (s.verbose >= 3) clog << _(" found ") << filename << endl; if (chmod (filename.c_str (), 0644) != 0) { s.print_warning("Unable to change permissions on " + filename + ": "); perror (""); } } } } // Remove the given servers from the given database of trusted servers. static void revoke_server_trust ( systemtap_session &s, const string &cert_db_path, const vector &server_list ) { // Make sure the given path exists. if (! file_exists (cert_db_path)) { if (s.verbose >= 5) { clog << _F("Certificate database '%s' does not exist", cert_db_path.c_str()) << endl; for (vector::const_iterator server = server_list.begin(); server != server_list.end (); ++server) trust_already_in_place (*server, server_list, cert_db_path, true/*revoking*/); } return; } // Must predeclare these because of jumps to cleanup: below. CERTCertDBHandle *handle; PRArenaPool *tmpArena = NULL; CERTCertList *certs = NULL; CERTCertificate *db_cert; vector processed_certs; const char *nickname; // Make sure NSPR is initialized. Must be done before NSS is initialized s.NSPR_init (); // Initialize the NSS libraries -- read/write SECStatus secStatus = nssInit (cert_db_path.c_str (), 1/*readwrite*/); if (secStatus != SECSuccess) { // Message already issued goto cleanup; } handle = CERT_GetDefaultCertDB(); // A memory pool to work in tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (! tmpArena) { clog << _("Out of memory:"); nssError (); goto cleanup; } // Iterate over the servers to become untrusted. nickname = server_cert_nickname (); for (vector::const_iterator server = server_list.begin(); server != server_list.end (); ++server) { // If the server's certificate serial number is unknown, then we can't // match it with one in the database. if (server->certinfo.empty ()) continue; // Trust is based on certificates. We need only revoke trust in the same // certificate once. if (find (processed_certs.begin (), processed_certs.end (), server->certinfo) != processed_certs.end ()) continue; processed_certs.push_back (server->certinfo); // Search the client-side database of trusted servers. db_cert = PK11_FindCertFromNickname (nickname, NULL); if (! db_cert) { // No trusted servers. Not an error, but issue a status message. if (s.verbose >= 2) trust_already_in_place (*server, server_list, cert_db_path, true/*revoking*/); continue; } // Here, we have one cert with the desired nickname. // Now, we will attempt to get a list of ALL certs // with the same subject name as the cert we have. That list // should contain, at a minimum, the one cert we have already found. // If the list of certs is empty (NULL), the libraries have failed. certs = CERT_CreateSubjectCertList (NULL, handle, & db_cert->derSubject, PR_Now (), PR_FALSE); CERT_DestroyCertificate (db_cert); if (! certs) { clog << _F("Unable to query certificate database %s: ", cert_db_path.c_str()) << endl; PORT_SetError (SEC_ERROR_LIBRARY_FAILURE); nssError (); goto cleanup; } // Find the certificate matching the one belonging to our server. CERTCertListNode *node; for (node = CERT_LIST_HEAD (certs); ! CERT_LIST_END (node, certs); node = CERT_LIST_NEXT (node)) { // The certificate we're working with. db_cert = node->cert; // Get the serial number. string serialNumber = get_cert_serial_number (db_cert); // Does the serial number match that of the current server? if (serialNumber != server->certinfo) continue; // goto next certificate // All is ok! Remove the certificate from the database. break; } // Loop over certificates in the database // Was a certificate matching the server found? */ if (CERT_LIST_END (node, certs)) { // Not found. Server is already untrusted. if (s.verbose >= 2) trust_already_in_place (*server, server_list, cert_db_path, true/*revoking*/); } else { secStatus = SEC_DeletePermCertificate (db_cert); if (secStatus != SECSuccess) { clog << _F("Unable to remove certificate from %s: ", cert_db_path.c_str()) << endl; nssError (); } } CERT_DestroyCertList (certs); certs = NULL; } // Loop over servers cleanup: assert(!certs); if (tmpArena) PORT_FreeArena (tmpArena, PR_FALSE); nssCleanup (cert_db_path.c_str ()); } // Obtain information about servers from the certificates in the given database. static void get_server_info_from_db ( systemtap_session &s, vector &servers, const string &cert_db_path ) { // Make sure the given path exists. if (! file_exists (cert_db_path)) { if (s.verbose >= 5) clog << _F("Certificate database '%s' does not exist.", cert_db_path.c_str()) << endl; return; } // Make sure NSPR is initialized. Must be done before NSS is initialized s.NSPR_init (); // Initialize the NSS libraries -- readonly SECStatus secStatus = nssInit (cert_db_path.c_str ()); if (secStatus != SECSuccess) { // Message already issued. return; } // Must predeclare this because of jumps to cleanup: below. PRArenaPool *tmpArena = NULL; CERTCertList *certs = get_cert_list_from_db (server_cert_nickname ()); if (! certs) { if (s.verbose >= 5) clog << _F("No certificate found in database %s", cert_db_path.c_str ()) << endl; goto cleanup; } // A memory pool to work in tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (! tmpArena) { clog << _("Out of memory:"); nssError (); goto cleanup; } for (CERTCertListNode *node = CERT_LIST_HEAD (certs); ! CERT_LIST_END (node, certs); node = CERT_LIST_NEXT (node)) { compile_server_info server_info; // The certificate we're working with. CERTCertificate *db_cert = node->cert; // Get the host name. It is in the alt-name extension of the // certificate. SECItem subAltName; subAltName.data = NULL; secStatus = CERT_FindCertExtension (db_cert, SEC_OID_X509_SUBJECT_ALT_NAME, & subAltName); if (secStatus != SECSuccess || ! subAltName.data) { clog << _("Unable to find alt name extension on server certificate: ") << endl; nssError (); continue; } // Decode the extension. CERTGeneralName *nameList = CERT_DecodeAltNameExtension (tmpArena, & subAltName); SECITEM_FreeItem(& subAltName, PR_FALSE); if (! nameList) { clog << _("Unable to decode alt name extension on server certificate: ") << endl; nssError (); continue; } // We're interested in the first alternate name. assert (nameList->type == certDNSName); server_info.host_name = string ((const char *)nameList->name.other.data, nameList->name.other.len); // Don't free nameList. It's part of the tmpArena. // Get the serial number. server_info.certinfo = get_cert_serial_number (db_cert); // Our results will at a minimum contain this server. add_server_info (server_info, servers); // Augment the list by querying all online servers and keeping the ones // with the same cert serial number. vector online_servers; get_or_keep_online_server_info (s, online_servers, false/*keep*/); keep_server_info_with_cert_and_port (s, server_info, online_servers); add_server_info (online_servers, servers); } cleanup: if (certs) CERT_DestroyCertList (certs); if (tmpArena) PORT_FreeArena (tmpArena, PR_FALSE); nssCleanup (cert_db_path.c_str ()); } // Utility Functions. //----------------------------------------------------------------------- ostream &operator<< (ostream &s, const compile_server_info &i) { // Don't print empty information if (i.empty ()) return s; s << " host="; if (! i.host_name.empty ()) s << i.host_name; else s << "unknown"; s << " address="; if (i.hasAddress()) { PRStatus prStatus; switch (i.address.raw.family) { case PR_AF_INET: case PR_AF_INET6: { #define MAX_NETADDR_SIZE 46 // from the NSPR API reference. char buf[MAX_NETADDR_SIZE]; prStatus = PR_NetAddrToString(& i.address, buf, sizeof (buf)); if (prStatus == PR_SUCCESS) { s << buf; break; } } // Fall through default: s << "offline"; break; } } else s << "offline"; s << " port="; if (i.port != 0) s << i.port; else s << "unknown"; s << " sysinfo=\""; if (! i.sysinfo.empty ()) s << i.sysinfo << '"'; else s << "unknown\""; s << " version="; if (! i.version.empty ()) s << i.version; else s << "unknown"; s << " certinfo=\""; if (! i.certinfo.empty ()) s << i.certinfo << '"'; else s << "unknown\""; if (! i.mok_fingerprints.empty ()) { // FIXME: Yikes, this output is ugly. Perhaps the server output // needs a more structured approach. s << " mok_fingerprints=\""; vector::const_iterator it; for (it = i.mok_fingerprints.begin (); it != i.mok_fingerprints.end (); it++) { if (it != i.mok_fingerprints.begin ()) s << ", "; s << *it; } s << "\""; } return s; } ostream &operator<< (ostream &s, const vector &v) { // Indicate an empty list. if (v.size () == 0 || (v.size () == 1 && v[0].empty())) s << "No Servers" << endl; else { for (unsigned i = 0; i < v.size(); ++i) { // Don't print empty items. if (! v[i].empty()) s << v[i] << endl; } } return s; } PRNetAddr & copyNetAddr (PRNetAddr &x, const PRNetAddr &y) { PRUint32 saveScope = 0; // For IPv6 addresses, don't overwrite the scope_id of x unless x is uninitialized or it is 0. if (x.raw.family == PR_AF_INET6) saveScope = x.ipv6.scope_id; x = y; if (saveScope != 0) x.ipv6.scope_id = saveScope; return x; } bool operator== (const PRNetAddr &x, const PRNetAddr &y) { // Same address family? if (x.raw.family != y.raw.family) return false; switch (x.raw.family) { case PR_AF_INET6: // If both scope ids are set, compare them. if (x.ipv6.scope_id != 0 && y.ipv6.scope_id != 0 && x.ipv6.scope_id != y.ipv6.scope_id) return false; // not equal // Scope is not a factor. Compare the address bits return memcmp (& x.ipv6.ip, & y.ipv6.ip, sizeof(x.ipv6.ip)) == 0; case PR_AF_INET: return x.inet.ip == y.inet.ip; default: break; } return false; } bool operator!= (const PRNetAddr &x, const PRNetAddr &y) { return !(x == y); } static PRIPv6Addr & copyAddress (PRIPv6Addr &PRin6, const in6_addr &in6) { // The NSPR type is a typedef of struct in6_addr, but C++ won't let us copy it assert (sizeof (PRin6) == sizeof (in6)); memcpy (& PRin6, & in6, sizeof (PRin6)); return PRin6; } // Return the default server specification, used when none is given on the // command line. static string default_server_spec (const systemtap_session &s) { // If --privilege=X has been used, where X is not stapdev, // the default is online,trusted,compatible,signer // otherwise // the default is online,trusted,compatible // // Having said that, // 'online' and 'compatible' will only succeed if we have avahi // 'trusted' and 'signer' will only succeed if we have NSS // string working_string = "online,trusted,compatible"; if (! pr_contains (s.privilege, pr_stapdev)) working_string += ",signer"; return working_string; } static int server_spec_to_pmask (const string &server_spec) { // Construct a mask of the server properties that have been requested. // The available properties are: // trusted - servers which are trusted SSL peers. // online - online servers. // compatible - servers which compile for the current kernel release // and architecture. // signer - servers which are trusted module signers. // specified - servers which have been specified using --use-server=XXX. // If no servers have been specified, then this is // equivalent to --list-servers=trusted,online,compatible. // all - all trusted servers, trusted module signers, // servers currently online and specified servers. string working_spec = server_spec; vector properties; tokenize (working_spec, properties, ","); int pmask = 0; unsigned limit = properties.size (); for (unsigned i = 0; i < limit; ++i) { const string &property = properties[i]; // Tolerate (and ignore) empty properties. if (property.empty ()) continue; if (property == "all") { pmask |= compile_server_all; } else if (property == "specified") { pmask |= compile_server_specified; } else if (property == "trusted") { pmask |= compile_server_trusted; } else if (property == "online") { pmask |= compile_server_online; } else if (property == "compatible") { pmask |= compile_server_compatible; } else if (property == "signer") { pmask |= compile_server_signer; } else { // XXX PR13274 needs-session to use print_warning() clog << _F("WARNING: unsupported compile server property: %s", property.c_str()) << endl; } } return pmask; } void query_server_status (systemtap_session &s) { unsigned limit = s.server_status_strings.size (); for (unsigned i = 0; i < limit; ++i) query_server_status (s, s.server_status_strings[i]); } static void query_server_status (systemtap_session &s, const string &status_string) { // If this string is empty, then the default is "specified" string working_string = status_string; if (working_string.empty ()) working_string = "specified"; // If the query is "specified" and no servers have been specified // (i.e. --use-server not used or used with no argument), then // use the default query. // TODO: This may not be necessary. The underlying queries should handle // "specified" properly. if (working_string == "specified" && (s.specified_servers.empty () || (s.specified_servers.size () == 1 && s.specified_servers[0].empty ()))) working_string = default_server_spec (s); int pmask = server_spec_to_pmask (working_string); // Now obtain a list of the servers which match the criteria. vector raw_servers; get_server_info (s, pmask, raw_servers); // Augment the listing with as much information as possible by adding // information from known servers. vector servers; get_all_server_info (s, servers); keep_common_server_info (raw_servers, servers); // Sort the list of servers into a preferred order. preferred_order (servers); // Print the server information. Skip the empty entry at the head of the list. clog << _F("Systemtap Compile Server Status for '%s'", working_string.c_str()) << endl; bool found = false; unsigned limit = servers.size (); for (unsigned i = 0; i < limit; ++i) { assert (! servers[i].empty ()); // Don't list servers with no cert information. They may not actually // exist. // TODO: Could try contacting the server and obtaining its cert if (servers[i].certinfo.empty ()) continue; clog << servers[i] << endl; found = true; } if (! found) clog << _("No servers found") << endl; } // Add or remove trust of the servers specified on the command line. void manage_server_trust (systemtap_session &s) { // This function should do nothing if we don't have NSS. // Nothing to do if --trust-servers was not specified. if (s.server_trust_spec.empty ()) return; // Break up and analyze the trust specification. Recognized components are: // ssl - trust the specified servers as ssl peers // signer - trust the specified servers as module signers // revoke - revoke the requested trust // all-users - apply/revoke the requested trust for all users // no-prompt - don't prompt the user for confirmation vectorcomponents; tokenize (s.server_trust_spec, components, ","); bool ssl = false; bool signer = false; bool revoke = false; bool all_users = false; bool no_prompt = false; bool error = false; for (vector::const_iterator i = components.begin (); i != components.end (); ++i) { if (*i == "ssl") ssl = true; else if (*i == "signer") { if (geteuid () != 0) { clog << _("Only root can specify 'signer' on --trust-servers") << endl; error = true; } else signer = true; } else if (*i == "revoke") revoke = true; else if (*i == "all-users") { if (geteuid () != 0) { clog << _("Only root can specify 'all-users' on --trust-servers") << endl; error = true; } else all_users = true; } else if (*i == "no-prompt") no_prompt = true; else s.print_warning("Unrecognized server trust specification: " + *i); } if (error) return; // Make sure NSPR is initialized s.NSPR_init (); // Now obtain the list of specified servers. vector server_list; get_specified_server_info (s, server_list, true/*no_default*/); // Did we identify any potential servers? unsigned limit = server_list.size (); if (limit == 0) { clog << _("No servers identified for trust") << endl; return; } // Create a string representing the request in English. // If neither 'ssl' or 'signer' was specified, the default is 'ssl'. if (! ssl && ! signer) ssl = true; ostringstream trustString; if (ssl) { trustString << _("as an SSL peer"); if (all_users) trustString << _(" for all users"); else trustString << _(" for the current user"); } if (signer) { if (ssl) trustString << _(" and "); trustString << _("as a module signer for all users"); } // Prompt the user to confirm what's about to happen. if (no_prompt) { if (revoke) clog << _("Revoking trust "); else clog << _("Adding trust "); } else { if (revoke) clog << _("Revoke trust "); else clog << _("Add trust "); } clog << _F("in the following servers %s", trustString.str().c_str()); if (! no_prompt) clog << '?'; clog << endl; for (unsigned i = 0; i < limit; ++i) clog << " " << server_list[i] << endl; if (! no_prompt) { clog << "[y/N] " << flush; // Only carry out the operation if the response is "yes" string response; cin >> response; if (response[0] != 'y' && response [0] != 'Y') { clog << _("Server trust unchanged") << endl; return; } } // Now add/revoke the requested trust. string cert_db_path; if (ssl) { if (all_users) cert_db_path = global_ssl_cert_db_path (); else cert_db_path = private_ssl_cert_db_path (); if (revoke) revoke_server_trust (s, cert_db_path, server_list); else add_server_trust (s, cert_db_path, server_list); } if (signer) { cert_db_path = signing_cert_db_path (); if (revoke) revoke_server_trust (s, cert_db_path, server_list); else add_server_trust (s, cert_db_path, server_list); } } static compile_server_cache* cscache(systemtap_session& s) { if (!s.server_cache) s.server_cache = new compile_server_cache(); return s.server_cache; } static void get_server_info ( systemtap_session &s, int pmask, vector &servers ) { // Get information on compile servers matching the requested criteria. // The order of queries is significant. Accumulating queries must go first // followed by accumulating/filtering queries. bool keep = false; if (((pmask & compile_server_all))) { get_all_server_info (s, servers); keep = true; } // Add the specified servers, if requested if ((pmask & compile_server_specified)) { get_specified_server_info (s, servers); keep = true; } // Now filter or accumulate the list depending on whether a query has // already been made. if ((pmask & compile_server_online)) { get_or_keep_online_server_info (s, servers, keep); keep = true; } if ((pmask & compile_server_trusted)) { get_or_keep_trusted_server_info (s, servers, keep); keep = true; } if ((pmask & compile_server_signer)) { get_or_keep_signing_server_info (s, servers, keep); keep = true; } if ((pmask & compile_server_compatible)) { get_or_keep_compatible_server_info (s, servers, keep); keep = true; } } // Get information about all online servers as well as servers trusted // as SSL peers and servers trusted as signers. static void get_all_server_info ( systemtap_session &s, vector &servers ) { // We only need to obtain this once per session. This is a good thing(tm) // since obtaining this information is expensive. vector& all_servers = cscache(s)->all_servers; if (all_servers.empty ()) { get_or_keep_online_server_info (s, all_servers, false/*keep*/); get_or_keep_trusted_server_info (s, all_servers, false/*keep*/); get_or_keep_signing_server_info (s, all_servers, false/*keep*/); if (s.verbose >= 4) { clog << _("All known servers:") << endl; clog << all_servers; } } // Add the information, but not duplicates. add_server_info (all_servers, servers); } static void get_default_server_info ( systemtap_session &s, vector &servers ) { if (s.verbose >= 3) clog << _("Using the default servers") << endl; // We only need to obtain this once per session. This is a good thing(tm) // since obtaining this information is expensive. vector& default_servers = cscache(s)->default_servers; if (default_servers.empty ()) { // Get the required information. // get_server_info will add an empty entry at the beginning to indicate // that the search has been performed, in case the search comes up empty. int pmask = server_spec_to_pmask (default_server_spec (s)); get_server_info (s, pmask, default_servers); if (s.verbose >= 3) { clog << _("Default servers are:") << endl; clog << default_servers; } } // Add the information, but not duplicates. add_server_info (default_servers, servers); } static bool isPort (const char *pstr, compile_server_info &server_info) { errno = 0; char *estr; unsigned long p = strtoul (pstr, & estr, 10); if (errno != 0 || *estr != '\0' || p > USHRT_MAX) { clog << _F("Invalid port number specified: %s", pstr) << endl; return false; } server_info.port = p; server_info.fully_specified = true; return true; } static bool isIPv6 (const string &server, compile_server_info &server_info) { // An IPv6 address is 8 hex components separated by colons. // One contiguous block of zero segments in the address may be elided using ::. // An interface may be specified by appending %IF_NAME to the address (e.g. %eth0). // A port may be specified by enclosing the ip address in [] and adding :. // Allow a bracketed address without a port. assert (! server.empty()); string ip; string::size_type portIx; if (server[0] == '[') { string::size_type endBracket = server.find (']'); if (endBracket == string::npos) return false; // Not a valid IPv6 address // Extract the address. ip = server.substr (1, endBracket - 1); portIx = endBracket + 1; } else { ip = server; portIx = string::npos; } // Find out how many components there are. The maximum is 8 unsigned empty = 0; vector components; tokenize_full (ip, components, ":"); if (components.size() > 8) return false; // Not a valid IPv6 address // The components must be either hex values between 0 and 0xffff, or must be empty. // There can be only one empty component. string interface; for (unsigned i = 0; i < components.size(); ++i) { if (components[i].empty()) { if (++empty > 1) return false; // Not a valid IPv6 address } // If it's the final component, see if it specifies the interface. If so, strip it from the // component in order to simplify parsing. It still remains as part of the original ip address // string. if (i == components.size() - 1) { size_t ix = components[i].find ('%'); if (ix != string::npos) { interface = components[i].substr(ix); components[i] = components[i].substr(0, ix); } } // Skip leading zeroes. unsigned j; for (j = 0; j < components[i].size(); ++j) { if (components[i][j] != '0') break; } // Max of 4 hex digits if (components[i].size() - j > 4) return false; // Not a valid IPv6 address for (/**/; j < components[i].size(); ++j) { if (! isxdigit (components[i][j])) return false; // Not a valid IPv6 address } } // If there is no empty component, then there must be exactly 8 components. if (! empty && components.size() != 8) return false; // Not a valid IPv6 address // Try to convert the string to an address. PRStatus prStatus = PR_StringToNetAddr (ip.c_str(), & server_info.address); if (prStatus != PR_SUCCESS) return false; // Examine the optional port if (portIx != string::npos) { string port = server.substr (portIx); if (port.size() != 0) { if (port.size() < 2 || port[0] != ':') return false; // Not a valid Port port = port.substr (1); if (! isPort (port.c_str(), server_info)) return false; // not a valid port } } else server_info.port = 0; return true; // valid IPv6 address. } static bool isIPv4 (const string &server, compile_server_info &server_info) { // An IPv4 address is 4 decimal components separated by periods with an // additional optional decimal port separated from the address by a colon. assert (! server.empty()); // Find out how many components there are. The maximum is 8 vector components; tokenize (server, components, ":"); if (components.size() > 2) return false; // Not a valid IPv4 address // Separate the address from the port (if any). string addr; string port; if (components.size() <= 1) addr = server; else { addr = components[0]; port = components[1]; } // Separate the address components. // There must be exactly 4 components. components.clear (); tokenize (addr, components, "."); if (components.size() != 4) return false; // Not a valid IPv4 address // The components must be decimal values between 0 and 255. for (unsigned i = 0; i < components.size(); ++i) { if (components[i].empty()) return false; // Not a valid IPv4 address errno = 0; char *estr; long p = strtol (components[i].c_str(), & estr, 10); if (errno != 0 || *estr != '\0' || p < 0 || p > 255) return false; // Not a valid IPv4 address } // Try to convert the string to an address. PRStatus prStatus = PR_StringToNetAddr (addr.c_str(), & server_info.address); if (prStatus != PR_SUCCESS) return false; // Examine the optional port if (! port.empty ()) { if (! isPort (port.c_str(), server_info)) return false; // not a valid port } else server_info.port = 0; return true; // valid IPv4 address. } static bool isCertSerialNumber (const string &server, compile_server_info &server_info) { // This function assumes that we have already ruled out the server spec being an IPv6 address. // Certificate serial numbers are 5 fields separated by colons plus an optional 6th decimal // field specifying a port. assert (! server.empty()); string host = server; vector components; tokenize (host, components, ":"); switch (components.size ()) { case 6: if (! isPort (components.back().c_str(), server_info)) return false; // not a valid port host = host.substr (0, host.find_last_of (':')); // fall through case 5: server_info.certinfo = host; break; default: return false; // not a cert serial number } return true; // valid cert serial number and optional port } static bool isDomain (const string &server, compile_server_info &server_info) { // Accept one or two components separated by a colon. The first will be the domain name and // the second must a port number. assert (! server.empty()); string host = server; vector components; tokenize (host, components, ":"); switch (components.size ()) { case 2: if (! isPort (components.back().c_str(), server_info)) return false; // not a valid port host = host.substr (0, host.find_last_of (':')); // fall through case 1: server_info.host_name = host; break; default: return false; // not a valid domain name } return true; } static void get_specified_server_info ( systemtap_session &s, vector &servers, bool no_default ) { // We only need to obtain this once per session. This is a good thing(tm) // since obtaining this information is expensive. vector& specified_servers = cscache(s)->specified_servers; if (specified_servers.empty ()) { // Maintain an empty entry to indicate that this search has been // performed, in case the search comes up empty. specified_servers.push_back (compile_server_info ()); // If --use-server was not specified at all, then return info for the // default server list. if (s.specified_servers.empty ()) { if (s.verbose >= 3) clog << _("No servers specified") << endl; if (! no_default) get_default_server_info (s, specified_servers); } else { // Iterate over the specified servers. For each specification, add to // the list of servers. unsigned num_specified_servers = s.specified_servers.size (); for (unsigned i = 0; i < num_specified_servers; ++i) { string &server = s.specified_servers[i]; // If no specific server(s) specified, then use the default servers. if (server.empty ()) { if (s.verbose >= 3) clog << _("No servers specified") << endl; if (! no_default) get_default_server_info (s, specified_servers); continue; } // Determine what has been specified. Servers may be specified by: // - domain{:port} // - certificate-serial-number{:port} // - IPv4-address{:port} // - IPv6-address{:port} // where items within {} are optional. // Check for IPv6 addresses first. It reduces the amount of checking necessary for // certificate serial numbers. compile_server_info server_info; vector resolved_servers; if (isIPv6 (server, server_info) || isIPv4 (server, server_info) || isCertSerialNumber (server, server_info)) { // An address or cert serial number has been specified. // No resolution is needed. resolved_servers.push_back (server_info); } else if (isDomain (server, server_info)) { // Try to resolve the given name. resolve_host (s, server_info, resolved_servers); } else { clog << _F("Invalid server specification for --use-server: %s", server.c_str()) << endl; continue; } // Now examine the server(s) identified and add them to the list of specified // servers. vector known_servers; vector new_servers; for (vector::iterator i = resolved_servers.begin(); i != resolved_servers.end(); ++i) { // If this item was fully specified, then just add it. if (i->fully_specified) add_server_info (*i, new_servers); else { // It was not fully specified, so we need additional info. Try // to get it by matching what we have against other known servers. if (known_servers.empty ()) get_all_server_info (s, known_servers); // See if this server spec matches that of a known server vector matched_servers = known_servers; keep_common_server_info (*i, matched_servers); // If this server spec matches one or more known servers, then add the // augmented info to the specified_servers. Otherwise, if this server // spec is complete, then add it directly. Otherwise this server spec // is incomplete. if (! matched_servers.empty()) add_server_info (matched_servers, new_servers); else if (i->isComplete ()) add_server_info (*i, new_servers); else if (s.verbose >= 3) clog << _("Incomplete server spec: ") << *i << endl; } } if (s.verbose >= 3) { clog << _F("Servers matching %s: ", server.c_str()) << endl; clog << new_servers; } // Add the newly identified servers to the list. if (! new_servers.empty()) add_server_info (new_servers, specified_servers); } // Loop over --use-server options } // -- use-server specified if (s.verbose >= 2) { clog << _("All specified servers:") << endl; clog << specified_servers; } } // Server information is not cached // Add the information, but not duplicates. add_server_info (specified_servers, servers); } static void get_or_keep_trusted_server_info ( systemtap_session &s, vector &servers, bool keep ) { // If we're filtering the list and it's already empty, then // there's nothing to do. if (keep && servers.empty ()) return; // We only need to obtain this once per session. This is a good thing(tm) // since obtaining this information is expensive. vector& trusted_servers = cscache(s)->trusted_servers; if (trusted_servers.empty ()) { // Maintain an empty entry to indicate that this search has been // performed, in case the search comes up empty. trusted_servers.push_back (compile_server_info ()); // Check the private database first. string cert_db_path = private_ssl_cert_db_path (); get_server_info_from_db (s, trusted_servers, cert_db_path); // Now check the global database. cert_db_path = global_ssl_cert_db_path (); get_server_info_from_db (s, trusted_servers, cert_db_path); if (s.verbose >= 5) { clog << _("All servers trusted as ssl peers:") << endl; clog << trusted_servers; } } // Server information is not cached if (keep) { // Filter the existing vector by keeping the information in common with // the trusted_server vector. keep_common_server_info (trusted_servers, servers); } else { // Add the information, but not duplicates. add_server_info (trusted_servers, servers); } } static void get_or_keep_signing_server_info ( systemtap_session &s, vector &servers, bool keep ) { // If we're filtering the list and it's already empty, then // there's nothing to do. if (keep && servers.empty ()) return; // We only need to obtain this once per session. This is a good thing(tm) // since obtaining this information is expensive. vector& signing_servers = cscache(s)->signing_servers; if (signing_servers.empty ()) { // Maintain an empty entry to indicate that this search has been // performed, in case the search comes up empty. signing_servers.push_back (compile_server_info ()); // For all users, check the global database. string cert_db_path = signing_cert_db_path (); get_server_info_from_db (s, signing_servers, cert_db_path); if (s.verbose >= 5) { clog << _("All servers trusted as module signers:") << endl; clog << signing_servers; } } // Server information is not cached if (keep) { // Filter the existing vector by keeping the information in common with // the signing_server vector. keep_common_server_info (signing_servers, servers); } else { // Add the information, but not duplicates. add_server_info (signing_servers, servers); } } static void get_or_keep_compatible_server_info ( systemtap_session &s, vector &servers, bool keep ) { #if HAVE_AVAHI // If we're filtering the list and it's already empty, then // there's nothing to do. if (keep && servers.empty ()) return; // Remove entries for servers incompatible with the host environment // from the given list of servers. // A compatible server compiles for the kernel release and architecture // of the host environment. // // Compatibility can only be determined for online servers. So, augment // and filter the information we have with information for online servers. vector online_servers; get_or_keep_online_server_info (s, online_servers, false/*keep*/); if (keep) keep_common_server_info (online_servers, servers); else add_server_info (online_servers, servers); // Now look to see which ones are compatible. // The vector can change size as we go, so be careful!! for (unsigned i = 0; i < servers.size (); /**/) { // Retain empty entries. assert (! servers[i].empty ()); // Check the target of the server. if (servers[i].sysinfo != s.kernel_release + " " + s.architecture) { // Target platform mismatch. servers.erase (servers.begin () + i); continue; } // If the client requires secure boot signing, make sure the // server has the right MOK. if (! s.mok_fingerprints.empty ()) { // This server has no MOKs. if (servers[i].mok_fingerprints.empty ()) { servers.erase (servers.begin () + i); continue; } // Make sure the server has at least one MOK in common with // the client. vector::const_iterator it; bool mok_found = false; for (it = s.mok_fingerprints.begin(); it != s.mok_fingerprints.end(); it++) { if (find(servers[i].mok_fingerprints.begin(), servers[i].mok_fingerprints.end(), *it) != servers[i].mok_fingerprints.end ()) { mok_found = true; break; } } // This server has no MOK in common with the client. if (! mok_found) { servers.erase (servers.begin () + i); continue; } } // The server is compatible. Leave it in the list. ++i; } #else // ! HAVE_AVAHI // Without Avahi, we can't obtain the target platform of the server. // Issue a warning. if (s.verbose >= 2) clog << _("Unable to detect server compatibility without avahi") << endl; if (keep) servers.clear (); #endif } static void keep_server_info_with_cert_and_port ( systemtap_session &, const compile_server_info &server, vector &servers ) { assert (! server.certinfo.empty ()); // Search the list of servers for ones matching the // serial number specified. // The vector can change size as we go, so be careful!! for (unsigned i = 0; i < servers.size (); /**/) { // Retain empty entries. if (servers[i].empty ()) { ++i; continue; } if (servers[i].certinfo == server.certinfo && (servers[i].port == 0 || server.port == 0 || servers[i].port == server.port)) { // If the server is not online, then use the specified // port, if any. if (servers[i].port == 0) { servers[i].port = server.port; servers[i].fully_specified = server.fully_specified; } ++i; continue; } // The item does not match. Delete it. servers.erase (servers.begin () + i); } } // Obtain missing host name or ip address, if any. Return 0 on success. static void resolve_host ( systemtap_session& s, compile_server_info &server, vector &resolved_servers ) { vector& cached_hosts = cscache(s)->resolved_hosts[server.host_name]; if (cached_hosts.empty ()) { // The server's host_name member is a string containing either a host name or an ip address. // Either is acceptable for lookup. const char *lookup_name = server.host_name.c_str(); if (s.verbose >= 6) clog << _F("Looking up %s", lookup_name) << endl; struct addrinfo hints; memset(& hints, 0, sizeof (hints)); hints.ai_family = AF_UNSPEC; // AF_INET or AF_INET6 to force version struct addrinfo *addr_info = 0; int rc = getaddrinfo (lookup_name, NULL, & hints, & addr_info); // Failure to resolve will result in an appropriate message later, if other methods fail. if (rc != 0) { if (s.verbose >= 6) clog << _F("%s not found: %s", lookup_name, gai_strerror (rc)) << endl; } else { // Loop over the results collecting information. assert (addr_info); for (const struct addrinfo *ai = addr_info; ai != NULL; ai = ai->ai_next) { PRNetAddr new_address; // We support IPv4 and IPv6, Ignore other protocols, if (ai->ai_family == AF_INET) { // IPv4 Address struct sockaddr_in *ip = (struct sockaddr_in *)ai->ai_addr; new_address.inet.family = PR_AF_INET; new_address.inet.ip = ip->sin_addr.s_addr; } else if (ai->ai_family == AF_INET6) { // IPv6 Address struct sockaddr_in6 *ip = (struct sockaddr_in6 *)ai->ai_addr; new_address.ipv6.family = PR_AF_INET6; new_address.ipv6.scope_id = ip->sin6_scope_id; copyAddress (new_address.ipv6.ip, ip->sin6_addr); } else continue; // Try to obtain a host name. Otherwise, leave it empty. char hbuf[NI_MAXHOST]; int status = getnameinfo (ai->ai_addr, ai->ai_addrlen, hbuf, sizeof (hbuf), NULL, 0, NI_NAMEREQD | NI_IDN); if (status != 0) hbuf[0] = '\0'; cached_hosts.push_back(resolved_host(hbuf, new_address)); } } if (addr_info) freeaddrinfo (addr_info); // free the linked list } // If no addresses were resolved, then return the info we were given. if (cached_hosts.empty()) add_server_info (server, resolved_servers); else { // We will add a new server for each address resolved vector new_servers; for (vector::const_iterator it = cached_hosts.begin(); it != cached_hosts.end(); ++it) { // Start with the info we were given compile_server_info new_server = server; // NB: do not overwrite port info if (it->address.raw.family == AF_INET) { new_server.address.inet.family = PR_AF_INET; new_server.address.inet.ip = it->address.inet.ip; } else // AF_INET6 { new_server.address.ipv6.family = PR_AF_INET6; new_server.address.ipv6.scope_id = it->address.ipv6.scope_id; new_server.address.ipv6.ip = it->address.ipv6.ip; } if (!it->host_name.empty()) new_server.host_name = it->host_name; add_server_info (new_server, new_servers); } if (s.verbose >= 6) { clog << _F("%s resolves to:", server.host_name.c_str()) << endl; clog << new_servers; } add_server_info (new_servers, resolved_servers); } } #if HAVE_AVAHI // Avahi API Callbacks. //----------------------------------------------------------------------- struct browsing_context { AvahiSimplePoll *simple_poll; AvahiClient *client; vector *servers; }; // Get the value of the requested key from the Avahi string list. static string get_value_from_avahi_string_list (AvahiStringList *strlst, const string &key) { AvahiStringList *p = avahi_string_list_find (strlst, key.c_str ()); if (p == NULL) { // Key not found. return ""; } char *k, *v; int rc = avahi_string_list_get_pair(p, &k, &v, NULL); if (rc < 0 || v == NULL) { avahi_free (k); return ""; } string value = v; avahi_free (k); avahi_free (v); return value; } // Get a vector of values of the requested key from the Avahi string // list. This is for multiple values having the same key. static void get_values_from_avahi_string_list (AvahiStringList *strlst, const string &key, vector &value_vector) { AvahiStringList *p; value_vector.clear(); p = avahi_string_list_find (strlst, key.c_str ()); for (; p != NULL; p = avahi_string_list_get_next(p)) { char *k, *v; int rc = avahi_string_list_get_pair(p, &k, &v, NULL); if (rc < 0 || v == NULL) { avahi_free (k); break; } value_vector.push_back(v); avahi_free (k); avahi_free (v); } return; } extern "C" void resolve_callback( AvahiServiceResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char *name, const char *type, const char *domain, const char *host_name, const AvahiAddress *address, uint16_t port, AvahiStringList *txt, AvahiLookupResultFlags /*flags*/, AVAHI_GCC_UNUSED void* userdata) { PRStatus prStatus; assert(r); const browsing_context *context = (browsing_context *)userdata; vector *servers = context->servers; // Called whenever a service has been resolved successfully or timed out. switch (event) { case AVAHI_RESOLVER_FAILURE: clog << _F("Failed to resolve service '%s' of type '%s' in domain '%s': %s", name, type, domain, avahi_strerror(avahi_client_errno(avahi_service_resolver_get_client(r)))) << endl; break; case AVAHI_RESOLVER_FOUND: { compile_server_info info; // Decode the address. char a[AVAHI_ADDRESS_STR_MAX]; avahi_address_snprint(a, sizeof(a), address); prStatus = PR_StringToNetAddr (a, & info.address); if (prStatus != PR_SUCCESS) { clog << _F("Invalid address '%s' from avahi", a) << endl; break; } // We support both IPv4 and IPv6. Ignore other protocols. if (protocol == AVAHI_PROTO_INET6) { info.address.ipv6.family = PR_AF_INET6; info.address.ipv6.scope_id = interface; info.port = port; } else if (protocol == AVAHI_PROTO_INET) { info.address.inet.family = PR_AF_INET; info.port = port; } else break; // Save the host name. info.host_name = host_name; // Save the text tags. info.sysinfo = get_value_from_avahi_string_list (txt, "sysinfo"); info.certinfo = get_value_from_avahi_string_list (txt, "certinfo"); info.version = get_value_from_avahi_string_list (txt, "version"); if (info.version.empty ()) info.version = "1.0"; // default version is 1.0 // The server might provide one or more MOK certificate's // info. get_values_from_avahi_string_list(txt, "mok_info", info.mok_fingerprints); // Add this server to the list of discovered servers. add_server_info (info, *servers); break; } default: break; } avahi_service_resolver_free(r); } extern "C" void browse_callback( AvahiServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void* userdata) { browsing_context *context = (browsing_context *)userdata; AvahiClient *c = context->client; AvahiSimplePoll *simple_poll = context->simple_poll; assert(b); // Called whenever a new services becomes available on the LAN or is removed from the LAN. switch (event) { case AVAHI_BROWSER_FAILURE: clog << _F("Avahi browse failed: %s", avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b)))) << endl; avahi_simple_poll_quit(simple_poll); break; case AVAHI_BROWSER_NEW: // We ignore the returned resolver object. In the callback // function we free it. If the server is terminated before // the callback function is called the server will free // the resolver for us. if (!(avahi_service_resolver_new(c, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, (AvahiLookupFlags)0, resolve_callback, context))) { clog << _F("Failed to resolve service '%s': %s", name, avahi_strerror(avahi_client_errno(c))) << endl; } break; case AVAHI_BROWSER_REMOVE: case AVAHI_BROWSER_ALL_FOR_NOW: case AVAHI_BROWSER_CACHE_EXHAUSTED: break; } } extern "C" void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) { assert(c); browsing_context *context = (browsing_context *)userdata; AvahiSimplePoll *simple_poll = context->simple_poll; // Called whenever the client or server state changes. if (state == AVAHI_CLIENT_FAILURE) { clog << _F("Avahi Server connection failure: %s", avahi_strerror(avahi_client_errno(c))) << endl; avahi_simple_poll_quit(simple_poll); } } extern "C" void timeout_callback(AVAHI_GCC_UNUSED AvahiTimeout *e, AVAHI_GCC_UNUSED void *userdata) { browsing_context *context = (browsing_context *)userdata; AvahiSimplePoll *simple_poll = context->simple_poll; avahi_simple_poll_quit(simple_poll); } #endif // HAVE_AVAHI static void get_or_keep_online_server_info ( systemtap_session &s, vector &servers, bool keep ) { // If we're filtering the list and it's already empty, then // there's nothing to do. if (keep && servers.empty ()) return; // We only need to obtain this once per session. This is a good thing(tm) // since obtaining this information is expensive. vector& online_servers = cscache(s)->online_servers; if (online_servers.empty ()) { // Maintain an empty entry to indicate that this search has been // performed, in case the search comes up empty. online_servers.push_back (compile_server_info ()); #if HAVE_AVAHI // Must predeclare these due to jumping on error to fail: vector avahi_servers; // Initialize. AvahiClient *client = NULL; AvahiServiceBrowser *sb = NULL; // Allocate main loop object. AvahiSimplePoll *simple_poll; if (!(simple_poll = avahi_simple_poll_new())) { clog << _("Failed to create Avahi simple poll object") << endl; goto fail; } browsing_context context; context.simple_poll = simple_poll; context.servers = & avahi_servers; // Allocate a new Avahi client int error; client = avahi_client_new (avahi_simple_poll_get (simple_poll), (AvahiClientFlags)0, client_callback, & context, & error); // Check whether creating the client object succeeded. if (! client) { clog << _F("Failed to create Avahi client: %s", avahi_strerror(error)) << endl; goto fail; } context.client = client; // Create the service browser. if (!(sb = avahi_service_browser_new (client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_stap._tcp", NULL, (AvahiLookupFlags)0, browse_callback, & context))) { clog << _F("Failed to create Avahi service browser: %s", avahi_strerror(avahi_client_errno(client))) << endl; goto fail; } // Timeout after 0.5 seconds. struct timeval tv; avahi_simple_poll_get(simple_poll)->timeout_new( avahi_simple_poll_get(simple_poll), avahi_elapse_time(&tv, 1000/2, 0), timeout_callback, & context); // Run the main loop. avahi_simple_poll_loop(simple_poll); if (s.verbose >= 6) { clog << _("Avahi reports the following servers online:") << endl; clog << avahi_servers; } // Merge with the list of servers, as obtained by avahi. add_server_info (avahi_servers, online_servers); fail: // Cleanup. if (client) { // Also frees the service browser avahi_client_free(client); } if (simple_poll) avahi_simple_poll_free(simple_poll); #else // ! HAVE_AVAHI // Without Avahi, we can't detect online servers. Issue a warning. if (s.verbose >= 2) clog << _("Unable to detect online servers without avahi") << endl; #endif // ! HAVE_AVAHI if (s.verbose >= 5) { clog << _("All online servers:") << endl; clog << online_servers; } } // Server information is not cached. if (keep) { // Filter the existing vector by keeping the information in common with // the online_server vector. keep_common_server_info (online_servers, servers); } else { // Add the information, but not duplicates. add_server_info (online_servers, servers); } } // Add server info to a list, avoiding duplicates. Merge information from // two duplicate items. static void add_server_info ( const compile_server_info &info, vector& target ) { if (info.empty ()) return; bool found = false; for (vector::iterator i = target.begin (); i != target.end (); ++i) { if (info == *i) { // Duplicate. Merge the two items. merge_server_info (info, *i); found = true; } } if (! found) target.push_back (info); } // Add server info from one vector to another. static void add_server_info ( const vector &source, vector &target ) { for (vector::const_iterator i = source.begin (); i != source.end (); ++i) { add_server_info (*i, target); } } // Filter the vector by keeping information in common with the item. static void keep_common_server_info ( const compile_server_info &info_to_keep, vector &filtered_info ) { assert (! info_to_keep.empty ()); // The vector may change size as we go. Be careful!! for (unsigned i = 0; i < filtered_info.size (); /**/) { // Retain empty entries. if (filtered_info[i].empty ()) { ++i; continue; } if (info_to_keep == filtered_info[i]) { merge_server_info (info_to_keep, filtered_info[i]); ++i; continue; } // The item does not match. Delete it. filtered_info.erase (filtered_info.begin () + i); continue; } } // Filter the second vector by keeping information in common with the first // vector. static void keep_common_server_info ( const vector &info_to_keep, vector &filtered_info ) { // The vector may change size as we go. Be careful!! for (unsigned i = 0; i < filtered_info.size (); /**/) { // Retain empty entries. if (filtered_info[i].empty ()) { ++i; continue; } bool found = false; for (unsigned j = 0; j < info_to_keep.size (); ++j) { if (filtered_info[i] == info_to_keep[j]) { merge_server_info (info_to_keep[j], filtered_info[i]); found = true; } } // If the item was not found. Delete it. Otherwise, advance to the next // item. if (found) ++i; else filtered_info.erase (filtered_info.begin () + i); } } // Merge two compile server info items. static void merge_server_info ( const compile_server_info &source, compile_server_info &target ) { // Copy the host name if the source has one. if (! source.host_name.empty()) target.host_name = source.host_name; // Copy the address unconditionally, if the source has an address, even if they are already // equal. The source address may be an IPv6 address with a scope_id that the target is missing. assert (! target.hasAddress () || ! source.hasAddress () || source.address == target.address); if (source.hasAddress ()) copyNetAddr (target.address, source.address); if (target.port == 0) { target.port = source.port; target.fully_specified = source.fully_specified; } if (target.sysinfo.empty ()) target.sysinfo = source.sysinfo; if (target.version.empty ()) target.version = source.version; if (target.certinfo.empty ()) target.certinfo = source.certinfo; } #if 0 // not used right now // Merge compile server info from one item into a vector. static void merge_server_info ( const compile_server_info &source, vector &target ) { for (vector::iterator i = target.begin (); i != target.end (); ++i) { if (source == *i) merge_server_info (source, *i); } } // Merge compile server from one vector into another. static void merge_server_info ( const vector &source, vector &target ) { for (vector::const_iterator i = source.begin (); i != source.end (); ++i) merge_server_info (*i, target); } #endif #endif // HAVE_NSS /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/csclient.h000066400000000000000000000033361260561570600154070ustar00rootroot00000000000000// -*- C++ -*- // Copyright (C) 2010-2014 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #ifndef CSCLIENT_H #define CSCLIENT_H #if HAVE_NSS #include "cscommon.h" struct compile_server_info; class compile_server_client { public: compile_server_client (systemtap_session &s) : s(s), argc(0), server_version() {} int passes_0_4 (); private: // Client/server session methods. int initialize (); int create_request (); int package_request (); int find_and_connect_to_server (); int unpack_response (); int process_response (); // Client/server utility methods. int include_file_or_directory ( const std::string &subdir, const std::string &path ); int add_package_args (); int add_package_arg (const std::string &arg); int compile_using_server (std::vector &servers); int add_localization_variables(); int read_from_file (const std::string &fname, int &data); template int write_to_file (const std::string &fname, const T &data); int flush_to_stream (const std::string &fname, std::ostream &o); void show_server_compatibility () const; systemtap_session &s; std::vector private_ssl_dbs; std::vector public_ssl_dbs; std::string client_tmpdir; std::string client_zipfile; std::string server_tmpdir; std::string server_zipfile; unsigned argc; cs_protocol_version server_version; }; // Utility functions void query_server_status (systemtap_session &s); void manage_server_trust (systemtap_session &s); #endif // HAVE_NSS #endif // CSCLIENT_H systemtap-2.9/cscommon.cxx000066400000000000000000000060441260561570600157730ustar00rootroot00000000000000/* Compile-server and client common functions Copyright (C) 2011 Red Hat Inc. This file is part of systemtap, and is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License (GPL); either version 2, or (at your option) any later version. */ #include "config.h" // Disable the code in this file if NSS is not available #if HAVE_NSS #include "util.h" #include "cscommon.h" #include #include #include #include #include #include #include extern "C" { #include } using namespace std; cs_protocol_version::~cs_protocol_version () { assert (this->v); free ((void*)this->v); } const cs_protocol_version & cs_protocol_version::operator= (const char *v) { if (this->v) free ((void *)this->v); this->v = strdup (v); return *this; } bool cs_protocol_version::operator< (const cs_protocol_version &that) const { // Compare the levels of each version in turn. vector these_tokens; tokenize (this->v, these_tokens, "."); vector those_tokens; tokenize (that.v, those_tokens, "."); unsigned this_limit = these_tokens.size (); unsigned that_limit = those_tokens.size (); unsigned i; for (i = 0; i < this_limit && i < that_limit; ++i) { char *e; unsigned long this_level = strtoul (these_tokens[i].c_str (), & e, 0); assert (! *e); unsigned long that_level = strtoul (those_tokens[i].c_str (), & e, 0); assert (! *e); if (this_level > that_level) return false; if (this_level < that_level) return true; } // If the other version has more components, then this one is less than that one. if (i < that_limit) { assert (i == this_limit); return true; } // This version is greater than or equal to that one. return false; } int read_from_file (const string &fname, cs_protocol_version &data) { // C++ streams may not set errno in the even of a failure. However if we // set it to 0 before each operation and it gets set during the operation, // then we can use its value in order to determine what happened. string dataStr; errno = 0; ifstream f (fname.c_str ()); if (! f.good ()) { clog << _F("Unable to open file '%s' for reading: ", fname.c_str()); goto error; } // Read the data; errno = 0; f >> dataStr; if (f.fail ()) { clog << _F("Unable to read from file '%s': ", fname.c_str()); goto error; } data = dataStr.c_str (); // NB: not necessary to f.close (); return 0; // Success error: if (errno) clog << strerror (errno) << endl; else clog << _("unknown error") << endl; return 1; // Failure } string get_cert_serial_number (const CERTCertificate *cert) { ostringstream serialNumber; serialNumber << hex << setfill('0') << right; for (unsigned i = 0; i < cert->serialNumber.len; ++i) { if (i > 0) serialNumber << ':'; serialNumber << setw(2) << (unsigned)cert->serialNumber.data[i]; } return serialNumber.str (); } #endif /* HAVE_NSS */ systemtap-2.9/cscommon.h000066400000000000000000000044021260561570600154140ustar00rootroot00000000000000// Common functions and macros used by the compile-server and its client. #ifndef CSCOMMON_H #define CSCOMMON_H 1 #if HAVE_NSS extern "C" { #include #include } #endif // Versioning system for the protocol used for communication between the compile-server and client. // The original version is 1.0. After that, we use the systemtap release number. // // By Policy: // - All servers are backward compatible with clients. Servers adapt to the protocol version // of the client. // - All clients are backward compatible with servers. Clients adapt to the protocol version // of the server. Warnings are issued for servers lacking features. // // Features: // Version 1.0 // Original version // Versions 1.6 and higher // Client: // - Passes localization variables to the server in the file client_tmpdir + "/locale" // - Looks for the uprobes module in server_response + "/uprobes" // - No longer needs to remove stap's "Keeping temporary directory ..." message from // the server's stderr response. // - Looks for 'version' tag in server's avahi record and does not automatically connect to // an incompatible server. Also prefers newer servers over older ones. // Server: // - Applies localization variables passed from the client to stap during translation. // - Looks for the uprobes module in server_response + "/uprobes" // - Uses --tmpdir to specify temp directory to be used by stap, instead of -k, in order to // avoid parsing error messages in search of stap's randomly-generated temp dir. // - Advertises its protocol version using a 'version' tag in avahi. // #define CURRENT_CS_PROTOCOL_VERSION VERSION struct cs_protocol_version { cs_protocol_version (const char *v = "1.0") : v(0) { *this = v; } ~cs_protocol_version (); const cs_protocol_version &operator= (const char *v); bool operator< (const cs_protocol_version &that) const; const char *v; }; #if HAVE_NSS struct thread_arg { PRFileDesc *tcpSocket; CERTCertificate *cert; SECKEYPrivateKey *privKey; PRNetAddr addr; }; extern int read_from_file (const std::string &fname, cs_protocol_version &data); extern std::string get_cert_serial_number (const CERTCertificate *cert); #endif #endif // CSCOMMON_H systemtap-2.9/depcomp000077500000000000000000000560161260561570600150120ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: systemtap-2.9/doc/000077500000000000000000000000001260561570600141725ustar00rootroot00000000000000systemtap-2.9/doc/.gitignore000066400000000000000000000001111260561570600161530ustar00rootroot00000000000000*.aux *.glo *.idx *.log *.lot *.out *.pdf *.toc *.dvi _region_.* langref systemtap-2.9/doc/.latex2html-init000066400000000000000000000021161260561570600172200ustar00rootroot00000000000000$CUSTOM_TITLES = 1; $CUSTOM_TITLES_LENGTH = 6; # modified version of make_long_title # does not include the section number in the title (name) of the file sub custom_title_hook { local($_)= @_; local($num_words) = $CUSTOM_TITLES_LENGTH; #RRM: scan twice for short words, due to the $4 overlap # Cannot use \b , else words break at accented letters $_ =~ s/(^|\s)\s*($GENERIC_WORDS)(\'|(\s))/$4/ig; $_ =~ s/(^|\s)\s*($GENERIC_WORDS)(\'|(\s))/$4/ig; #remove leading numbering, unless that's all there is. local($sec_num); if (!(/^\d+(\.\d*)*\s*$/)&&(s/^\s*(\d+(\.\d*)*)\s*/$sec_num=$1;''/e)) { $num_words-- }; &remove_markers; s/<[^>]*>//g; #remove tags #revert entities, etc. to TeX-form... s/([\200-\377])/"\&#".ord($1).";"/eg; $_ = &revert_to_raw_tex($_); # get $LONG_TITLES number of words from what remains $_ = &get_first_words($_, $num_words) if ($num_words); # ...and cleanup accents, spaces and punctuation $_ = join('', (0 ? $sec_num : ''), $_); s/\\\W\{?|\}//g; s/\s/_/g; s/\W/_/g; s/__+/_/g; s/_+$//; $_; } systemtap-2.9/doc/Language_Reference_Guide/000077500000000000000000000000001260561570600210105ustar00rootroot00000000000000systemtap-2.9/doc/Language_Reference_Guide/Makefile000066400000000000000000000006731260561570600224560ustar00rootroot00000000000000#Makefile for Language_Reference_Guide XML_LANG = en-US DOCNAME = Language_Reference_Guide PRODUCT = Fedora BRAND = fedora CHUNK_SECTION_DEPTH=1 #OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW # Extra Parameters start here # Extra Parameters stop here COMMON_CONFIG = /usr/share/publican include $(COMMON_CONFIG)/make/Makefile.common systemtap-2.9/doc/Language_Reference_Guide/README000066400000000000000000000016541260561570600216760ustar00rootroot00000000000000This is an automated source build of the Language Reference Guide, used to build it in Publican. To build the source, run: bash publicanize-langref.sh This will copy the LaTeX source of the Language Reference Guide and convert it to DocBook XML. You can now build it in pdf, html, etc using Publican. The main source of the Language Reference Guide is in: ../langref.tex As such, any revisions to this document should be applied to ../langref.tex, not to the source in this directory. IMPORTANT: The publicanize-langref.sh script uses latexml to create the raw XML files from langref.tex first before cleaning it up for Publican. You will need LaTeXML along with all its required perl modules to use publicanize-langref.sh. For more information on building from source, downloading, and installing LaTeXML, refer to the following URLs: http://dlmf.nist.gov/LaTeXML/download.html http://dlmf.nist.gov/LaTeXML/install.html systemtap-2.9/doc/Language_Reference_Guide/en-US/000077500000000000000000000000001260561570600217375ustar00rootroot00000000000000systemtap-2.9/doc/Language_Reference_Guide/en-US/Author_Group.xml000066400000000000000000000006121260561570600250760ustar00rootroot00000000000000 Robb Romans IBM Documentation robb@linux.vnet.ibm.com systemtap-2.9/doc/Language_Reference_Guide/en-US/Book_Info.xml000066400000000000000000000042401260561570600243260ustar00rootroot00000000000000 Language Reference Guide A guide to the constructs and syntax used in SystemTap scripts Fedora 10 1 1 The SystemTap Language Reference Guide is a comprehensive reference of the language constructs and syntax used in SystemTap scripts. It is suitable for users who have intermediate to advanced knowledge of SystemTap. For other available SystemTap documentation, refer to . Logo Copyright © 2007 Red Hat Inc., Copyright © 2007 IBM Corp., Copyright © 2007 Intel Corporation. This document was derived from other documents contributed to the SystemTap project by employees of Red Hat, IBM and Intel. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. The GNU Free Documentation License is available from or by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. systemtap-2.9/doc/Language_Reference_Guide/en-US/Language_Reference_Guide.ent000066400000000000000000000001071260561570600272630ustar00rootroot00000000000000 systemtap-2.9/doc/Language_Reference_Guide/en-US/Preface.xml000066400000000000000000000011171260561570600240260ustar00rootroot00000000000000 Preface systemtap-2.9/doc/Language_Reference_Guide/en-US/Revision_History.xml000066400000000000000000000011031260561570600257730ustar00rootroot00000000000000 Revision History 1.0 systemtap-2.9/doc/Language_Reference_Guide/en-US/images/000077500000000000000000000000001260561570600232045ustar00rootroot00000000000000systemtap-2.9/doc/Language_Reference_Guide/en-US/images/icon.svg000066400000000000000000003301271260561570600246630ustar00rootroot00000000000000 image/svg+xml id="path2858" /> systemtap-2.9/doc/Language_Reference_Guide/publicanize-langref.sh000077500000000000000000000204551260561570600252760ustar00rootroot00000000000000#!/bin/bash #this script converts the langref.tex source for the Language Reference Guide into #DocBook XML. the conversion is done thru latexml, a utility that comes with dblatex-0.2.7. #the output xml file of latexml is pretty dirty, so this script is needed to further clean it up. #copy latex file to here cp ../langref.tex . #convert it to raw xml latexml langref.tex --dest=Language_Reference_Guide.xml #remove excess whitespace sed -i -e 's/^\s*//g' Language_Reference_Guide.xml sed -i -e 's///g' Language_Reference_Guide.xml cat Language_Reference_Guide.xml | perl -p -e 'undef $/;s|\n<\?latexml options="twoside,english" class="article"\?>\n<\?latexml package="geometry"\?>\n<\?latexml RelaxNGSchema="LaTeXML"\?>\n<\?latexml RelaxNGSchema="LaTeXML"\?>\n\nSystemTap Language Reference|<\!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>\n\n|msg' | perl -p -e 'undef $/;s|\n

This document was derived from other documents contributed to the SystemTap project by employees of Red Hat, IBM and Intel.

\n
\n\n

Copyright © 2007 Red Hat Inc.\nCopyright © 2007 IBM Corp.\nCopyright © 2007 Intel Corporation.

\n
\n\n

Permission is granted to copy, distribute and/or modify this document\nunder the terms of the GNU Free Documentation License, Version 1.2\nor any later version published by the Free Software Foundation;\nwith no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

\n
\n\n

The GNU Free Documentation License is available from\nhttp://www.gnu.org/licenses/fdl.html or by writing to\nthe Free Software Foundation, Inc., 51 Franklin Street,\nFifth Floor, Boston, MA 02110-1301, USA.

\n
||msg' | #fix up screens perl -p -e 'undef $/;s|\n\n||msg' | perl -p -e 'undef $/;s|\n\n\n||msg' | perl -p -e 'undef $/;s|\n\n||msg' | perl -p -e 'undef $/;s|\n\n\n||msg' | #fix up index tags perl -p -e 'undef $/;s|\nIndex\n||msg' | #needed later, for TABLES! perl -p -e 'undef $/;s|\n||msg' > clean.xml #further fix up headers! perl -p -i -e 's|<\?latexml searchpaths="[^>]*>\n||g' clean.xml #change main tags sed -i -e 's/<\/document>/<\/book>/g' clean.xml #more fixup for screen tags perl -p -i -e 's|||g' clean.xml perl -p -i -e 's|||g' clean.xml #clean section tags sed -i -e 's/
/<\/chapter>/g' clean.xml #change subsection and subsubsection tags to section sed -i -e 's//<\/section>/g' clean.xml sed -i -e 's//<\/section>/g' clean.xml #remove with sed -i -e 's///g' clean.xml sed -i -e 's/<\/para>//g' clean.xml sed -i -e 's/

//g' clean.xml sed -i -e 's/<\/p>/<\/para>/g' clean.xml #properly convert xrefs sed -i -e 's//indexterm>/g' clean.xml perl -p -i -e 's///g' clean.xml sed -i -e 's///g' clean.xml sed -i -e 's/<\/indexphrase>/<\/primary>/g' clean.xml #convert s sed -i -e 's/emph>/emphasis>/g' clean.xml #convert itemizedlists and listitems, dependent on successful exec of "fix up screens" perl routines sed -i -e 's///g' clean.xml sed -i -e 's///g' clean.xml sed -i -e 's/<\/itemize>/<\/itemizedlist>/g' clean.xml sed -i -e 's/<\/item>/<\/listitem>/g' clean.xml #convert orderedlists and their respective listitems perl -p -i -e 's|||g' clean.xml perl -p -i -e 's|||g' clean.xml perl -p -i -e 's|||g' clean.xml #TRICKY: this perl expression takes all occurences of # http://sourceware.org/systemtap/wiki/HomePage # and replaces the string with "/>". from jfearn # note: [^"]* means "any number of occurences of characters that are NOT quotes # note: () groups strings/an expression together, which can be called later as $1 when replacing perl -p -i -e 's|([^<]*|$1/>|g' clean.xml #now, convert s sed -i -e 's/ accordingly; bold is , typewriter is perl -p -i -e 's|([^<]*)|$1|g' clean.xml sed -i -e 's///g' clean.xml perl -p -i -e 's|([^<]*)|$1|g' clean.xml sed -i -e 's///g' clean.xml #weird remainders, defaulting them to command perl -p -i -e 's|([^<]*)|$1|g' clean.xml sed -i -e 's///g' clean.xml perl -p -i -e 's|([^<]*)|$1|g' clean.xml sed -i -e 's///g' clean.xml #TABLES! #the first expression is quite dirty, since it assumes that all tables have 3 columns. dunno yet how to #automagicize this, since the orig XML doesn't have any attribute that specifies columns per table sed -i -e 's///g' clean.xml sed -i -e 's/tabular>/tgroup>/g' clean.xml perl -p -i -e 's|)|
]*>||g' clean.xml perl -p -i -e 's|]*>||g' clean.xml perl -p -i -e 's|||g' clean.xml perl -p -i -e 's|||g' clean.xml perl -p -i -e 's|||g' clean.xml perl -p -i -e 's|||g' clean.xml #remove "About this guide" section #perl -p -i -e 'undef $/;s|
\nAbout this guide||msg' clean.xml #finalize: copy clean.xml to en-US, then deletes it cp clean.xml en-US/Language_Reference_Guide.xml #delete excess files rm langref.tex rm clean.xml rm Language_Reference_Guide.xml systemtap-2.9/doc/Makefile.am000066400000000000000000000017451260561570600162350ustar00rootroot00000000000000# Makefile.am --- automake input file for systemtap docs ## process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = subdir-objects PDF_FILES = tutorial.pdf langref.pdf DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap SUBDIRS = SystemTap_Tapset_Reference beginners if BUILD_DOCS all-local: $(PDF_FILES) clean-local: rm -f *.pdf *.out *.log *.aux *.toc *.lot *.idx *.glo *.dvi install-data-hook: $(MKDIR_P) $(DOC_INSTALL_DIR) $(INSTALL_DATA) $(PDF_FILES) $(DOC_INSTALL_DIR) uninstall-local: @list='$(PDF_FILES)'; for p in $$list; do \ echo " rm -f '$(DOC_INSTALL_DIR)/$$p'"; \ rm -f "$(DOC_INSTALL_DIR)/$$p"; \ done endif SUFFIXES = ps pdf dvi ps tex .ps.pdf: ps2pdf -r600 $< .dvi.ps: dvips -t letter -o $@ $< .tex.dvi: pwd=`pwd`; cd $(srcdir); \ latex -output-directory=$$pwd $<; \ touch $*.glo \ makeindex $*.glo -s nomencl.ist -o $*.gls \ latex -output-directory=$$pwd $<; \ latex -output-directory=$$pwd $<; \ latex -output-directory=$$pwd $< systemtap-2.9/doc/Makefile.in000066400000000000000000000432161260561570600162450ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am --- automake input file for systemtap docs VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DYNINST_CXXFLAGS = @DYNINST_CXXFLAGS@ DYNINST_LDFLAGS = @DYNINST_LDFLAGS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAVADIR = @JAVADIR@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LOCALEDIR = @LOCALEDIR@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIECFLAGS = @PIECFLAGS@ PIECXXFLAGS = @PIECXXFLAGS@ PIELDFLAGS = @PIELDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STAP_EXTRA_VERSION = @STAP_EXTRA_VERSION@ STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ avahi_CFLAGS = @avahi_CFLAGS@ avahi_LIBS = @avahi_LIBS@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxx11 = @cxx11@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dracutstap = @dracutstap@ dvidir = @dvidir@ elfutils_abs_srcdir = @elfutils_abs_srcdir@ exec_prefix = @exec_prefix@ have_dvips = @have_dvips@ have_fop = @have_fop@ have_jar = @have_jar@ have_javac = @have_javac@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_xmlto = @have_xmlto@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libvirt_CFLAGS = @libvirt_CFLAGS@ libvirt_LIBS = @libvirt_LIBS@ libxml2_CFLAGS = @libxml2_CFLAGS@ libxml2_LIBS = @libxml2_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ nss_CFLAGS = @nss_CFLAGS@ nss_LIBS = @nss_LIBS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ python = @python@ sbindir = @sbindir@ selinux_CFLAGS = @selinux_CFLAGS@ selinux_LIBS = @selinux_LIBS@ sharedstatedir = @sharedstatedir@ sqlite3_LIBS = @sqlite3_LIBS@ srcdir = @srcdir@ stap_LIBS = @stap_LIBS@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ staprun_LIBS = @staprun_LIBS@ subdirs = @subdirs@ support_section_question = @support_section_question@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = subdir-objects PDF_FILES = tutorial.pdf langref.pdf DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap SUBDIRS = SystemTap_Tapset_Reference beginners SUFFIXES = ps pdf dvi ps tex all: all-recursive .SUFFIXES: .SUFFIXES: ps pdf dvi ps tex .dvi .pdf .ps .tex $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-am: all-am check: check-recursive @BUILD_DOCS_FALSE@all-local: all-am: Makefile all-local installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @BUILD_DOCS_FALSE@uninstall-local: @BUILD_DOCS_FALSE@clean-local: @BUILD_DOCS_FALSE@install-data-hook: clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-local .MAKE: $(am__recursive_targets) install-am install-data-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-local cscopelist-am \ ctags ctags-am distclean distclean-generic distclean-tags dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-hook install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-am uninstall uninstall-am uninstall-local @BUILD_DOCS_TRUE@all-local: $(PDF_FILES) @BUILD_DOCS_TRUE@clean-local: @BUILD_DOCS_TRUE@ rm -f *.pdf *.out *.log *.aux *.toc *.lot *.idx *.glo *.dvi @BUILD_DOCS_TRUE@install-data-hook: @BUILD_DOCS_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR) @BUILD_DOCS_TRUE@ $(INSTALL_DATA) $(PDF_FILES) $(DOC_INSTALL_DIR) @BUILD_DOCS_TRUE@uninstall-local: @BUILD_DOCS_TRUE@ @list='$(PDF_FILES)'; for p in $$list; do \ @BUILD_DOCS_TRUE@ echo " rm -f '$(DOC_INSTALL_DIR)/$$p'"; \ @BUILD_DOCS_TRUE@ rm -f "$(DOC_INSTALL_DIR)/$$p"; \ @BUILD_DOCS_TRUE@ done .ps.pdf: ps2pdf -r600 $< .dvi.ps: dvips -t letter -o $@ $< .tex.dvi: pwd=`pwd`; cd $(srcdir); \ latex -output-directory=$$pwd $<; \ touch $*.glo \ makeindex $*.glo -s nomencl.ist -o $*.gls \ latex -output-directory=$$pwd $<; \ latex -output-directory=$$pwd $<; \ latex -output-directory=$$pwd $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: systemtap-2.9/doc/SystemTap_Beginners_Guide/000077500000000000000000000000001260561570600212345ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Beginners_Guide/.gitignore000066400000000000000000000000041260561570600232160ustar00rootroot00000000000000tmp systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/000077500000000000000000000000001260561570600221635ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Appendix.xml000066400000000000000000000010311260561570600244500ustar00rootroot00000000000000 Full Version of Advanced Scripts This appendix contains the full versions of all scripts discussed in . systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml000066400000000000000000001170401260561570600261070ustar00rootroot00000000000000
Array Operations in SystemTap array operations associative arrays operations associative arrays This section enumerates some of the most commonly used array operations in SystemTap.
Assigning an Associated Value array operations assigning associated values assigning associated values array operations values, assignment of array operations Use = to set an associated value to indexed unique pairs, as in: array_name[index_expression] = value shows a very basic example of how to set an explicit associated value to a unique key. You can also use a handler function as both your index_expression and value. For example, you can use arrays to set a timestamp as the associated value to a process name (which you wish to use as your unique key), as in: assigning associated values array operations associating timestamps to process names array operations assigning associated values associating timestamps to process names operations assigning associated values associating timestamps to process names assigning associated values associating timestamps to process names array operations associating timestamps to process names assigning associated values array operations timestamps, association thereof to process names assigning associated values array operations Associating Timestamps to Process Names foo[tid()] = gettimeofday_s() Whenever an event invokes the statement in , SystemTap returns the appropriate tid() value (that is, the ID of a thread, which is then used as the unique key). At the same time, SystemTap also uses the function gettimeofday_s() to set the corresponding timestamp as the associated value to the unique key defined by the function tid(). This creates an array composed of key pairs containing thread IDs and timestamps. In this same example, if tid() returns a value that is already defined in the array foo, the operator will discard the original associated value to it, and replace it with the current timestamp from gettimeofday_s().
Reading Values From Arrays reading values from arrays array operations array operations reading values from arrays operations reading values from arrays You can also read values from an array the same way you would read the value of a variable. To do so, include the array_name[index_expression] statement as an element in a mathematical expression. For example: reading values from arrays array operations using arrays in simple computations array operations reading values from arrays using arrays in simple computations operations reading values from arrays using arrays in simple computations using arrays in simple computations reading values from arrays array operations algebraic formulas using arrays reading values from arrays array operations array operations reading values from arrays computing for timestamp deltas operations reading values from arrays computing for timestamp deltas computing for timestamp deltas reading values from arrays array operations reading values from arrays computing for timestamp deltas array operations timestamp deltas, computing for reading values from arrays array operations Using Array Values in Simple Computations delta = gettimeofday_s() - foo[tid()] This example assumes that the array foo was built using the construct in (from ). This sets a timestamp that will serve as a reference point, to be used in computing for delta. The construct in computes a value for the variable delta by subtracting the associated value of the key tid() from the current gettimeofday_s(). The construct does this by reading the value of tid() from the array. This particular construct is useful for determining the time between two events, such as the start and completion of a read operation. reading values from arrays array operations empty unique keys array operations reading values from arrays empty unique keys operations reading values from arrays empty unique keys empty unique keys reading values from arrays array operations Note If the index_expression cannot find the unique key, it returns a value of 0 (for numerical operations, such as ) or a null/empty string value (for string operations) by default.
Incrementing Associated Values array operations incrementing associated values incrementing associated values array operations operations incrementing associated values Use ++ to increment the associated value of a unique key in an array, as in: array_name[index_expression] ++ Again, you can also use a handler function for your index_expression. For example, if you wanted to tally how many times a specific process performed a read to the virtual file system (using the event vfs.read), you can use the following probe: incrementing associated values array operations tallying virtual file system reads (VFS reads) array operations incrementing associated values tallying virtual file system reads (VFS reads) operations incrementing associated values tallying virtual file system reads (VFS reads) tallying virtual file system reads (VFS reads) incrementing associated values array operations VFS reads, tallying of incrementing associated values array operations vfsreads.stp probe vfs.read { reads[execname()] ++ } In , the first time that the probe returns the process name gnome-terminal (that is, the first time gnome-terminal performs a VFS read), that process name is set as the unique key gnome-terminal with an associated value of 1. The next time that the probe returns the process name gnome-terminal, SystemTap increments the associated value of gnome-terminal by 1. SystemTap performs this operation for all process names as the probe returns them.
Processing Multiple Elements in an Array multiple elements in an array array operations array operations multiple elements in an array operations multiple elements in an array array operations processing multiple elements in an array processing multiple elements in an array array operations operations processing multiple elements in an array Once you've collected enough information in an array, you will need to retrieve and process all elements in that array to make it useful. Consider : the script collects information about how many VFS reads each process performs, but does not specify what to do with it. The obvious means for making useful is to print the key pairs in the array reads, but how? array operations processing multiple elements in an array foreach operations processing multiple elements in an array foreach processing multiple elements in an array foreach array operations foreach processing multiple elements in an array array operations array operations processing multiple elements in an array iterations, processing elements in an array as operations processing multiple elements in an array iterations, processing elements in an array as iterations, processing elements in an array as processing multiple elements in an array array operations The best way to process all key pairs in an array (as an iteration) is to use the foreach statement. Consider the following example: array operations processing multiple elements in an array cumulative virtual file system reads, tallying operations processing multiple elements in an array cumulative virtual file system reads, tallying cumulative virtual file system reads, tallying processing multiple elements in an array array operations processing multiple elements in an array cumulative virtual file system reads, tallying array operations virtual file system reads (cumulative), tallying processing multiple elements in an array array operations cumulative-vfsreads.stp global reads probe vfs.read { reads[execname()] ++ } probe timer.s(3) { foreach (count in reads) printf("%s : %d \n", count, reads[count]) } In the second probe of , the foreach statement uses the variable count to reference each iteration of a unique key in the array reads. The reads[count] array statement in the same probe retrieves the associated value of each unique key. Given what we know about the first probe in , the script prints VFS-read statistics every 3 seconds, displaying names of processes that performed a VFS-read along with a corresponding VFS-read count. array operations processing multiple elements in an array limiting the output of foreach operations processing multiple elements in an array limiting the output of foreach processing multiple elements in an array limiting the output of foreach array operations limiting the output of foreach processing multiple elements in an array array operations array operations processing multiple elements in an array ordering the output of foreach operations processing multiple elements in an array ordering the output of foreach processing multiple elements in an array ordering the output of foreach array operations ordering the output of foreach processing multiple elements in an array array operations Now, remember that the foreach statement in prints all iterations of process names in the array, and in no particular order. You can instruct the script to process the iterations in a particular order by using + (ascending) or - (descending). In addition, you can also limit the number of iterations the script needs to process with the limit value option. For example, consider the following replacement probe: probe timer.s(3) { foreach (count in reads- limit 10) printf("%s : %d \n", count, reads[count]) } This foreach statement instructs the script to process the elements in the array reads in descending order (of associated value). The limit 10 option instructs the foreach to only process the first ten iterations (that is, print the first 10, starting with the highest value).
Clearing/Deleting Arrays and Array Elements array operations deleting arrays and array elements operations deleting arrays and array elements array operations clearing arrays/array elements operations clearing arrays/array elements clearing arrays/array elements array operations Sometimes, you may need to clear the associated values in array elements, or reset an entire array for re-use in another probe. in allows you to track how the number of VFS reads per process grows over time, but it does not show you the number of VFS reads each process makes per 3-second period. array operations clearing arrays/array elements delete operator operations clearing arrays/array elements delete operator clearing arrays/array elements array operations delete operator delete operator clearing arrays/array elements array operations To do that, you will need to clear the values accumulated by the array. You can accomplish this using the delete operator to delete elements in an array, or an entire array. Consider the following example: array operations clearing arrays/array elements virtual file system reads (non-cumulative), tallying operations clearing arrays/array elements virtual file system reads (non-cumulative), tallying clearing arrays/array elements array operations virtual file system reads (non-cumulative), tallying virtual file system reads (non-cumulative), tallying clearing arrays/array elements array operations noncumulative-vfsreads.stp global reads probe vfs.read { reads[execname()] ++ } probe timer.s(3) { foreach (count in reads) printf("%s : %d \n", count, reads[count]) delete reads } In , the second probe prints the number of VFS reads each process made within the probed 3-second period only. The delete reads statement clears the reads array within the probe. Note array operations clearing arrays/array elements multiple array operations within the same probe operations clearing arrays/array elements multiple array operations within the same probe clearing arrays/array elements array operations multiple array operations within the same probe multiple array operations within the same probe clearing arrays/array elements array operations You can have multiple array operations within the same probe. Using the examples from and , you can track the number of VFS reads each process makes per 3-second period and tally the cumulative VFS reads of those same processes. Consider the following example: global reads, totalreads probe vfs.read { reads[execname()] ++ totalreads[execname()] ++ } probe timer.s(3) { printf("=======\n") foreach (count in reads-) printf("%s : %d \n", count, reads[count]) delete reads } probe end { printf("TOTALS\n") foreach (total in totalreads-) printf("%s : %d \n", total, totalreads[total]) } In this example, the arrays reads and totalreads track the same information, and are printed out in a similar fashion. The only difference here is that reads is cleared every 3-second period, whereas totalreads keeps growing.
Using Arrays in Conditional Statements array operations conditional statements, using arrays in operations conditional statements, using arrays in conditional statements, using arrays in array operations if/else statements, using arrays in array operations You can also use associative arrays in if statements. This is useful if you want to execute a subroutine once a value in the array matches a certain condition. Consider the following example: vfsreads-print-if-1kb.stp global reads probe vfs.read { reads[execname()] ++ } probe timer.s(3) { printf("=======\n") foreach (count in reads-) if (reads[count] >= 1024) printf("%s : %dkB \n", count, reads[count]/1024) else printf("%s : %dB \n", count, reads[count]) } Every three seconds, prints out a list of all processes, along with how many times each process performed a VFS read. If the associated value of a process name is equal or greater than 1024, the if statement in the script converts and prints it out in kB. Testing for Membership array operations conditional statements, using arrays in testing for array membership operations conditional statements, using arrays in testing for array membership conditional statements, using arrays in array operations testing for array membership testing for array membership conditional statements, using arrays in array operations membership (in array), testing for conditional statements, using arrays in array operations You can also test whether a specific unique key is a member of an array. Further, membership in an array can be used in if statements, as in: if([index_expression] in array_name) statement To illustrate this, consider the following example: vfsreads-stop-on-stapio2.stp global reads probe vfs.read { reads[execname()] ++ } probe timer.s(3) { printf("=======\n") foreach (count in reads+) printf("%s : %d \n", count, reads[count]) if(["stapio"] in reads) { printf("stapio read detected, exiting\n") exit() } } The if(["stapio"] in reads) statement instructs the script to print stapio read detected, exiting once the unique key stapio is added to the array reads.
Computing for Statistical Aggregates statistical aggregates array operations aggregates (statistical) array operations array operations computing for statistical aggregates operations computing for statistical aggregates computing for statistical aggregates array operations Statistical aggregates are used to collect statistics on numerical values where it is important to accumulate new data quickly and in large volume (that is, storing only aggregated stream statistics). Statistical aggregates can be used in global variables or as elements in an array. array operations computing for statistical aggregates adding values to statistical aggregates operations computing for statistical aggregates adding values to statistical aggregates computing for statistical aggregates array operations adding values to statistical aggregates adding values to statistical aggregates computing for statistical aggregates array operations To add value to a statistical aggregate, use the operator <<< value. need more examples of supported rvalues, for example, length, count, and what each one does. stat-aggregates.stp global reads probe vfs.read { reads[execname()] <<< $count } array operations computing for statistical aggregates count (operator) operations computing for statistical aggregates count (operator) computing for statistical aggregates array operations count (operator) count operator computing for statistical aggregates array (operator) In , the operator <<< $count stores the amount returned by $count to the associated value of the corresponding execname() in the reads array. Remember, these values are stored; they are not added to the associated values of each unique key, nor are they used to replace the current associated values. In a manner of speaking, think of it as having each unique key (execname()) having multiple associated values, accumulating with each probe handler run. Note In the context of , count returns the amount of data read by the returned execname() to the virtual file system. array operations computing for statistical aggregates extracting data collected by statistical aggregates operations computing for statistical aggregates extracting data collected by statistical aggregates computing for statistical aggregates array operations extracting data collected by statistical aggregates extracting data collected by statistical aggregates computing for statistical aggregates array operations integer extractors computing for statistical aggregates array operations To extract data collected by statistical aggregates, use the syntax format @extractor(variable/array index expression). extractor can be any of the following integer extractors: count array operations computing for statistical aggregates @count (integer extractor) operations computing for statistical aggregates @count (integer extractor) computing for statistical aggregates array operations @count (integer extractor) @count (integer extractor) computing for statistical aggregates array operations Returns the number of all values stored into the variable/array index expression. Given the sample probe in , the expression @count(reads[execname()]) will return how many values are stored in each unique key in array reads. sum array operations computing for statistical aggregates @sum (integer extractor) operations computing for statistical aggregates @sum (integer extractor) computing for statistical aggregates array operations @sum (integer extractor) @sum (integer extractor) computing for statistical aggregates array operations Returns the sum of all values stored into the variable/array index expression. Again, given sample probe in , the expression @sum(reads[execname()]) will return the total of all values stored in each unique key in array reads. min array operations computing for statistical aggregates @min (integer extractor) operations computing for statistical aggregates @min (integer extractor) computing for statistical aggregates array operations @min (integer extractor) @min (integer extractor) computing for statistical aggregates array operations Returns the smallest among all the values stored in the variable/array index expression. max array operations computing for statistical aggregates @max (integer extractor) operations computing for statistical aggregates @max (integer extractor) computing for statistical aggregates array operations @max (integer extractor) @max (integer extractor) computing for statistical aggregates array operations Returns the largest among all the values stored in the variable/array index expression. avg array operations computing for statistical aggregates @avg (integer extractor) operations computing for statistical aggregates @avg (integer extractor) computing for statistical aggregates array operations @avg (integer extractor) @avg (integer extractor) computing for statistical aggregates array operations Returns the average of all values stored in the variable/array index expression. When using statistical aggregates, you can also build array constructs that use multiple index expressions (to a maximum of 5). This is helpful in capturing additional contextual information during a probe. For example: Multiple Array Indexes global reads probe vfs.read { reads[execname(),pid()] <<< 1 } probe timer.s(3) { foreach([var1,var2] in reads) printf("%s (%d) : %d \n", var1, var2, @count(reads[var1,var2])) } In , the first probe tracks how many times each process performs a VFS read. What makes this different from earlier examples is that this array associates a performed read to both a process name and its corresponding process ID. The second probe in demonstrates how to process and print the information collected by the array reads. Note how the foreach statement uses the same number of variables (that is, var1 and var2) contained in the first instance of the array reads from the first probe.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml000066400000000000000000000217731260561570600241600ustar00rootroot00000000000000
Associative Arrays arrays associative arrays associative arrays introduction SystemTap also supports the use of associative arrays. While an ordinary variable represents a single value, associative arrays can represent a collection of values. Simply put, an associative array is a collection of unique keys; each key in the array has a value associated with it. associative arrays introduction key pairs key pairs introduction arrays associative arrays introduction unique keys unique keys introduction arrays associative arrays introduction associated values associated values introduction arrays associative arrays introduction index expression index expression introduction arrays Since associative arrays are normally processed in multiple probes (as we will demonstrate later), they should be declared as global variables in the SystemTap script. The syntax for accessing an element in an associative array is similar to that of awk, and is as follows: associative arrays introduction syntax syntax introduction arrays format introduction arrays array_name[index_expression] Here, the array_name is any arbitrary name the array uses. The index_expression is used to refer to a specific unique key in the array. To illustrate, let us try to build an array named foo that specifies the ages of three people tom, dick, and harry (which are unique keys). To assign them the ages (associated values) of 23, 24, and 25 respectively, we'd use the following array statements: associative arrays introduction example example introduction arrays Basic Array Statements foo["tom"] = 23 foo["dick"] = 24 foo["harry"] = 25 You can specify up to nine index expressions in an array statement, each one delimited by a comma (,). This is useful if you wish to have a key that contains multiple pieces of information. The following line from uses 5 elements for the key: process ID, executable name, user ID, parent process ID, and string "W". It associates the value of devname with that key. device[pid(),execname(),uid(),ppid(),"W"] = devname Important All associate arrays must be declared as global, regardless of whether the associate array is used in one or multiple probes.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Author_Group.xml000066400000000000000000000013071260561570600253240ustar00rootroot00000000000000 Red Hat, Inc. Don Domingo Engineering Services and Operations Content Services ddomingo@redhat.com William Cohen Engineering Services and Operations Performance Tools wcohen@redhat.com systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml000066400000000000000000000023551260561570600245570ustar00rootroot00000000000000 %BOOK_ENTITIES; ]> SystemTap Beginners Guide Introduction to SystemTap 2.9 SystemTap 2.9 2 This guide provides basic instructions on how to use SystemTap to monitor different subsystems of a Linux system in finer detail. Logo &YEAR; &HOLDER; systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Chapter.xml000066400000000000000000000010641260561570600242740ustar00rootroot00000000000000 Test This is a test paragraph
Section 1 Test Test of a section
Section 2 Test Test of a section
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/000077500000000000000000000000001260561570600251055ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/Conventions.xml000066400000000000000000000201341260561570600301340ustar00rootroot00000000000000
Document Conventions This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later include the Liberation Fonts set by default.
Typographic Conventions Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows. Mono-spaced Bold Used to highlight system input, including shell commands, file names and paths. Also used to highlight keys and key combinations. For example:
To see the contents of the file my_next_bestselling_novel in your current working directory, enter the cat my_next_bestselling_novel command at the shell prompt and press Enter to execute the command.
The above includes a file name, a shell command and a key, all presented in mono-spaced bold and all distinguishable thanks to context. Key combinations can be distinguished from an individual key by the plus sign that connects each part of a key combination. For example:
Press Enter to execute the command. Press CtrlAltF2 to switch to a virtual terminal.
The first example highlights a particular key to press. The second example highlights a key combination: a set of three keys pressed simultaneously. If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in mono-spaced bold. For example:
File-related classes include filesystem for file systems, file for files, and dir for directories. Each class has its own associated set of permissions.
Proportional Bold This denotes words or phrases encountered on a system, including application names; dialog-box text; labeled buttons; check-box and radio-button labels; menu titles and submenu titles. For example:
Choose SystemPreferencesMouse from the main menu bar to launch Mouse Preferences. In the Buttons tab, select the Left-handed mouse check box and click Close to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand). To insert a special character into a gedit file, choose ApplicationsAccessoriesCharacter Map from the main menu bar. Next, choose SearchFind… from the Character Map menu bar, type the name of the character in the Search field and click Next. The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the Copy button. Now switch back to your document and choose EditPaste from the gedit menu bar.
The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context. Mono-spaced Bold Italic or Proportional Bold Italic Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example:
To connect to a remote machine using ssh, type ssh username@domain.name at a shell prompt. If the remote machine is example.com and your username on that machine is john, type ssh john@example.com. The mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount /home. To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release.
Note the words in bold italics above: username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system. Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example:
Publican is a DocBook publishing system.
Pull-quote Conventions Terminal output and source code listings are set off visually from the surrounding text. Output sent to a terminal is set in mono-spaced roman and presented thus: books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs Source-code listings are also set in mono-spaced roman but add syntax highlighting as follows:
Notes and Warnings Finally, we use three visual styles to draw attention to information that might otherwise be overlooked. Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier. Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled “Important” will not cause data loss but may cause irritation and frustration. Warnings should not be ignored. Ignoring warnings will most likely cause data loss.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/Feedback.xml000066400000000000000000000006121260561570600273120ustar00rootroot00000000000000
We Need Feedback! feedback contact information for this manual You should over ride this by creating your own local Feedback.xml file.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/Legal_Notice.xml000066400000000000000000000010221260561570600301470ustar00rootroot00000000000000 Copyright &YEAR; &HOLDER; This material may only be distributed subject to the terms and conditions set forth in the GNU Free Documentation License (GFDL), V1.2 or later (the latest version is presently available at http://www.gnu.org/licenses/fdl.txt). systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/Program_Listing.xml000066400000000000000000000012301260561570600307230ustar00rootroot00000000000000 package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } } systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/Revision_History.xml000066400000000000000000000011121260561570600311410ustar00rootroot00000000000000 Revision History 3.0-0 Mon Mar 12 2012 Jeff Fearn jfearn@redhat.com Publican 3.0 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/css/000077500000000000000000000000001260561570600256755ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/css/brand.css000066400000000000000000000004261260561570600274770ustar00rootroot00000000000000/*headings*/ h1, h2, h3, h4, h5, h6, div.producttitle, div.subtitle, div.author div.author, div.translator div.translator, div.othercredit div.othercredit, div.editor div.editor, div.contrib div.contrib, .title, .titlepage .edition, .titlepage .releaseinfo { color: #336699; } systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/css/common.css000066400000000000000000000611111260561570600276770ustar00rootroot00000000000000* { widows: 4 !important; orphans: 4 !important; } body, h1, h2, h3, h4, h5, h6, pre, li, div { line-height: 1.29em; } body { background-color: white; margin:0 auto; font-family: "liberation sans", "Myriad ", "Bitstream Vera Sans", "Lucida Grande", "Luxi Sans", "Trebuchet MS", helvetica, verdana, arial, sans-serif; font-size: 14px; max-width: 770px; color: black; } body.toc_embeded { /*for web hosting system only*/ margin-left: 300px; } object.toc, iframe.toc { /*for web hosting system only*/ border-style: none; position: fixed; width: 290px; height: 99.99%; top: 0; left: 0; z-index: 100; border-style: none; border-right:1px solid #999; } /* Hide web menu */ body.notoc { margin-left: 3em; } iframe.notoc { border-style:none; border: none; padding: 0px; position:fixed; width: 21px; height: 29px; top: 0px; left:0; overflow: hidden; margin: 0px; margin-left: -3px; } /* End hide web menu */ /* desktop styles */ body.desktop { margin-left: 26em; } body.desktop .book > .toc { display:block; width:24em; height:99.99%; position:fixed; overflow:auto; top:0px; left:0px; /* padding-left:1em; */ background-color:#EEEEEE; font-size: 12px; } body.pdf { max-width: 100%; } .toc { line-height:1.35em; } .toc .glossary, .toc .chapter, .toc .appendix { margin-top:1em; } .toc .part { margin-top:1em; display:block; } span.glossary, span.appendix { display:block; margin-top:0.5em; } div { padding-top:0px; } div.section { page-break-inside: avoid; } p, div.para { padding-top: 0px; margin-top: 1em; padding-bottom: 0px; margin-bottom: 1em; } div.formalpara { padding-top: 0px; margin-top: 1em; padding-bottom: 0px; margin-bottom: 1em; } .varlistentry div.para { page-break-before: avoid; } /*Links*/ a { outline: none; } a:link { text-decoration: none; border-bottom: 1px dotted ; color:#3366cc; } body.pdf a:link { word-wrap: break-word; } a:visited { text-decoration:none; border-bottom: 1px dotted ; color:#003366; } div.longdesc-link { float:right; color:#999; } .toc a, .qandaset a { font-weight:normal; border:none; } .toc a:hover, .qandaset a:hover { border-bottom: 1px dotted; } /*headings*/ h1, h2, h3, h4, h5, h6 { color: #336699; margin-top: 0px; margin-bottom: 0px; background-color: transparent; margin-bottom: 0px; margin-top: 20px; page-break-inside: avoid; page-break-after: avoid; word-wrap: break-word; } h1 { font-size: 22px; } .titlepage h1.title { text-align:left; } .book > .titlepage h1.title { text-align: center; } .article > .titlepage h1.title, .article > .titlepage h2.title { text-align: center; } .set .titlepage > div > div > h1.title { text-align: center; } .part > .titlepage h1.title { text-align: center; font-size: 24px; } div.producttitle { margin-top: 0px; margin-bottom: 20px; font-size: 48px; font-weight: bold; /* background: #003d6e url(../images/h1-bg.png) top left repeat-x; */ color: #336699; text-align: center; padding-top: 12px; } .titlepage .corpauthor { margin-top: 1em; text-align: center; } .section h1.title { font-size: 18px; padding: 0px; color: #336699; text-align: left; background: white; } h2 { font-size: 20px; margin-top: 30px; } .book div.subtitle, .book h2.subtitle, .book h3.subtitle { margin-top: 1em; margin-bottom: 1em; font-size: 18px; text-align: center; } div.subtitle { color: #336699; font-weight: bold; } h1.legalnotice { font-size: 24px; } .preface > div > div > div > h2.title, .preface > div > div > div > h1.title { margin-top: 1em; font-size: 24px; } .appendix h2 { font-size: 24px; } h3 { font-size: 14px; padding-top:0px; padding-bottom: 0px; margin-bottom: 0px; } h4 { font-size: 14px; padding-top:0px; padding-bottom:0px; } h5 { font-size: 14px; } h6 { font-size: 14px; margin-bottom: 0px; } .abstract h6 { margin-top:1em; margin-bottom:.5em; font-size: 24px; } .index > div > div > div > h2.title { font-size: 24px; } .chapter > div > div > div > h2.title { font-size: 24px; } .section > div > div > div > h2.title { font-size: 21px; page-break-inside: avoid; page-break-before: avoid; page-break-after: avoid; } .section > div > div > div > h3.title { font-size: 17px; } /*element rules*/ hr { border-collapse: collapse; border-style:none; border-top: 1px dotted #ccc; width:100%; } /* web site rules */ ul.languages, .languages li { display:inline; padding:0px; } .languages li a { padding:0px .5em; text-decoration: none; } .languages li p, .languages li div.para { display:inline; } .languages li a:link, .languages li a:visited { color:#444; } .languages li a:hover, .languages li a:focus, .languages li a:active { color:black; } ul.languages { display:block; background-color:#eee; padding:.5em; } /*supporting stylesheets*/ /*unique to the webpage only*/ .books { position:relative; } .versions li { width:100%; clear:both; display:block; } a.version { font-size: 20px; text-decoration:none; width:100%; display:block; padding:1em 0px .2em 0px; clear:both; } a.version:before { content:"Version"; font-size: smaller; } a.version:visited, a.version:link { color:#666; } a.version:focus, a.version:hover { color:black; } .books { display:block; position:relative; clear:both; width:100%; } .books li { display:block; width:200px; float:left; position:relative; clear: none ; } .books .html { width:170px; display:block; } .books .pdf { position:absolute; left:170px; top:0px; font-size: smaller; } .books .pdf:link, .books .pdf:visited { color:#555; } .books .pdf:hover, .books .pdf:focus { color:#000; } .books li a { text-decoration:none; } .books li a:hover { color:black; } /*products*/ .products li { display: block; width:300px; float:left; } .products li a { width:300px; padding:.5em 0px; } .products ul { clear:both; } /*revision history*/ .revhistory { display:block; } .revhistory table { background-color:transparent; border-color:#fff; padding:0px; margin: 0; border-collapse:collapse; border-style:none; } .revhistory td { text-align :left; padding:0px; border: none; border-top: 1px solid #fff; font-weight: bold; } .revhistory .simplelist td { font-weight: normal; } .revhistory .simplelist { margin-bottom: 1.5em; margin-left: 1em; } .revhistory table th { display: none; } /*credits*/ .authorgroup div { clear:both; text-align: center; } div.author div.author, div.translator div.translator, div.othercredit div.othercredit, div.editor div.editor, div.contrib div.contrib { margin: 0px; padding: 0px; margin-top: 12px; font-size: 14px; font-weight: bold; color: #336699; } div.editedby { margin-top: 15px; margin-bottom: -0.8em; } div.authorgroup .author, div.authorgroup.editor, div.authorgroup.translator, div.authorgroup.othercredit, div.authorgroup.contrib { display: block; font-size: 14px; page-break-inside: avoid; } .revhistory .author { display: inline; } .othercredit h3 { padding-top: 1em; } .othercredit { margin:0px; padding:0px; } .releaseinfo { clear: both; } .copyright { margin-top: 1em; } /* qanda sets */ .answer { margin-bottom:1em; border-bottom:1px dotted #ccc; } .qandaset .toc { border-bottom:1px dotted #ccc; } .question { font-weight:bold; } .answer .data, .question .data { padding-left: 2.6em; } .answer .label, .question .label { float:left; font-weight:bold; } /* inline syntax highlighting */ .perl_Alert { color: #0000ff; } .perl_BaseN { color: #007f00; } .perl_BString { color: #5C3566; } .perl_Char { color: #ff00ff; } .perl_Comment { color: #888888; } .perl_DataType { color: #0000ff; } .perl_DecVal { color: #00007f; } .perl_Error { color: #ff0000; } .perl_Float { color: #00007f; } .perl_Function { color: #007f00; } .perl_IString { color: #5C3566; } .perl_Keyword { color: #002F5D; } .perl_Operator { color: #ffa500; } .perl_Others { color: #b03060; } .perl_RegionMarker { color: #96b9ff; } .perl_Reserved { color: #9b30ff; } .perl_String { color: #5C3566; } .perl_Variable { color: #0000ff; } .perl_Warning { color: #0000ff; } /*Lists*/ ul { list-style-image: url("../images/dot.png"); list-style-type: circle; padding-left: 1.6em; } ul ul { list-style-image: url("../images/dot2.png"); list-style-type: circle; } ol.1 { list-style-type: decimal; } ol.a, ol ol { list-style-type: lower-alpha; } ol.i { list-style-type: lower-roman; } ol.A { list-style-type: upper-alpha; } ol.I { list-style-type: upper-roman; } dt { font-weight:bold; margin-bottom:0px; padding-bottom:0px; } dd { margin:0px; margin-left:2em; padding-top:0px; } li { padding-top: 0px; margin-top: 0px; padding-bottom: 0px; /* margin-bottom: 16px; */ } /*images*/ img { display:block; margin: 2em 0; max-width: 100%; } .inlinemediaobject, .inlinemediaobject img, .inlinemediaobject object { display:inline; margin:0px; overflow: hidden; } .figure { margin-top: 1em; width: 100%; } .figure img, .mediaobject img { display:block; margin: 0em; page-break-inside: avoid; } .figure .title { margin-bottom:2em; padding:0px; } /*document modes*/ .confidential { background-color:#900; color:White; padding:.5em .5em; text-transform:uppercase; text-align:center; } .longdesc-link { display:none; } .longdesc { display:none; } .prompt { padding:0px .3em; } /*user interface styles*/ .screen .replaceable { } .guibutton, .guilabel { font-family: "liberation mono", "bitstream vera mono", "dejavu mono", monospace; font-weight: bold; } .example { background-color: #ffffff; border-left: 3px solid #aaaaaa; padding-top: 1px; padding-bottom: 0.1em; padding-left: 1em; } .equation { border-left: 3px solid #aaaaaa; background-color: #ffffff; padding-top: 1px; padding-bottom: 0.1em; padding-left: 1em; } .equation-contents { margin-left: 4em; } div.title { margin-bottom: 1em; font-weight: 14px; font-weight: bold; color: #336699; page-break-inside: avoid; page-break-after: avoid; word-wrap: break-word; } .example-contents { background-color: #ffffff; } .example-contents .para { /* padding: 10px;*/ } /*terminal/console text*/ .computeroutput, .option { font-family:"liberation mono", "bitstream vera mono", "dejavu mono", monospace; font-weight:bold; } .replaceable { font-style: italic; } .command, .filename, .keycap, .classname, .literal { font-family:"liberation mono", "bitstream vera mono", "dejavu mono", monospace; font-weight:bold; } /* no bold in toc */ .toc * { font-weight: inherit; } .toc H1 { font-weight: bold; } div.programlisting { white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ } pre { font-family:"liberation mono", "bitstream vera mono", "dejavu mono", monospace; display:block; background-color: #f5f5f5; color: #000000; /* border: 1px solid #aaaaaa; */ margin-bottom: 1em; padding:.5em 1em; white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ font-size: 0.9em; border-style:none; box-shadow: 0 2px 5px #AAAAAA inset; -moz-box-shadow: 0 2px 5px #AAAAAA inset; -webkit-box-shadow: 0 2px 5px #AAAAAA inset; -o-box-shadow: 0 2px 5px #AAAAAA inset; } body.pdf pre { border: 1px solid #AAAAAA; box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; -o-box-shadow: none; } pre .replaceable, pre .keycap { } code { font-family:"liberation mono", "bitstream vera mono", "dejavu mono", monospace; white-space: pre-wrap; word-wrap: break-word; font-weight:bold; } .parameter code { display: inline; white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ } code.email { font-weight: normal; font-family: "liberation sans", "Myriad ", "Bitstream Vera Sans", "Lucida Grande", "Luxi Sans", "Trebuchet MS", helvetica, verdana, arial, sans-serif; } /*Notifications*/ div.warning:before { content:url(../images/warning.png); padding-left: 5px; } div.note:before { content:url(../images/note.png); padding-left: 5px; } div.important:before { content:url(../images/important.png); padding-left: 5px; } div.warning, div.note, div.important { color: black; margin: 0px; padding: 0px; background: none; background-color: white; margin-bottom: 1em; border-bottom: 1px solid #aaaaaa; page-break-inside: avoid; } div.admonition_header p { margin: 0px; padding: 0px; color: #eeeeec; padding-top: 0px; padding-bottom: 0px; height: 1.4em; line-height: 1.4em; font-size: 17px; display:inline; } div.admonition_header { background-origin:content-box; clear: both; margin: 0px; padding: 0px; margin-top: -40px; padding-left: 58px; line-height: 1.0px; font-size: 1.0px; } div.warning div.admonition_header { background: url(../images/red.png) top left repeat-x; background-color: #590000; background: -webkit-linear-gradient(#a40000,#590000); background: linear-gradient(#a40000,#590000); } div.note div.admonition_header { background: url(../images/green.png) top right repeat-x; background-color: #597800; background: -webkit-linear-gradient(#769f00,#597800); background: linear-gradient(#769f00,#597800); } div.important div.admonition_header { background: url(../images/yellow.png) top right repeat-x; background-color: #a6710f; background: -webkit-linear-gradient(#d08e13,#a6710f); background: linear-gradient(#d08e13,#a6710f); } div.warning p:first-child, div.warning div.para:first-child, div.note p:first-child, div.note div.para:first-child, div.important p:first-child, div.important div.para:first-child { padding: 0px; margin: 0px; } div.admonition { border: none; border-left: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa; padding:0px; margin:0px; padding-top: 1.5em; padding-bottom: 1em; padding-left: 2em; padding-right: 1em; background-color: #eeeeec; -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; } /*Page Title*/ #title { display:block; height:45px; padding-bottom:1em; margin:0px; } #title a.left{ display:inline; border:none; } #title a.left img{ border:none; float:left; margin:0px; margin-top:.7em; } #title a.right { padding-bottom:1em; } #title a.right img { border:none; float:right; margin:0px; margin-top:.7em; } /*Table*/ div.table { /* page-break-inside: avoid; */ } table { border: 1px solid #444; width:100%; border-collapse:collapse; table-layout: fixed; word-wrap: break-word; } table.blockquote, table.simplelist, .calloutlist table { border-style: none; } table th { text-align:left; background-color:#6699cc; padding:.3em .5em; color:white; } table td { padding:.15em .5em; } table tr.even td { background-color:#f5f5f5; } tr:nth-child(even) { background-color: #eeeeee; } table th p:first-child, table td p:first-child, table li p:first-child, table th div.para:first-child, table td div.para:first-child, table li div.para:first-child { margin-top:0px; padding-top:0px; display:inline; } th, td { border-style:none; vertical-align: top; /* border: 1px solid #000; */ } .blockquote td, .simplelist th, .simplelist td { border: none; } table table td { border-bottom:1px dotted #aaa; background-color:white; padding:.6em 0px; } table table { border:1px solid white; } td.remarkval { color:#444; } td.fieldval { font-weight:bold; } .lbname, .lbtype, .lbdescr, .lbdriver, .lbhost { color:white; font-weight:bold; background-color:#999; width:120px; } td.remarkval { width:230px; } td.tname { font-weight:bold; } th.dbfield { width:120px; } th.dbtype { width:70px; } th.dbdefault { width:70px; } th.dbnul { width:70px; } th.dbkey { width:70px; } span.book { margin-top:4em; display:block; font-size: 11pt; } span.book a{ font-weight:bold; } span.chapter { display:block; } table.simplelist td, .calloutlist table td { border-style: none; } table.lt-4-cols.lt-7-rows td { border: none; } /*to simplify layout*/ table.lt-4-cols.gt-14-rows tr:nth-child(odd) { background-color: #fafafa; } /* to keep simple but stripe rows */ .gt-8-cols td { border-left: 1px solid #ccc; } .gt-8-cols td:first-child { border-left: 0; } /* to apply vertical lines to differentiate columns*/ /*Breadcrumbs*/ #breadcrumbs ul li.first:before { content:" "; } #breadcrumbs { color:#900; padding:3px; margin-bottom:25px; } #breadcrumbs ul { margin-left:0; padding-left:0; display:inline; border:none; } #breadcrumbs ul li { margin-left:0; padding-left:2px; border:none; list-style:none; display:inline; } #breadcrumbs ul li:before { content:"\0020 \0020 \0020 \00BB \0020"; color:#333; } dl { margin-top: 0px; margin-left: 28px; } .toc dl { margin-left: 10px; } /*index*/ .glossary h3, .index h3 { font-size: 20px; color:#aaa; margin:0px; } .indexdiv { margin-bottom:1em; } .glossary dt, .index dt { color:#444; padding-top:.5em; } .glossary dl dl dt, .index dl dl dt { color:#777; font-weight:normal; padding-top:0px; } .index dl dl dt:before { content:"- "; color:#ccc; } /*changes*/ .footnote { font-size: 10px; margin: 0px; color: #222; } .footnotes { margin-bottom: 60px; } table .footnote { } sup { margin:0px; padding:0px; font-size: 10px; padding-left:0px; } .footnote { position:relative; } .footnote sup { color: black; left: .4em; } .footnote a:link, .footnote a:visited { text-decoration:none; border: none; } .footnote .para sup { /* position:absolute; */ vertical-align:text-bottom; } a.footnote { padding-right: 0.5em; text-decoration:none; border: none; } .footnote sup a:link, .footnote sup a:visited { color:#92917d; text-decoration:none; } .footnote:hover sup a { text-decoration:none; } .footnote p,.footnote div.para { padding-left:1em; } .footnote a:link, .footnote a:visited before{ color:#00537c; } .footnote a:hover { } /**/ .pdf-break { page-break-before: always; } div.legalnotice { page-break-before: always; } div.abstract { page-break-before: always; /* page-break-after: always;*/ } div.chapter { page-break-before: always; } div.titlepage, div.titlepage > div, div.titlepage > div > div { page-break-inside: avoid; page-break-after: avoid; } div.preface, div.part { page-break-before: always; } div.appendix { page-break-before: always; } div.section { page-break-inside: auto; page-break-before: auto; page-break-after: auto; } dt.varlistentry { page-break-inside: avoid; page-break-after: avoid; } dd { page-break-before: avoid; } div.note .replaceable, div.important .replaceable, div.warning .replaceable, div.note .keycap, div.important .keycap, div.warning .keycap { } ul li p:last-child, ul li para:last-child { margin-bottom:0px; padding-bottom:0px; } /*document navigation*/ .docnav a, .docnav strong { border:none; text-decoration:none; font-weight:normal; } .docnav { list-style:none; margin:0px; padding:0px; position:relative; width:100%; padding-bottom:2em; padding-top:1em; height:2.5em; line-height:2.5em; /* border-top:1px dotted #ccc; background-color: rgba(240, 240, 240, 0.9); -webkitbox-shadow: 0px .15em .5em rgba(0,0,0,0.2); -moz-box-shadow: 0px .15em .5em rgba(0,0,0,0.2); box-shadow: 0px .15em .5em rgba(0,0,0,0.2); */ } .docnav li { list-style:none; margin:0px; padding:0px; display:inline; font-size: 14px; } .docnav li:before { content:" "; } .docnav li.previous, .docnav li.next { position:absolute; top:1.5em; } .docnav li.up, .docnav li.home { margin:0px 1.5em; } .docnav.top li.home { color: #336699; font-size: 22pt; font-weight: bold; } .docnav li.previous { left:0px; text-align:left; } .docnav li.next { right:0px; text-align:right; } .docnav li.previous strong, .docnav li.next strong { height: 17px; display: block; } .docnav { margin:0 auto; text-align:center; } .docnav li.next a strong { background: url(../images/stock-go-forward.png) right 120% no-repeat; padding-top:3px; padding-bottom:4px; padding-right:28px; } .docnav li.previous a strong { background: url(../images/stock-go-back.png) left 120% no-repeat; padding-top:3px; padding-bottom:4px; padding-left:28px; padding-right:0.5em; } .docnav li.home a strong { background: url(../images/stock-home.png) top left no-repeat; padding:5px; padding-left:28px; } .docnav li.up a strong { background: url(../images/stock-go-up.png) top left no-repeat; padding:5px; padding-left:28px; } .docnav a:link, .docnav a:visited { color:#666; } .docnav a:hover, .docnav a:focus, .docnav a:active { color:black; } .docnav a { max-width: 10px; overflow:hidden; } .docnav a:link strong { text-decoration:none; } .docnav { margin:0 auto; text-align:center; } ul.docnav { margin-bottom: 1em; } /* Reports */ .reports ul { list-style:none; margin:0px; padding:0px; } .reports li{ margin:0px; padding:0px; } .reports li.odd { background-color: #eeeeee; margin:0px; padding:0px; } .reports dl { display:inline; margin:0px; padding:0px; float:right; margin-right: 17em; margin-top:-1.3em; } .reports dt { display:inline; margin:0px; padding:0px; } .reports dd { display:inline; margin:0px; padding:0px; padding-right:.5em; } .reports h2, .reports h3{ display:inline; padding-right:.5em; font-size: 14px; font-weight:normal; } .reports div.progress { display:inline; float:right; width:16em; background:#c00 url(../images/shine.png) top left repeat-x; margin:0px; margin-top:-1.3em; padding:0px; border:none; } /*uniform*/ body.results, body.reports { max-width:57em ; padding:0px; } /*Progress Bar*/ div.progress { display:block; float:left; width:16em; background:#c00 url(../images/shine.png) top left repeat-x; height:1em; } div.progress span { height:1em; float:left; } div.progress span.translated { background:#6c3 url(../images/shine.png) top left repeat-x; } div.progress span.fuzzy { background:#ff9f00 url(../images/shine.png) top left repeat-x; } /*Results*/ .results ul { list-style:none; margin:0px; padding:0px; } .results li{ margin:0px; padding:0px; } .results li.odd { background-color: #eeeeee; margin:0px; padding:0px; } .results dl { display:inline; margin:0px; padding:0px; float:right; margin-right: 17em; margin-top:-1.3em; } .results dt { display:inline; margin:0px; padding:0px; } .results dd { display:inline; margin:0px; padding:0px; padding-right:.5em; } .results h2, .results h3 { display:inline; padding-right:.5em; font-size: 14px; font-weight:normal; } .results div.progress { display:inline; float:right; width:16em; background:#c00 url(../images/shine.png) top left repeat-x; margin:0px; margin-top:-1.3em; padding:0px; border:none; } /* Dirty EVIL Mozilla hack for round corners */ pre { -moz-border-radius:11px; -webkit-border-radius:11px; border-radius: 11px; /* page-break-inside: avoid; */ } .example { -moz-border-radius:0px; -webkit-border-radius:0px; border-radius: 0px; page-break-inside: avoid; } /* move these invisible fields out of the flow */ .example > a:first-child, .table > a:first-child { float: left; } .package, .citetitle { font-style: italic; } .titlepage .edition, .titlepage .releaseinfo { color: #336699; background-color: transparent; margin-top: 1em; margin-bottom: 1em; font-size: 20px; font-weight: bold; text-align: center; } span.remark { background-color: #ff00ff; } .draft { background-image: url(../images/watermark-draft.png); background-repeat: repeat-y; background-position: center; } .foreignphrase { font-style: inherit; } dt { clear:both; page-break-inside: avoid; page-break-after: avoid; } dt img { border-style: none; max-width: 112px; } dt object { max-width: 112px; } dt .inlinemediaobject, dt object { display: inline; float: left; margin-bottom: 1em; padding-right: 1em; width: 112px; } dl:after { display: block; clear: both; content: ""; } .toc dd { padding-bottom: 0px; margin-bottom: 1em; padding-left: 1.3em; margin-left: 0px; } div.toc > dl > dt { padding-bottom: 0px; margin-bottom: 0px; margin-top: 1em; } .strikethrough { text-decoration: line-through; } .underline { text-decoration: underline; } .calloutlist img, .callout { padding: 0px; margin: 0px; width: 12pt; display: inline; vertical-align: middle; } li.step > a:first-child { display: block; } .stepalternatives { list-style-image: none; list-style-type: upper-alpha; } .task { /* page-break-inside: avoid; */ } .added { background-color: #99ff99; } .changed { background-color: #ffff77; } .deleted { background-color: #ff4455; text-decoration: line-through; } systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/css/default.css000066400000000000000000000001231260561570600300270ustar00rootroot00000000000000@import url("common.css"); @import url("overrides.css"); @import url("lang.css"); systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/css/epub.css000066400000000000000000000021101260561570600273340ustar00rootroot00000000000000/*headings*/ h1, h2, h3, h4, h5, h6, div.producttitle, div.subtitle, div.author div.author, div.translator div.translator, div.othercredit div.othercredit, div.editor div.editor, div.contrib div.contrib, .title, .titlepage .edition { } div.para { margin-top: 1em; } /* inline syntax highlighting */ .perl_Alert { color: #0000ff; } .perl_BaseN { color: #007f00; } .perl_BString { color: #5C3566; } .perl_Char { color: #ff00ff; } .perl_Comment { color: #888888; } .perl_DataType { color: #0000ff; } .perl_DecVal { color: #00007f; } .perl_Error { color: #ff0000; } .perl_Float { color: #00007f; } .perl_Function { color: #007f00; } .perl_IString { color: #5C3566; } .perl_Keyword { color: #002F5D; } .perl_Operator { color: #ffa500; } .perl_Others { color: #b03060; } .perl_RegionMarker { color: #96b9ff; } .perl_Reserved { color: #9b30ff; } .perl_String { color: #5C3566; } .perl_Variable { color: #0000ff; } .perl_Warning { color: #0000ff; } b, strong { font-weight: bolder; } code.command { font-family: monospace; font-weight: bolder; } systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/css/print.css000066400000000000000000000003001260561570600275340ustar00rootroot00000000000000@import url("common.css"); @import url("overrides.css"); @import url("lang.css"); #tocframe { display: none; } body.toc_embeded { margin-left: 30px; } .producttitle { color: #336699; } systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/000077500000000000000000000000001260561570600263525ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/1.png000066400000000000000000000013211260561570600272150ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<NIDATX͗=haS U3j\䒎-p A2v| "n.N.mn Jq.dXEPg^LK;}<{{3#LP ?7dzEIH (} &i$%eJ)"~ `A3o _d\ۙF{LKmԶW ,7o/ "!"!^&\̵91qRO+KL{Նh3vn'O=eJ)?/YS\8˔R)>`棗$ld_q 8iN٢ >m^dz$f#Ӻ~U-,j`)O.ޝ/Ԥ I5@}Xܸvģe|?V y'w9ãc$PXj 4~<@(R 4vX]LPX]BV3 f@au cT=|]f*+LMgz⹭# W7׵ȶ޲s;2P^miSHȴpl$dS _ ?B1UhfTb&IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/1.svg000066400000000000000000000024721260561570600272400ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/10.png000066400000000000000000000017741260561570600273110ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<yIDATX͗oU?ve+ ]RvK4/֠M!`"`[JD @i>!lڊ$,ՈhXIj1XP)}Ι{=Wh)%dI^&GZ%;: M4ZL#(Z(֧( ;xЫH@A" gԾ{`V,P<ʉhLρAZH%%e ,c_^ʖE + Yrzӷ7ܳ܆k  0fP0xk{ W}ʵ_us~+o _d)u29"j#u!>8m{@\kum9^ӛM..c˃au$^$XMۖܗ%v9;w4Qp/q(Q8[Sཏ/{ x才冤}#E6v΍LbȣUOD2ĜeoٸYp,w\Ԅr!_L[cR2 lN]ELR 4vv~Z T\ UZb6y--| =jXnλٸ#d lLJ^x R}q۸8G@"ȅ&ػs;O&SE6.KFM㜉^g!ܐ̧8#All6̟sbUs[c~Gu1Up 8oJH m+@ZH՜zV+'B.O$wܖQI!Jv5[Mv/ҏf'JIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/10.svg000066400000000000000000000056661260561570600273300ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/11.png000066400000000000000000000014571260561570600273100ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗OhAƿl" =hI4-ḎIēA^'ZRRP1TB.J(*!l:eLv7ɶi>7;o9)W:(ĊGh{xGEpReipYfs3KW1y󜓻Vn<Ȁn}J p2i;jLv-^8K8O  ^WP]Ln6_vBٴ (fkUbv9tېJ.`X/jws ^ 6Ҕv:v:9 ȫQVCPN0.O?tqWB>φaJLpɎ.FaS@0>z\x|'D)kmoSX ' )V148v:A6, amӃp;x>{ok.72r/Qc5\+ms/W./Wp+|/FW6C` 3o?͗+I@Vߏc@\U7I =3 l̀R (cT85M:8`r9},%:4*)3]e1'? ŌSN&Md*Qj6X.o?&Z׬qN4IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/11.svg000066400000000000000000000040521260561570600273150ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/12.png000066400000000000000000000017721260561570600273110ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<wIDATX͗[hTWe1 Z`,FHC6K;XHKQ B@P_l}(ޠւ/4i^%FSm'hLdwf<9\OZ^쵅֚LBf8TXa,E LzТZtہTcT`iB@qq;ntrBJ66IOZLy*mJ[ eZɯq!"h_Ӝ`ɟcDHU&!dcS6Ŀ܎o 'vl  -d Q'E@$ؤ,('߽yЏr^ŇwJywםכ[ Q6ue^c BՍ%y0ڰAnGٹ6JkjaϪV#'l:.^p.{x,sns/d>zW-fKy̛GV'@%(Yj^8++?~5ZÎ9zO5rat˜}݉?7ߺy'Qlo6n systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/13.png000066400000000000000000000020451260561570600273040ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗]hUMkjڄeJ6cӚZD,'XTuC/Ap M]b8݅0DGpsmZX%vic%=NjlIW}?99J)J 쀽cgo=B"&Jd?J:7g !Q`{qǔ{U ?tV'Oy_I4tߥvEd`OW_?VIl",lKC~fo^1@I6n?+&h;%?w:o(,dا?:>j9o|nN!Ȏ >nN}LLcq## zsWGZ3f86x)7D^ݹQ]$9Trǣ{8вW2Kq7Eɻ/睗X@8c3p=<õf AB3x*||x7>uO?}Bb|z]q~ Wo7+P"d*?B@ZkE&!{чosuazw(lke 8|Pxw.҉n`x|#Y6q+eyn 0x=td2^ F,OüK2o A\,Nd>|Y׉[{AKC; RdҾ}8 6 ɶliJ8'4D8W?\=L(l=Q^!IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/13.svg000066400000000000000000000075731260561570600273320ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/14.png000066400000000000000000000016361260561570600273120ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗]HSa4t4[VaMLjHfQ:&Ⱦn uj7B7%u%&6ufb"ҌX#Jp|8_myPJJ1)u*lir@h58 B[Pù@DoN+0;:V%q来L:%`j.`X(X}uemczl<,/a摸$hUpUrSCw6ğ\,/f2dXO '[cvtڣ}p Z :ش.FFUNIi_bU.Z+N>|笥}(N+ VKun4Vu systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/15.png000066400000000000000000000017531260561570600273130ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<hIDATXW]HSQ5o͜E-"aΨ("{J=(67 ,"^Ĵ)[(۬M==zw{VL?osνCcH%hJh 64@"-aFFi Fby`펗ij+aukgxx 0-Nhv1nH@ё%Lwd%%Pָ HO̙4<*+&؅hĠcH Yw"2 X  jT)?~OF1F+OG{@:j*:-NVcWZӈ<~n1.P{}l@^sM sn\4׎Ydq i18X'iPf0 ܸ~9;` Œ|zPۆ'PqK2` h{\.Vq'&}22:!4p//CyIZzZM2!>tAnoڐ-ng8wƛ5>~Em4k9Kô4؞0sҀ@n| nϏ;p pVZ3n7!#d142&AIPh P--+9/isB\4}Э /#J@%)& :yK;G8 ynHe=Q}YB+7Ů, ܞ ybET-o rMWUm,Ȼ$ t7U *Cq?b8^L^_m%T,ſɄ+V=e)D#eWDoǿxIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/15.svg000066400000000000000000000060101260561570600273150ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/16.png000066400000000000000000000020461260561570600273100ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗QlSe]Wtc-ˈAIjb0LLH cWI4M|&>hB$FC(&&eUq2cmRχ^{/\&;'JQG>ơΞ Bєf RLhHqbPG$ט"-x@cqGo}lY}kG0R<#9i-5=rD*܁$PV;J_X2o* 鱳u#,$mm%xzQoŹvs6뿔btdYPtf4թ,5>bsE.wf8őނPgOsӽ4^7}{iL•(ݶ3oԹc #EBP)˛UV$o6 Ֆ8!@E)fZ2N|dvg'xM\ vja!bC} ݻ[p;LJĬN.cZ0|{Z돆@5Omc۾/'nie_ǮT{ݜj H?ƧNLJqؗL/N u#[#LN̨)ŕrCF,e.̉pJ>:Dl>b򺌖b66owedB] T(O긖>%;uU=v,"Ƅ9, hmvém' systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/17.png000066400000000000000000000016071260561570600273130ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗_HQ,? ,9ȬnbB _w]Aw]S҄.""׊ y2Tİ!ftњ߾o.=}s!$P7B6[Ҏ FiՅM5XcXIȋ1@suW\UGs )cG̕6PxT cS Eu59c6 $)~#0VQL+?s=ɦ_1T́mCX3Z=>+3Uշgnw軔tՁQ3 yKT /^S2Z[mܒ;F{YS^P f@H;R1NŁ]ۏ_a2++޵eѕv M*%z4Ng=q%??}a+g&rhbϤ8H̀Ety>@e?LڝÑI-&48<?T`vo&BZ[zܗ…l>xuh Lkq6IaEUyγ5j@ H2Q^|/-F'kV (+rٟ @{d68񯳸ǿMh ͈ۨp:F-ۆ.22&צ[ ڰkj\ DqwI~HiJPzɄ7Z?s[E&z$iHP&tIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/17.svg000066400000000000000000000031731260561570600273260ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/18.png000066400000000000000000000021071260561570600273100ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗]lUX:Ѝm!Hס12Fp\d1`@p!^xcBF݅CBhF نANqӡmZ{X׾RW9y9sRdJ&ƳFZ4YP.EQ֋Gc)by uB@yy{^`YNJ5Љb4~F Xu5nÛ&O΄ ՟? h~ -|QBj NJf?˿hO0:93;O^G&.G)VaN(ʷ.+(n@ u} XjX\5[J|3|=4_Q(- 4:Nq/UPy͍IYt\2014f)qƞ-a)zE TmtS98h9@i^ Y W@VecHϼg ,ZWf0{r  {{N~㓜4Sq \gﳏ.+f _~;R7OaVجl{UG穋 1HX;k^MмY2V0yUZRwP=")6 -;6R5 yHᵫ6'.)EkWci,Rbc+ Df8JOfefӳ W  ׬ÞJ׫O~߅/\1-x-,QC\mYi)a=dtȐe[B,*} gN:'0]xJߪOӑބ[$ԙÍ;a/z6!]W7a ՛5;CM^!ܞ;U?\LٝTOHyS{tIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/18.svg000066400000000000000000000117061260561570600273300ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/19.png000066400000000000000000000020501260561570600273060ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗_lSU?nJe(S4ي1$Lc5,U g|14`b5 /e$@ؘѩdQdLRf3iڵ^X9;wRRJ+)9jE֎P~i DMѾB,A[wPh)p C;euFMOĆOɤu@וXǕԾEsMv*@=PHBLX n?ب9R,)G4y/m;m{=n*uMXfmJm[ mAOy=3fQEήm<>^׳6zy'hj@Jŗ't4Ulzfg j&*>{# 7ן\hōڅdX3N+=޲5y} UHxy"t<[[CCd` Hoe{=kk`Y6k} +g{_`z&ƙߦx2@J[Bwh$SD}d`7_l \2|a='F'y釳r,kok޷Y-~.OGݚc@$p5~%R\.,-aZ]h,CMRRſJd f@Zx{vlDn}X8 [ 4s3Օr/Q>}@2!SFMc* aOK8Sz^JjDcqfnڟRJ systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/2.png000066400000000000000000000016171260561570600272260ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDATXW_HSQ٦+LV,0( ){ћ@("  z(zԩ/ * Q4HLHCCc41==n۝ۙSt9}ι~0ƐIЌPf׃` * .7&9vθNH˄ {2F8c e:MLh$P24m@@x˄ x&dT2y,<Š{4@V'}0Xky?\T`oY*F ZTTS-!wz]%lyxI= F]`"Yƛ;g);{-j?ӷ_5CXEdE=`i}J;@RB(kRQ'~ ܗ3jάhuh(݁/KR <:=@%n!hrԸj9 'RH *%\4C-^n|\S7/IA)lqT_?.`fn1ݰV#\n3؁",.q&]Tģ"0m#!0OGGNy|$Z4dD;pʴ?5E^YVjber&5?1Җ-꿀1B{sb ͞:cE,M]CknN[tJV@5 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/20.png000066400000000000000000000022231260561570600273000ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗[LUK! P B_(ZeFH-Oc 5KS}0DV.%QIjF1iڴ!@ kV[Y .v;;Hl3??ߙ ~]eU&]yPƒԆQ2oLt7 ;xmdHOzQ*N#Z<~}BG # 5]969F{ 2a1Pv'WڂnjA[EtXzA 3۬g(on$9)ٖEEaI+*dlNZDUyKwIJގ) Oj:ċo]XM3PUF:㠋NJp%K~5}c=yԼҋ;@Uq.i* {|}t {DVĀ&]Ѽyo4}~{fHpx|g?oKZ ȱ2Cs~ J? d`jf^%-Ԡe\1 q@%7%j|t{SC)^y}&Qi`U)ѵӣܜ }l`(CȂ(V<+vot~_g;&;INU$72(ZJ4PUFU[3s-HM.X"6++ȦIlRr ~s4sa^U`- ic'6hE&N~ฑwY eoi>{KMqZO 2v ];8TWJsNj~u7f|2o@06up  systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/21.png000066400000000000000000000017471260561570600273130ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<dIDATX͗MhTWsNiE\XS1V݄f@C#M&XJc3*)tSjF4р6E[ (.D m2LL9ܟ΍rw9;ZkJ YRuXHpm/(AZk(1B c~9)x^!7fZOn}pnQ+aEOa72c''l7h%V?xq!Uc}įE?AJH3 JH?w#ҁZtx4́g vku(/j*~ق*/V,bYg-B[GS systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/22.png000066400000000000000000000021661260561570600273100ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗Lu_KS<"֘7j&]֒4[[ʭ??ܪ ( aVX3ڈf $i SKϷ?8{{.~?~B)JB:`]Q^kG(t" _QPˮHcHJēBw*%^X2`/ːV_#JD(l~^Yu?`[T*M~ ޕ<3!u26cq҆k\qTlt3FUdmHjG . kc2) 14΍Q4*%vwnN|6eMg;z:ݎoF-.q>ě~՛/Q^kuږCU2qm)O<;ps&o<$51M)F`ʊB@(y18 rbJ{[WYP ׵AyAbL:YN BEG4.i{`߰~Hh 645=$Ghh18m3v@v;.EH)M]c`pyY|*JgmR<,&1>_oѴp!Z05PΑ ]DSQ:*waKYCoCxk'É`v( [OUY)iW.xkxR1ObxluKrB,xF'6373o?MZ>&(eiǑV-sSS(%lǺ౲7xd0ZJyQQv#؝ rgi>> lB t? VxP+Vb6Bj;XLx̓˃b#VjX BA IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/22.svg000066400000000000000000000066751260561570600273340ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/23.png000066400000000000000000000022741260561570600273110ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<9IDATX͗}He{>\L9W9)Kd#AIQ6 hQYjsU#ɩc>qgsb{u=!F9WqN埁@'<,a&ogpLË '=bػ{R‡/A " jJY{N34^z&AQ8M~cS\Yc6RD(?fԅFZ)7y%Lδ͚8U4Q̃3əYbY0=[gh/_ ƀ xۨ~``)t0f!|FSpfs~-(DXDEXpbr.F@Fu} `KAs47n6ol  tZ nK(ji4h%쨫n b rDU$VvY!IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/23.svg000066400000000000000000000111141260561570600273150ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/24.png000066400000000000000000000020731260561570600273070ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗_L[e)e`0\d8s&D:Fd[3 aotK4qJ;11bD%tL2;NXu/dΙ **|^+Y7 jy~}RJr %z-!ѕ B(RDQ0RidSd<**;.{*y+ST)F?kjkwk6p륮],bB[Fu@Z|pS B7;+S\1ϭIWu;leZ",K6~J*XG-Ũ.9UŅL]LR&cueUxOKkWVSҥAK6ۂky C?Y . c 5!?:e{kp g$4!xdRm/).๦ZP2@F+7a DcU"wd\ Zt%h]Dkq˳$u$82q^_I` §90h3P5|^V7ione,CGFnPԃywt'(֡⤕q}SM;{*V9s~FLDN-<-@ϑ1>Bo/>~&:|6op[CF"@]խt=BGQc嬸n@ a߾1V25BL}kj+[X: 6煢OEoqN;辎B705y,7"g+rv5[Lvhҥ!IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/24.svg000066400000000000000000000055401260561570600273240ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/25.png000066400000000000000000000022361260561570600273110ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗[LUgv.hz) U*[L A%ڠM d}2x<-MkkbjD Vp2LJ]ݡRә9o?BJRBYRuz;*B*ntp)(jRk,ioL1!Pr!@ŗ@X@i2}dbjf :eɎeXA )C³l$)k\բbpt9a6%J?`xlNJU: @x-ᅍiXCR*N|Eueޣ?ih!.r?X&A!xyZܜQ@zX g@B00?;s]mN|T3i9 8bwo/uj! Vj Q)>gjSú(yiOpڴ;7Vt#\Fuy1=^oh EM7?Sq}fXRra9 vG,+crV\UdUq 6o>XֿԠu[y_8QZZ x@(jYqjz1|V(jw'A?z,$Kv5[L,?2IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/25.svg000066400000000000000000000073311260561570600273250ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/26.png000066400000000000000000000022771260561570600273170ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<?u|6ZnβTr iH!N9Os^1ys_{<#,%%UwCW"d R6[G~)|G*<%<dSJz[S 2[ѐ=G0LUqG{޻6vRUNy)ҡ ߆[(j a<Nu`!m=GA d0):LxSl2*1qk4`]JQ펀}j¯DރdRk3+&{:tw|c߀ثr 7QRQ5fAV?/9!׶ !A~K/I> Y?kj;GoaPJ]S>[uy$Q37š4=Ѐw{ S3T_&UYc 'u)=*oĝokdiIt &^!"+%7aoN><`pd\/~-m|b,xfT>9{q$Eb|G-Uפ;8_+xlJ9ʯn ќ3Okú<-蟋9/+[\SH5sksMү5k@ ])n=B^HSQ9`2z SU%^ڽBOkրrH1 ¹oc'ef#WPd.B=FR|4 h^-ﭝEXL^ʆ46ĩz~`gm|L"-fB^C2:<g systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/27.png000066400000000000000000000020761260561570600273150ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗]lSe9I~auSu2d#+o؍& " F*`Z4b憩,1,:FtiV6H_e1)3W}~-+rt~$ systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/28.png000066400000000000000000000023431260561570600273130ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<`IDATX͗klU]]a (c$fauEaLt|`,f21B2}P(Nf́d\$0PҎ]JG{۷Ha|zs<RPu|#EU&K8].p!&o^H")'P (%§29[u(1)AXZ<ȦyoEʔ&w[Hڅ ,ڴx& 7gKSo3X^SQt4n8= W'A$isyt^6 wMÞf̅Kq](%fwG9jQK+K^<9,M)>5igUU#2"cwyȉ3j51 Nb٥T<, B|_ oю XB06m*b#g_b^.S_`RA6jfk#+ᵺ>Vר.f|^'>F˃Þ5@{M)BF @ qh@F[6K<Wy>=;,_~5ǒY%xoϑ7wmX-ff<8YRu_*,5q\{B8s8{ E3&08ﺼzkS%Mw)libq,&j&3ڑ2g@&dUUBoqWU_2.z`+R<&)<>H[bLb͂G1II?ص$Gy 35[+82S28?`4 &%ꁕϕbB00']4;BW:}'R :{sT G\Q-8dֿ=,}[ZtL=0I.~yoW}ɖe(lV t^Fzh.6.7-hcoa( 4ﴐZ%g4BjӸ'ᡵ Ԧqk2V=\{bf:IasIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/28.svg000066400000000000000000000132271260561570600273310ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/29.png000066400000000000000000000022741260561570600273170ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<9IDATX͗Lu_8"Flh2 $.Z0XĀhڊlkS@ʆX(i12[!j ܉ Os<)2zu}???_*s eNsj R)@hr '@Gk+{# ANe}@z}*^{yF7(fATqI5o=PqPd},34G(rQ] )y8\g 2Tރ`>T֗Mh[+' !f.<ˊ$liV*s*KBbZyOZ*Ui,OImE&9RP9>nxgr [ol*eX =xQ'8 X^)&59(fsyF PK™{NnhnAgau: 16TZs75$'D#hH 7tcs=;FXk_0V%h=3c> E2p '.c6'-Ћj0;o|v,\ ՜ŧ ~=/H*qi]& PɥZ~y?/dPr[ TjqpF~͑߃m /[k?UzO+oI@N4l-DOԷ17{N,y>|Rr^Dj*bR~H`px 7D;#`o.0 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/3.png000066400000000000000000000017101260561570600272210ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<EIDATX͗KLTI*n7@{bGz0b|  Π&,,@ƍ Lbf3+qaԅ10 QcGZ'DZ.G2tW}!0[:UuZSHȂ\C]5֯8Zđ*}mGn} 7KȅB@K1E,H@i$..{U8hkׁ0T ε`< $.kdQ<J#J#q,Ȉۻ<<JR8h?y:jߟ ;ؽu-^(?:񉿮ݥ+GGJ@j !ιRІ ^9ɈU8{x/˗: *-.bVˉɯj@x-vnx ,Az )`::|LG&g,#;8>eŔ/_J˾0}Ɲ}p|k6T;sV[ y]DZq>8RHWGJ|sOān:#<`˸Ժut>w">HG@xޡwdsznpgdJ *dW)xٞZ*VWz Nf[ Nf*{Y1>/_ʭLsMkiXeTl6ؐɋq<$XBK"?o2b-.Zv{:̽{ VCehᖶȼK0'wޕT8юA!U0SB|iL\Kʼnz~܎=LQُD_eI>IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/3.svg000066400000000000000000000062551260561570600272450ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/30.png000066400000000000000000000023631260561570600273060ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<pIDATX͗klUw:.]ҔMB4Hl%!Ԃ&XLcT m5$&D0ڂF01Ѵ4$M)A -iJ>>faJ4ws=RPPƸ!w+ܑ!B;w>BRP\R%[~)Ż=~X(v)H5jZ׎n-qOQxW_>о`"^LD()nxxPJI|:j'9@Fw,yP\Rᄀlw:[{etXeH_a$MӞ@⺖*:9jj* xi[+]]@ zC.ڭ|zŹnî/[B1"4"PR\D9_bˁw6QUMz룼RѰ;&Fغq-d8Eb xˏ佯~/o}ͬ_(gr)?ç:yiu4W-Q+*@WA;tƽ>nݞ`Iڰְ.zPV:Q+µ=V5 T;OfΝN@12:5 >ӕeބI~/~w\NҜO q_@fU q0xOL2@ߍa} J6dg Oj EH3G`ȍ792`E7vRRn31aűŒ?HӎUM`,8 =D# P2K3A_~0'4[S|frV;w#cӉL\QaI[]1;Ie#L8'Z(|Jvn!EQxB΅InbW4R,*{hSgb);^SKS[R,m]WwR}53]%@cmXR;jYv1l`d/qZtA [xvs.i_]7bʵ MuIDZc%+,Y h+2 JOe}FGJܪ%% M܂ B^>ZSqꀮ5>{"c XPj ?W'kNVGڅWD3_?܌%1ǒO,?ɛ"LpIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/30.svg000066400000000000000000000114561260561570600273240ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/31.png000066400000000000000000000020731260561570600273050ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗_h[U?gӚbׁCu_ZZ|e"tk+ &eĺEdnK]W!j(5,OҤ=>4MRtϹ?w{~w픲t@㶁aBv+4_!@щrO!O-e;-xѯ7FEFLp㺦N ޳ϼzvԕoEB{+ہ4{IxF)Ŝ(pw|bY`_fiOG6TTm>M2E _2ؽj,W3JrCJہa%HKR4SHoz;[9:+;q.o⭗;[U.8xiFցl }G=y\DIT =v"xg9vk֒fE@n0Y5n΄RSpU|;_v;8ݿcƓT 6]4E]ȷ[Mi\;)M`!௻ӮҴP$ߠzX45UNawC wV-B(?Hra`Vԁ/fǁAN,ųsSpnms7RU8^LX"IGk#=eJ9|;UVzs˕r2H1WԠՔSmf2s@F*폛 tXZYe!ZXʒKۙݪrp;'^\AJV?TN}<ۨ8L1~Eg_ c\ L["8q;l%*QA?68+%!'*nA5oM*p`\_P(zBxJ(zOh%~fpL(z'[F rbmOm_Kx {CIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/31.svg000066400000000000000000000076421260561570600273270ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/32.png000066400000000000000000000023341260561570600273060ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<YIDATX͗Lu_/py9 IHh`̜1Zn4礵V-W-K Q?kԶ$H+A*"L@~sOq(2z|=<<!d9,:rzQEB*YilO=Hу"EuCyaBm϶ !RhUJ},ʁ U ^ttޱ/˖%`+Y Eͯ?V\`<E)u[0'H[L7?G:2Tt%xlkg!HZM\T8St1:Ĭ4ps`a RMRd*f5MO|x2{Ac1ں8|7:MAzQE~uh5k626A\*a7b&7% YXLFT)nu nE?)-Ԓ?8}^_mR1G9. +t%cscw(F'xٹe#V3q&:z.4jpW oܕ6zh́QlQt@JxM[sF *Y"` dB.HT2֐db`d/.4ln zn݄AHky׵-SUd0:)6y̽>Ќ Fj{OQIS{/vY k7>đ(_78ui> ]}üV8z VJg^}p[,iUKga6R`?؜l%*R9B'/?-&()fLkEDؑ+`D)\Xefpt#/@LլiNfS E5pxf"TǡݙڝIRddn>}tDGcsՂw=!ʊ|_Ou % {:{(l8 EƽD\ r_,v5[J,?ۀMΑcIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/32.svg000066400000000000000000000111441260561570600273200ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/33.png000066400000000000000000000023771260561570600273160ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<|IDATX͗oLU?\*xkeYZќJb-VjekpCH lڬlt ȿrszrEFwy}wRJʼ꽐j])DH' B.)k4<3&xlm巳2@j`O隺e{6jǾ"+G}O%z{ f)> PL m=Xƛ-a:qG  v1A@dR=>S62vsGt!( =:8jAlZƵ9,ۂ|8udeV!'3 _wz:z3.A~Uma|IvQnEױʋJJQXK;28Eޱ.RZa) |{7'k:NHlJ|9[;yG._不ߍ"oy XD}C!KCЕpc~t^n pw(:=kKIۍ><^?QsBB343Zpm$Dzau&$<|o=[4˗8xy /G(t!Z0GR8q>9!̪zT;A+BGhnF> sZ1+2 34v7#Ʈʵl.ɝ.Tȯm9:Je%.Mܵn*??bcH +oBpf[6f@܎5δ wiI 1y^B@t3!Dkʀ7rcGp$ڰ.]7#eΔ@699u^#BxG/hɝb8S<^?ě{Om-۴" b3lVl y{#r|5 ݂M!O52T\S5uyW &-tE/P/ systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/34.png000066400000000000000000000022321260561570600273050ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗[L\EsXn ]H#I0EQDU&&FKI-Hm"MӨA|hj6 PJE.ʲ3>lٳ̜o!d5*;`Yqau!)%d~!EBH}H` !vI)7rY;g* )#$~NS-U=Kp+JD~CB*Z֜X@Lyay8Smc3Ő6UcXԦ |`@`a0]) Lz90oA! =5 )j/ئ?`YoWSX>i6kϧ};s%yUp .Aaus少f2[F%<^.h"w&L! p) ^{?tW5lq_I|gN:b#HBnܠ߄Rj\_x' <漵:97G #m% JJb=IYyxU>;n.@ǥWXw7 ]zxȄ'طb1?za]MZ:CGg|gr[h%s_b!G'8{ 6G=IA=[{o#zzĸǝ$P}fR!I^˽8(q.=9§6>\;טHF\1Q:Lp=g:2:9@= LL{qn7%B|ghphޙoF[^LbƧ -FY[PiL2(s1S'[I͑ ;qdҗl^F'!.)f|eL@aMK 乶CՆkjV~(wh6U+Nfփ5gq{"1P=\U{b՞f+UվjHIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/34.svg000066400000000000000000000100071260561570600273170ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/35.png000066400000000000000000000023231260561570600273070ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<PIDATX͗[lUgn/]llb)Rj6&AMD &$_<(Fb4 Dj%P0i r 4ֺ-vݝaӝ Ӝ3|?BJtBVvv/[j M)CH7 EkBck6N6,*!ImRwv) (ڸ?Wtĉٛ5նu߆{[{˥|^hlm@Va%$h\%i"SDxѤ0-CŦzY#ysf1ەpz 3ӰےLPOJ:~uRӱ/L(NY4-*~;/v8΃?r!(R[D:$ۙF`8̍~Q -%Yb" ǸxB Cu-\DT g%5F9|娀t[\}Dլ%YDWC\(re<@`s aǖ57hД2+Vv[Y4\X<>N^)gMy>4_?? -,u&83g՟_Y_-Viu cP\ah$LYa._nd:gW} _>΃mPמ/`̻w,J $,[öU%l@82'ζe!Ϧחcv@ ObT"B~`\3qJhM1vV>i qg͠ V<ƳsII9?KoںƇ@cc͔d;֕c])^_)[m5  //GPt]Op&Ǹʨp8B.F*Yid;䝽|p_~!tr/WGIi39ŗlF̚JN#a*)ft Yƀ02[kB6_ܻ,˴hm=}XnLZmV D yD(ZUqj^سQ(Z A?񘶋I"j01|KIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/35.svg000066400000000000000000000116001260561570600273200ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/36.png000066400000000000000000000024061260561570600273120ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗mLe9(naё B6Q7jcķղejs䖭r. -˶ ʱ#p8/݇sx8/y]}u-$eLcR_hJ%BW- ESmS)rOmdr7P2E]R.o:@z)*H65loKX.5(Bj.+5J]Qnտ1vȯhڄGټsb!{wNqC{K}Iuh݊4̵~1 )yy]A7Vr!޿TJH`h DT -belar_\c>vjא8. hKRl9YFRH7i`T::h-66uпY*_P CX2w\zSqM$Mt;Wc}RFt<Wxj +zY Yf|(M)Q]p37U8Q]9c{Á0f|PDM&!Ͷa3'NqC(^tIQ systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/37.png000066400000000000000000000022031260561570600273060ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗]LU3miХHRk.ȅb# MhIK#ꅱzEc ȅimhh RQCtBng.3 K߫93|;ߙ)% e]˛YT" FΞC}+)V2eBJVw@J~o{ӹ5p<pP86zN<:GjY*(Bkq@X' e ENd"΀|Ŵڿ<^mT;qP1Am!A@A^6Odm`z [6YHK1-:21㋌{PK-RWcD:/_4ɑ*yK_|+V#b 2b\+9V 3Q4R&<͛5-)Ǭ/{$3 d-R~wC\maL'H3(knыL^)+@BU.\q4,Bs_%;x hJe 㙐j6aZՊB Y systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/38.png000066400000000000000000000024551260561570600273200ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗klU]WnlRd̍p)0 "f ?0,F(01*$_M. #! " & c iYƀm]vC[¸e?y9y9BJXBSu@0yv,EU Xڐ EE k[*dbw~|,5{mWd?t+nyhw/r<BQ.ZW3jS@c+8 6%fH8ԡ,CEz w2LHa97ۻu j؅㓱$qtu' )ŲK-3Yp&i&cpl7DzTo>gW-`Ĕ`?ml_õ[r 4J;|j4AZ; u1-eUl?"~ 'tq\]n2)l{oBhЊȀo_7 z9qtس2%N05J,]xS<9z-Y 4eU)8~^ @w~{NX5PGdts^JOGP X`11'ı iV3NN^9؟`qA;lVhF5=%|—Ut:c4Nc 2qSWQi=p;P{v݃ʹ}C 2Ӄ1o-Kg%2/AaڢܺÇ;Of1?:ȥvrmilXZ@~y(BӔ~r^AUɴD j"Px>]m`NV:DN]|UJv"FQ?ۦ% 11 qzhY-Lf 5)D9!۫55RRT ձiE!Vq! 7cjo9$8skKCQ~]-Ïa{A^y5h ϱbЏl;Tw#86o$>x=LJhhjcu\m o9Q Dی!HI#ޠNWA0b2rq<`gwu\MP}&oOw4nZD)GW(jYiNxa׺ systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/39.png000066400000000000000000000024241260561570600273150ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗]lTE9vne)&(b(j Ҙ (P0ʅ^h1$D܈mV5JQnuYv=E۳{PR߻973)% e\ӍWkD%h\t>CZH{C}Xs, !ec%xT÷$r"ŤG1f?U{znX/5SyS Em۵y_H>PDT[dڹ«2Rð 8㹓@?K P2) 381dZ#VӪR,s XWPh%EG̓ߡi9yه(v4Ɂ;y$QUK* %ZXI>/v)#4L/gu rmfyQ]vB?@QO-`3,Ε‐K")rVNw{d7QUÞmX&*K'>?xN9V4Mzt_Qxf|^9?H #4enpTho ]cݗ|jexv L4z;6FB)݆##Pvpy` g S@gIu\"L+xbr7p26s&/>9LD|%+]u´tks+رS\4v_iش27<~AC@055bU^xL;7>Rf[M"*Oo9L\`0G;yyŃṒ(@>4#U^fY‘c` ĎC?$JJ'4Μ7&"!`t EmbY497300rmcmށ##Cs+ټ!tS⍛kec6zO7r%;oFHg/8lڇ{<-b9Pn{SZ.}vH\+,Y_ /+l @`O @n!O^tM5wϝ=u=Bjm$ EMל= voA?z$4񿜠! IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/39.svg000066400000000000000000000136451260561570600273370ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/4.png000066400000000000000000000015061260561570600272250ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗?LQǿw"І`S$*I[&$` `hɵP`"A0j.&\e9B`-8]w-~{Ϸ}9G)JJ i G= Cy<N3cњdd d2Y,ʀ)pj1ά>/ĞDߚi̞OK"&w. P,E$&g33l`"癒9i7xg?Q Օ7 4L5:nzԅ.7 G=0>!0wӋi3Uz]SvXi2k5j \ⷴMT,pdm!F^?'?jPh@W3y+XAjVyU_{ng?Im qv ,"V7q^TUXzB!gr:47֡Nɍn7+˴SwVؗUlt8i`]?7}fzٻPbԲ EiY4sfLsN. `D|~q4Yqu뀜{HG 'ֈɝO;Ӭ+`܎yAycZ%;ddGTO^@3IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/4.svg000066400000000000000000000027011260561570600272360ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/40.png000066400000000000000000000021711260561570600273040ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATX͗[L\U9͡r´(TD$Fb11`5_Llɤ\1DFjLP/-Scat.g0̜SJA֬?k:B)~B+;݉sYKg)Bգ*ri%fJvxƷSlܞ!{@6N)%|] (=sDj^&qla=5wc寴(]^2wD zӕ!8vIz3=Gd\h?y,z(,8,e(`dFbGnOWV.9с+# =@e.S(Qt5@l!(=?=͙χgkqv׷8< tE?C&W 9v7_xν0-oE~/GrR) |ϴ>0 GIu&Z6ʎ\h{xKX%Gߌu^kP9.'<[ 9 ]f =dVoXX^`ngسRm.\9N^k'#kqXi)%:` *|=- ' ߋ͂ ;+~ٙ̚ uTƷ';É甛cgI甛s @Jr< Νddk1r,106e+1P˼Ci@='Ѫsҍoϟ ~V]\["'=؛_\+a# systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/5.png000066400000000000000000000016241260561570600272270ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATXWMLAf)?RA@X4$&z&p0!A&&|CH C($ 6k ಽWΟčqB" gS8u?Qi)F}1Tf-AKi systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/6.png000066400000000000000000000016531260561570600272320ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<(IDATX͗[HTAs<^ˌʹ hضIPhty( QCQtD6 (.*JLg/uFMӹofJ))#tno Jv* BPCm_CunLjq;G_45- K 3x%icɠY\=iPҸN _y]M:MD& .,5R|Lcc)<pP(Ee 4oF4`,td3ݏUJUBSV&t2+#-m6х<7S Ny=bVFC#]W:WX"T Jض޻m5,?0‰K- systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/7.png000066400000000000000000000014631260561570600272320ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATXWMkQ=5mՖPJnb,4~,"0EqD\ƭ?mlqQPnmEӀdPC ҐLsI&!̛9;k:^$ 66Q`<AKɰјdd NN>!^e>1, .e,<73mj/ A{֦}+ o)Cw23`e-y1<(]2qRckYkU.B6XUpۻ]Arvhꀚjeqq*|\t@oxn2e~U $T D4c݇;U0"ݘSnalyK)f>0"19s,vSho`tx=cDIKNC.#>|3C-i4n\DbǯbfCGqvk 2NˡMsVn+?n2*$-y_8F^F!i mT@ϱr˦AS~F7# ^8|[j  xp2 [xHxjNKVµi 1D\?mLѴY#?,h[IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/7.svg000066400000000000000000000016571260561570600272520ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/8.png000066400000000000000000000017411260561570600272320ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<^IDATX͗]hW$fjnR[T6J1ŦK+("l0Gj݌MJ.׺!ZJ?i٤ 6X&9g&msj-y~y&Y΅v+)Y?nq>#l.`>oW Xh8L.o7/?B}9~HTǻwTr-2ZQBA~.?vQJ{&` oa% HՓi‰KWtH6U XX,Тjy#7Cݙϵf9t!C5,+^oVXtuhݷh- 7i>k鐼c<4'qZ?iiy, hUܴ:"& P systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/9.png000066400000000000000000000016551260561570600272370ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<*IDATX͗KHTQ8IeNDAN(5"ZE7-." $6E$eh2sZ4sQ_o=ߙ5ɔL;`Φ2FIB{-ejf֔!. 8:˰PgT*u5|!\9))P@jȍؼw^p.= ?۷ @W@I)=; systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/dot.png000066400000000000000000000002551260561570600276500ustar00rootroot00000000000000PNG  IHDR TKbKGD pHYs  tIME :IDATuɱ AuPF> 4H|yIc{$ N$$(=w$Aݵ^ _ )d6IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/dot2.png000066400000000000000000000002001260561570600277200ustar00rootroot00000000000000PNG  IHDR TKGIDATm˱ 0> p@Jmq#" d1qT/aǑnxz IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/green.png000066400000000000000000000002601260561570600301560ustar00rootroot00000000000000PNG  IHDRtsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<-IDATc(🉁7ӿ0(\l,t$P [ ;, ~NIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/h1-bg.png000066400000000000000000000010651260561570600277600ustar00rootroot00000000000000PNG  IHDRdmMbKGD=n pHYs  tIME 5-IDAT8UQ9GKz4u  DK 9|atzn—OMl|]/=ϼx;j30A@ ,{F,i!2kX[ף]<=*;_`vԙ;luSn=*7>7?A%AB:^Zʷ{*2y۠ns٭Ʉ~c!?ozRuI)aΪOG^"NXɟ ̾{񏏡݇5Ymmew->IiU?`9 oVQ#x3ӹzׯztj?v/Q+IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/image_left.png000066400000000000000000000102741260561570600311600ustar00rootroot00000000000000PNG  IHDRX-*zFbKGDC pHYs B(xtIME \IIDATh{lW|%i.&6ͥ%A[X.B \Ԋn+ UU ej+,l) t[Me3vq&ǹ%i4:>sgZfZA0 V}Y/Uy*7cav{O !)u =3twoaun!' ȃ.eBp{oDCe~ }l!JPt7]>&6|=۷(V5ĖL_Guu>t)$v6NAgXх`N{uaԑ٧AώouTCv"l6L}:јGD!mh/So)SZ2]܍| z7"Ğk.Cx}zDMwUݿЃ !q5%P UuisM`N`5:etv ص{ CG;G9N7C$V"R Tv |;[h=D^(D\J !2PB~" .F& Eje4㧭,h4h;#c#(\NϠ袙YOhs]>ch^xtrCn{sPH%įD6VLeiEfQh2x*F}$u/A%' 8*iw폀?ZI׮A6~ +P>{D]DDy*3|Y7uL<PA=Cpɔ\ԃzd"1.(B{ 7`rA0A܁rQXm_1It6lF.ߌmoRzUFiSu&qi] V D"  KʍtE wi(&Ug0 'gut#yPC#l"N >k r_2?i3jFĖB_Dl)v㿶 ߋ?|q(/-ŃC(/,&w.b6 ѳ["A,{CesA"n/zQ'a4:D݈P)yxڎ stXh/`ʝD!RbQu睤edmtt#R7ϙ+waeE_ Qu rɓngُb x?PAge˨{ "k oOA{ۧ'?'VYON7Q>|֮.!H$#HK)@gj[MMTTyf9iMpEPD涊8=̏A{{)u儔Oƺ(2dɢ(⏕8kٸBLw0/x$"~% Ad2y%8ѪBx~6.)?<޽8۷S/a55MD7 |"7WxYgNPh8${FEą$z5~7#&č_tmꈴ#"Y.p)O*0JTQ1C c|rTEkHPUq2gs: ?)BKLFP@_Fg5#Gn6Qdl(B;=Px]܃9Vy1Wp(>u8u ,[^$5C.@02k =DbSBJ6 ­cϟ1+ D%}.*竴{! dWNIK;$wotA m-I" f Aˡ K>0.%XD_,Iz/cRF!܂4~g1" хm^H;DS=S)DZ#3x̻jKIs[t);Tt*mAG& rԭ_ 4jG Qu T_k"`?o3`KA2I)l:g^6гrG:KTWGhOUPyqQ%B'X+W_H]Ѷ6^K!X֤ F@D"bKf1ibAS=p᪦Ϛ,;]^y}gA93gHئ1A}:x%j , y{ZB4f"!ʔGC& Ӫ]Zej[|tc&ZՈAy*'iMP(0Sw(:zhnj&P7 n/oAD˽'7)>~z6mtЌΚ:ɣ뮣v:b Plv"AU?pxzEŰ'*SI)h ɢ*FJeY|gH˺uk&jX >6=_-#uti(/zw#/0csF74 $!?2B݂Yzt5#')Kz=G䷿Ν48BJe -,C^1m3?O;PGHgAHOгiNwnUDZ)Rjj,$ʄtDIOc龗M\^GkhV"JѹDZ͟GԾe ͒A0{{W#sda̿nWwf~ Z_allRJlƶm,BJGc-^6-h =c5\ǖXU j=Bi)uԋ: pGE`=ΑE(D ;;ut,VP(D8&#RO1En~Do/-B[D%sDzyhs_/C~ ]#ho_K2"?qAq#e9P=rB|L3T+Y٪t`|֭~aw"l]ڱ]QPb_OX ;a{rxul*p9*}A߾.Ɋ-|rU: <®5B+KX󯠎==3nnCĖ"W#jnXWSfzvlB_O!șyG)+m|B,B/]c/GRy(ץ{zmCD";;IwvZh*uѝAr◷Qo ۱V<7V,l9>j榫qqkx ӲO\eZv&s DMwW@k!lqJ*tl\$#""sEazgT@X~f. օPȔUE¯i`Me雑-Żvsۊ.lCރhĤSE$Zj/Š-Fo*Fߏh MK-(Dd>4~!SfM=)wئxEV< }/r?7=6&Ҵ9lوhs.ȯ! tiԇMD.>Da& #jn>e0VQNcy@idߙ;3ŒOېb?VYZٛ`@TD$VjBދhإ" l6. PC\y ?d! bL+c image/svg+xml systemtap logo Andy Fitzsimon, Red Hat 2008 systemtap systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/image_right.png000066400000000000000000000046711260561570600313470ustar00rootroot00000000000000PNG  IHDR)K=4sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< 6IDATx}VU?yQQEeYxVVFAOoYd::4:ًQf3V:aY)ܕMIeYAPEe?}ػwﳯCd?fM6޽/o8F`.Ɍ_l`jik0å_WӚ`hiiaf۝S!xg1 5U+}̙1祚u`vaDW͌ʚ0'-B'Q< X&0?["൐p'sazB$2 #"Ÿj'&0 bA kDWcC^`#Roc1bhNP!o'1`lFd1 \L3krܫioׇ|o49`* A\ lr[յwc5NLMU# yr3k f3"RG<5ƚ8ʛ1)y%M8q ؛>Ixz1p軆Mw6p'Pֈx+8`;VaVw6/f?,® lhT /o8탒z{d6>& Qc.m&z2EI&a=n`ƣtCWQc]NVUX ֟FrD߅xiS$*fO.%uEF?N>O¾]|6v3w*=X^OEFI}~c~\.g qyA1 ox7ŲC2ۻӚhj茲*&O'CK"=eэ:?&G{RID~w]zqs=h|ѫ(JZ,HHʼn]&M<^db{"=% o ph,kPk!?NbPY'hҙH ±tѵI?.gڿ%<ukG'қFVr84TD{/=3@z6ppp1)8XϣHg%u~'Grm(Z+=˚OM38_?snj!=í#l@e~M.R623} %&-:{Jׄy1ج~}vnykQ>[8KIC-ةegsOEk- OKս`m?qD={*vܙ'}LSRo-ءlؘJI'A=AIB?gZ <,ÆGDKwvק+dЍDޗ;Hilnq:*}(W񨯣bij% \Q[n)SN9~ "m,D~:NI=w~ MlTRW`k*6j7Q w8p(Q'E>UIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/important.png000066400000000000000000000044161260561570600311020ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATh՚klwvmzw 1 /%e"0%`ҒDIC!HmE@JP!T% FR5(JEJ uWJll퇙ڻH#̽sΜRLʷm@__5(fw~#Å4NAQk]BXViQkE9FvX>Z2yyN`e,[47NtTSnxO.,`TitÓ+9X P=鵺=&=n\ UaK2DPEM7&BiNh=`>O;F|;J k5s3M7򀵀R:óON2ކ ^$TY ֱ¾ ҟp%@=Gk$n_tcD_ %3kN`ZAkHrqy.ݾRBӍ!`*(P)g{ Qf؉SAxƀ{g,X)1phQ`S1$ܢϠfMr H#F5d;ujYm]?d&[N !(f1ܯWQQ1\YA6A}Iހn/sBJ@~bV`5ypb5#GV(1yXUZZۣh@2r$(Np"c}:аDF&(Ёqxt&}Wg|jwYJzz$cϋUK^Yu_% x F (F u%iEDB.eoCsjRt8ݑdž)v$)c1$zPR߶&K޽dn<l*]&A(K8I _$G~_Kb3[mZij uLBE)öuA|bub0e_h~)II/Hfp">~]) 7w`:p1+cF lHy,'5ğ-"Qc2%,H̝rb9FI6K !\QiI8 .; ڹs1` F\H+Ov$).U 7 T P@H!\B:S[hBnWGE*nO+ N#[DF:oD w5B-OD|+e~ ;4 "CzX)GK#E.g 8fC`/P$iS + |--S8 n846A^MPU@GPhpjI<0Fϧ|M zHMrhYyd|.+EG1E^5}  v~Q?>N]t/oq!?ȽҶL@_ j<^v逋mR*=f)Rl>ʨ(&1>".z  .`>#RJ5$_s/9Y񡇕[3wba6[1{{sݖ_WI`#5WKIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/important.svg000066400000000000000000000047441260561570600311210ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/note.png000066400000000000000000000040461260561570600300310ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAThՙmTޙ;3˲tyKI"5DcM?4jci-64m-451jK475\o;3sg;.LO99* !jGS)d**pеs_#0 :0}8qxеJ+ I@8<(Ujm !,kf# @(TǢEXd LaVƾtKmm߻w;H:ㆮmjH`-7ޕ+QUYPY% /@pqq cl{m+۶Γt‘Msqu%S\Au\RYz)N8o4tm#ч,"?~iB ckT"^ vD?\KKQ>C׶( |͟φښCJd]I2b՜< @pkg }˭P0buƇE3K bR("I| ~%?>Yb|ׅ{Տ<6/ (Hf`C~ '2VCq=&=i`.Bv\2CҞHs)i,1VeqzD*x׳|Jд.Ӥ-W0b.5~cP__߇ۀzc9wD$|yW:˅DM}#mYB+( Gˍ퀤U/P"B'e\NeFx9BKdl"+zG>rn U sz25XOa\#S}5/g G'`MBP~g*KvJ=,iR}B0o~3`"YQ}2$a"?C\kI#IW$n1:0K4kDs⦅Vu=YoeK0fk6k~Ej{p ̐^] ]8~Xovn蚀灃1 YGG%xR:vxwatl+Wx?JmXr`nl%tP ۿg/3Cځ7مe$#{p&Qkr#7W8UxمNy^($ZRku nT.ٽ=еc #I}o˸4ozlH)Pk{uhq,l{?0tT`k1`h m];;.1G+@ LSS3 N/wyYQ&0b™SL=wĈql>5vlLg,)~XaZzz h!q k==֓  _\\]\n~ 7t-[ ]Ñ`GJ5ogOx8 1tmo%Ε<,4w9qMG!ݓ_rX@kr%6 !5׬ҷڤ)SkЁ-YC׆}Tr/ݻe+SU v`**zf1tzu^{99<6b(Dӻ?ͳq>6='y =Dg(2;|@ef̞D:}/? f* Cז " @}a$7`~е-WKp0 K@8k"+@kuGPp$ZFN2zfCV]ue0" D <; 6IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/note.svg000066400000000000000000000052541260561570600300460ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/red.png000066400000000000000000000002431260561570600276310ustar00rootroot00000000000000PNG  IHDRtsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDATcX🉁w gIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/shine.png000066400000000000000000000002221260561570600301620ustar00rootroot00000000000000PNG  IHDR1bKGD pHYs  tIME  IDATcD&L &7FfU2 IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/stock-go-back.png000066400000000000000000000014261260561570600315070ustar00rootroot00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME+yIDAT8˵?HQǿGG/Y*ĸH\77 bR Bb^dY&^Z^Ÿ {MQPJ%8 :;;/ӷ%\~:550MnkK?4)ز,EuG|Y<Cu@0M!E &20Jbi?T6锴zLsp Uq U5sVRg6\"0IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/stock-go-forward.png000066400000000000000000000015341260561570600322530ustar00rootroot00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME*0jIDAT8˵OHW?3lgkHC/ ɭ=EJDņ](ȡP$SN9U (Z^BЊ)BŅUOq77Cge]w}彙w~қFz7~N*ٙ{_l\\Bx>VIno$j UkJ}(Cn''$IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/stock-go-up.png000066400000000000000000000013611260561570600312310ustar00rootroot00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME*;%`qIDAT8˭?kSQ{{sScB]JJE NLBKҬ7pRpA nT u*$!)(Ѷ'76Mڛ4Q {? hT*]5rWc 8numqYԪ/GC.zB@4}&7XjuW~cc#ܜt]?VI`7F\eoozm%ÿKt:}mffzeYl6fB`U O&hWU|guu5JnKB T*etxZ8tZVV!!DennRxgZ )%SaLOO?XYYضM4uݳCϧ)g~~qH$"J]vk,s ضmommYfFA/߳\@ |cVk0`#PH<>::t lJQ)b ^l%T)"vTp<608"ݽ]wJTl7 ]wL xVuۀcr܅{MP.G)d7Q华ZgIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/stock-home.png000066400000000000000000000014631260561570600311350ustar00rootroot00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIMEVIDAT8˭UKA}3**i+X $HA 7рn1gI,"=xYo-$%@lat?ۋ 1&>]fgo߼.KڜJRJ~?aW>s$BAVAn"f25R}Yt755E+lnnbkk ǵc}YXX#aqq1F_qE>mnnNF1#LFGG!mH9Y>ˁ14 B$wr_>GTS㠿n6M&=EQw^r {oU*LNN`6]WO&eY0NNN:*m.۶Q,1==MBP@UեX,7IRy?@ދiiHmj3 a%4QIxǡ~!`Ύ@i²,1aG)f26neY .˲t]A4MXӴ{;uݞ0MA 8^E#fr 8<'d @Sj7ƍVn=IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/title_logo.png000066400000000000000000001161731260561570600312320ustar00rootroot00000000000000PNG  IHDRIE!sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDATx}yEc=3/,d!U_.OPWU_DA9B}_ ;a@B{ݝݝݞٙI'vw]UO}:GqGqz p*Qp(@𝝝Ml 0('GClٲE&IO6/֟188hutt}G3$BZk%G3f[C9pG9bvvv2pxwQ755\>t=! <:w5zꦛn2wbqKЖ7ӟ]vQcc#wttV}[+ w<8 ԗ%2)Tww&":Hmˏ?7oR8g׮].Tͳ}b%'-+"%M^ڳMzx<.o$V9g/8q"šNJ,0"ظnεo8GIHRbxx l gw O 5ipl"eWk/8v. @VM6nf(cCyGqh'}6B@d.H4u% t Wx۶m%Y;$?<}%|*}Kgt f8IdF,տ=< 0*|}tڵڬ3*%g?m AJ}fK˲dwwA[ϣx@,X,fk@ag8D8۲S>}Ks4;?.VWSdT9<1~{.⺺: mš#<88hHCC8Q /yط:[85-N1aM3`X堓Kd2):&}8J8#v#8Q瞕 p;2SgL_忺.<n6lpD7:7lzfd txy'k_zy逓?Jx{|tɴfiiwV^Oz+:uA'=B` y4n}eMMSl^zCm;w\.4ggGz>E>ל3 p{*%=/jV,%yK5b$|plKU[]:;qē>3C:ճ 念k!ܠ|-_D/ݦ.ğݸꭾQ!#]oB3}!xz/:/Gɿlapt4d^~wZŅBRn_?K)aKVtkk+wvv`>eSS w -7w{tw)~mGz8ֆhmmLOOZ+'r:}i93ԯ܊?Ƕl٠::: 1Ǥ~˖eMS\[cOwr0)"͚HTw57=wJ#ݶ[KnӴ:MoYtww[A$4eL&mPs1U Nc93\._Wl~ʕr̙ݟ.3F[w'ֈWyg2RH!PD&v͙/9]_an?ڍW6o\XUo^W:;;BDM믏˗>px(K "jkkf͚ o~D ~bie'O869{M4iuiLO'xZF)aD` ,62ж/X#H)3R3%iJ]{ [,7D߻F,=5O'H Dlr s4"?;A/hߗ\x+MA2(M4 olj v~;W?w!a,aiBa`ɔJAdd?#C1$fT<wo!n{vSL7_BtUڱ~+V"[ þ*H)eY <뺢P(Vɸ1H@y;]\Ӣe0 ~]f.|RMw 6+ޒO-&cqh9 >MRqE}}}ڪloq%rWWNSx' 43V? 1|fGJ$>H %H- EH3r`g+sx!M \ s4o?[|Jo<7/}l'@R b!ZZ[mA8Rc43\.g2ilV---T(X,f+\K 9zɭ|HؾnV|#ڡWKUf娥٬'b qY/KPcQ?| dd2+ A:J`f)ɘ T`vpIW%➯~zȲ0z1R aYORxғ2ȗmֆ)x?`> G~*@F&tvvRh#/;r9cV+Wvl! bќgiX,dY͎;LKKikkc\WRJkm!|X#3o4^M/fw/Q;U~XSOϐgmS/2>y^xrC㗪m_ʺB(4yd<*yń HmbppPڶ-<r ó5RB ,R3fl f,:B2okkNc5 6ة GMfd< 6l ni_l4ߒ4rgzѳyD: 鴬 Y7$$c'^X."׬Vz`_QՓɬ5Yt%4!{6뚏Y-y1J zTW4_۶b/ 8& 7?9c|ooGnŀ\.G===B7H}}}d_bC")FhHxIcYRo/559oyk,m}}`0HTnz߿6_nR\&%FKyrmvE<;?RT6O9pTGz7N7qZ_ӖKZzlե<=CD #/~*l6ksb@:/ٺ&Ǻ9 /Ҟj~0tF+3 v% пW,X+Nx<p-+$H&#~ǯ~u%{'+#y6眳D^s%8n9X&b,Įntk%xg`WFYP.VZ1I5c&:#Bkk+Dz"N.;o\S o6 }?F]U8U>@?zw}pm۶#ts2ifQuG[CQR($ lcec^l6KoUkZt8+l8ڞ3IH5͘i'1r!>@&"sqlbI([Ǘ/G>[5x8{+OH--/Xğvl:{YpIlgۙ(6ּ60`m_~xnb ;;8w eد!͚$vAXŠ2)6 kҎp@ĎǸYж1$xKѬ:::j-+*lw ,ml`D$i Abz.sg`JQO=$.ٓmbW冸W(wQ ҋvyL&! O8?"%f죲i; o3۵my o{ew%́+X)xJn 7ybBrR`>YF$Nju1+z#$E~ t$H^NH9 Wذs$$wZ>444Xc1%/}|RJADRK-1R)B IKdXW]~a2?cMK\(ooox<g1&x1{Gp匩xY0>laalcڦیmZmˊv0JSlV@65KT]Eiȓ ^&<uP&\j\*KU?J*ȕ>)*< 1صf{UWd1آN 6t:-핶mKux&˲Du %,!J;!4\+S) Wo?c@dGl+VXfͲ nlJ&9W$r fg(ſ=S͖oejmvIzXà3IOFE,cUj"~`e*GLi 0vheʊY - d*ãm% <2e r9AP]]A@*($P(q-R&n/קt"v>_w9!@㨁>hܹG>އR 5鄔ȕէ/-1(Q=y9?9jGNf%T|^wwti|9E)}6YD"j"eRRsYĬj%nxZMꏖiԕ/@zlmK5'2 eZv`t={8 -Y!N!JlDT>86[=ֵ0s?3pDQi7oF,t:mANۭ.⇮}lt~) + ۳X:Yٕ|'W@PG D^BD_o:ajϠ! H|‰X,*dvT$.a`CE1%(8 b*2ś#Z @#a`:R(S1> Us +NtI+⌒Kxd+@Lƾ}PОD'Ϯ>_1%"08e#yim۶kKZʄ2?5ܝe2`ߟ[Om%?e "|""R^󹏕mA.wsz:9\*l&3("qK-("6P.LjP)>0~DOϹ,m0A|]W/a'ꄨgE kƮXuoPx^ec{[>ϣ\<ndGϧF7WXJqL\")NÉtKEB;B|q寜:("`̬()epY]t5|Z^.,:SƬcH BI Oj(J֑{%6xxQ6&r=6͞?j.Q=|bOO '2xFyZgMU5,Cwk_q / }}}^wwJx`?8Lgg'wuux<hٷ,:]Ykj36Q!`?2|EHQ X1Cو)IisZ K-W IfXCѡ^\RzDPfЗZ^cDUfQRK zNMQ'D)>G;bSޗTД-w=NL(G:H0I:=AMjs 99d2޴i&"yϣ152yP[zOMgΜXqim;v0h?h}(RHଗi.F/_mf|}%n奔`eYkmv\>J!D=$@Vp mGTEK&bYPya'@%" t Q(^rNd@ O4: @{<պq-^$'0JBk fYJVoIq`/VK5c\Š+̪UT{jAk=ހU?bKo= ~̺LreAl[3<1 jx#kv&Rև%c/B_d>  xx@'A pj,<*XESeV-F*؝pD~hŽ;;M6Zco۳x?oA!ܜm|p%/ܔ˃\. oL>fgߚ+n]k׌GF>-W B!NL&yx}~K\"4Dg4('cI\tZ#Q"zZ08JՉJJ 𨤟{ \ݫ^_%d&g@?/`up?* B tuu[t( V^-,i 9DZ'IX c7^6ۮ>ߗ_V~ԩS e`޴KB6KyPڏHP<.Jꑴ!*iOVy&0O uUR4< B$ГqKeQMX 2 {^#AI IDATDtxGUWWcK]RX./L;z=ts ypяUL-05gfj{EU9r?$|DF^$ *KT#&`hM3ib3mdcF ͙ vmI`;ZGFֿ5J˜AMDDltZyGŕx̶ZcTPwڥА u3;LO5r#g~w=1d/6ǽVU<"y+,xU:P⯔3o/j"nF+MZXL7/Kr!8h #)C󺜧_ٽP 3'Y(eYrC(L>7}}}P@}}.0s$材55yZ%n$2RGǐ}4pԆ* _Њ !kk@i>pf=҄J[[t2l3 VJNč0kTJ5A1j!30$ڬӺknyr!2Q諯7]Ν;J)2 `ެ4o",_14r? kc͂?r\wBԮ~ ߝw.dSikkqBXB(}wL0u$zu/uc#=PneYڴiTJQ>A4yb析lW/SZF9FI1y9C;nH>$w qKNҜذ.fauW?M_ 3[3\A2Px\qZ#yV&d05;`&}tuf:ڂ#I瀑V.?nut@ HCi}]6Ic#=ߌ1Q9i'<iGm^\A|g{vkUzw#y$~i89\+c+ be? !d'_VdqG`#='77.d < o휳#g͢esp>PWKĪUm4Pvo~cwc֢)Iz}jePEڏ!m4訢Ƈanz4@ޕSMD~~9ѧ9yD=&"^s{{f:)۶ |v} 1%>uN3>v西^?}=|kMbHƐ Pi+ A>yD !$Rԩ3ϴi\soy[c~3BY(Iszǿh"#BmHh28\n` RO*^~5AWkvg5=g8#R샱U/6y9΃qwTނ *w9(>"!=b`aZ֔y V*R4n527|!ãɅm3͝ <3nN:Bl7^.< ֖[)Q ~mnܼGIn1B1s d7&fA<W|^' =00ɤbҲT?Sqwa3a*c+}~+hMfcD |E ]߀Qw^x>p]4;-qFJƸRUH28T~e<[NK!{,̙g)S@Dc .X8˟Q"|AGLȽߧD͂4LIeW9`#ܶM#{QmU>T*ޤi I~@Ťiu-8n>(q3|zr@qsGacC0MPvUG<끎P2@cڜcr;NZn1&p4;FHO"ãɑNC/^ ,[q @}=D^Va.m}6m+?>d+1#|c2,8*(]y6&fS$ٖ}gˤsOD/CQr0(u-|ϦMf@!b×99v}(ӥrוΓ(J{-}8[̵5­3U ЛU6?yH>Cr"Fpk+IJeKRH=oy^vEh3 Ov{śZmI)eBk'"(cbvFT T<+ߏT*{zzL24L |<$=ѣ_?{^maqBp{Y݅1X߇.g%FHO(mm@QOPŏH|}*0Z <ɤ0kz~{ehqv:;8V{01ə&N8E H /~'CM&o)mǙ9B #rfRA<^;Xɢ*vٸJ&\.n۶m#pBM/=[0s8^Sώ1۶}0S[0Q+}q%|7R@Dda,d -Mm4PC⇪~E (Fu&0iß L 3)T,ʩ`zkM4B9ɫMaϜ :dا`Ȳ)U:>wEs q׭l۶mCm}庮rqCFm,#?eY4d"h-l"Y$M3 ,%XIA$4w6'^t*X0_Ϙ9Oi2ӛ0=!0 UC/*6~5qceg"w~/0A]cw]i%yHjl9s ڊ$?P cRJXNEokw]FMGp}y캮5U1^&--rNIPB[B #d,E\0KQr ueQDs903mL:70=,)jfb}soMCoc_)CH^L >!0%Da: R"Gy`-[{2ȹsH/w5D۶avh˲F:"–_}k;\cN;ٝmmmP(y.b1>l=ŤmUr%reYRJZXRk-4)4RR' ̂Yʒ6P$1sc d&0 icVry,n1gM$qm̗-D?^ >o7ˠPN76Hw!e&MVenw13xD/ Ai]u&cޫ%]vS8@R?@q}PvyhbB/zSOllg8\A`Ě! Ok SD1 |`ƅӊ^"eYb "A[xYuQQQ3UPB`W?\uUe7E!ĚΟ=kv г=M 7(飑F?r򼽽rܘ!1e!ϫJ)a!v5юԖ)j2RR',,+4,RjecQB!LIZ1,*!6^*Nm(.Pj=, 1DQӷ91B9 @F~fG\((F8RL;S⏘ ۧg,O; 3_yo\K7o>ɿW nth0򷭭 !/  Ắ4t]8Bk-m#Jg(%R*p]ZtZ_^!`%$d=F<hFMs+ 2xV$a/] L5W zP;GS)$$J&c`Jd7lF[=rf '5Y<G˼ ?81`Aϗv"Ÿ߈ʚrPؖ_hog5&}=}\\P(c A FͅPCH&Zkz-ҞiqT>J*qZ~"`ɛ  u(Jv EXk+R|%/z<P5CV < m mB 0Z3 3a1\f ZwV jC<Qkoį/ ;DŽ3.`^nL83￯?4.o<~״vp|7 :yMA5\x\v-Bxq.*Q)o7^6PFM瞻DnZ' 5H0"f(S${`hS#7\se-I>Mq&ݍ->X<z}<3a9mC:gn޿_$$af+f/ywB8d@mm Q !PsUF^fBz|Ri#\-1vn{Un%''zP$"$!@b{-X.PW +` \) %B 9ɩ{U1k^}R <9e5k|`wLFyT']cNKn3Q,'2)3{9N 1וk c?$r#cru6ϮV> <8 2{#]]]:FN;ڳܥnKS'ȱg|xtk?}=޸g>G@1o\&~X:Wu$ f[:;iN̬ u]hkt!"g! N}  Y -ȥ^_zX7?!868(‡&{ˑ]HzI H9M69s樕+WVW[JJl6i=4ߴk7`裻͸JL A"LLKf)q`Chƶޜ$]%,T-RAXhST n~lZ3-;"9=mvu>|`ftuXWDθ徛?:y%nS(se%R]7!վ5k>SzYZดQ 0v1qަmw@o9 n5{Zoݚ5k|x\ߺ%Tp& X6ؽs0yK> /BPzbײlC.>Xw%_Y_A!Ӊ\J~Qy<]:G3j"x](*U _N=d?5kLޫnˡ3"ӄ9Hŀߎ4\>}-۵H8ЯxLZ~&07/?ǽaÆ VoyZVO, :8V5(Udgc.%;S a/E"6?}70ޚm;~Ka>e`J_ΆJa,!k0zu+t=O\9{ګ==L=u<เ癟I=^|LF?_#ZVzŀhC]eW.Zx|___@8^ ltUt}0`y`z'y8[Jޒƍ%.[Kg:}y5)D\yl-$p|^X1w3=QKH97\qVǧ]]3YL;KѤ"0;אn?|rox=#7쾻~{-%yoU\:Rx>X\] equٚ."%1}]waʕk/lVV#ӾvXB3ҷ@Kmcw3~J<;C`ou<l{Gn&* RMqop'O,S:yr[V&49$ѓRiNI--_q=艈LGzߣOбG>Wf:1-ѨT.-x4uk2`1e%l\u>W6e3i͘{>>c+P.\Z;"qED1 . ;")(k5u*tC:ֆ\ZtzU1qzYlxAm4H{\蝗%J+GL&ǁ"∈ Z 50or3J{OO6t2V =DhBma.vAXw#|laSf lI?l "gˠ+:sճ7,y9ځ0!fqgmݐFcawcpժq`q[ş7BAcA^K6 %Zҟ )ڗF)wITj Y:)(>gvt#nP 2TulL97D(RZ Fߓ;BwGz)Inn")>Sۏ^'"`k܆rNCa pt} m16o<ׅҽ m<0^ <4c UnIl.@{vdg[o7 @3&.Bex\|?%M- H7+]jED;qLfxer*<6qDX׬9QJ0{WؼyS0^'"zo]xXZ(0.@ RDj(gRw8g4LWnh ap[^cbx=W^PLYy8?=\Gw_LeGܯ]ZĴGN|nɎSL ?^j?(w?s;w\sTY!g-  3KP^Hp:/\Ԍ؇Z #d>,k׉ nkW1x5ȫz7^!Dxϥp1ס:ǣ8t>Я']Z]oKoGOz[amlr\A3b+CO:jrY#"$"ܚ>g2"fP9 ŒCyST#" (AuL&Sܰaۿ,AX+Jmv뇆 }O/XDT*Ro:L3G}}}^Us?yg\>u͍y~+ua | XTrFN&и"HyecMU}fR4?ĻzP U)v4cd%&5ٍ!q6NE*3s8N!N{{{};N@߄6<9[4E:yV O<V^q]:""" HR*PJ1-P߼Q#]͋r m^u[c. Vz,#y@&8> U6H5u?sh)p&_ϧ?;WSQW616$$wÈ#q~TM/={7K h|U=6Ow߯jȀY#*s㿣0"(2s@DAA@>8{ډlOhÃKj rͯ m#]~BD̳VFJN^)E$Ӑ7}T\MUCW]3ҷU!v0jʸ'O>}:EQT@kM,D$1_,zY趫;`~"abfk<X>B^& ==}Q"DsXL jJe1Ϊ@_v1:8!ڴQ/ Ŀ |EW jVŪі'jnkpg: -ym^wrTՈWީ,ZGOc)8|}b$${p\v\I"Rq` gbU`y,G#hyܰM0"Kz%N z"G搩[xVFJNu; 8 ) Vݼ!3GJcf3ZkߥS8i~OQPQ\V<}T?t>vR~CʥRf`p.Z*PW7y'}T ~ro9@*EEG{E0ռWzbOS[^sj0gL]6A8-AֺS)!"OI%ng9x[[o޼9)& Z] лL-W̃ӟ7m6\_GF~^t( IġϘB ;(V(3#꾋ï $UKïoZꜛIlZIzx<1AjĠ31H:E])sJY?( ayRl/FhM:XBw鈢}l=JWyNQ[#XmPNKڙAopƬ:T!3###F dAЖJVKwO='_~3p᧸߉D4Q/LH5u<T&Ii=`TjGyN4gs'Вg[M"(\=[1]z6 zJGHg2k|4:ZOFBU"~@EۢowOF&{;V-wRuˤZ7N Q$ɤ)IW?iӟ8Ge&zF޸܂]z6QK^B0|~$Q bq"kۋhIK2VA;EdͮO_w:BD1(z0P33L'+hX%Q"*m0 'nꥴqbo|/7{DZq$j_v8ig@$^rQ}ku0ݦo~~K1X(=mۄ6PQu a8 *r>kԦ܎A"2}`^MӂIRTT 70[4mK=_.y;~ xF BN묚+ۘd90XJ F_4[v"Չ>_o|3f޳Cإo5}BvQ}))2uƴL܏AJ_D0*и8|E+#HLaTI_?VOAE㤝^l'G'u-V߈GO~ `f9^!;1w!TWV|ч?? Ac={)X;}ա_i\׍܇N\gi[`Kd=&r~ m %cӁ㼛ϊE 5zf.QsI;NJ*^A[)t=s7~ؖԦ t˝śQ[[H/ۯW:||,Y'nZ׳?,v[A8KDUIQ=V VwI€s$ˊ#(Bz]z69M}:K ~.V.пTm+?snC4<InF%__ѷZc_$u'v6yj%Asga!⵻K?KO2W,(|??ֈ~|.9Sԙ_1,è8dw݇{瞏mo5_bJd`IL07U}Eba7?{1GyH~eSe J[}03` |X# ' "rDd&pl^7GngL!qW>\.C |"K);Ae ]m?uxU5 -.j s͸w 藾}xcqQuډhm*" ~VPsP<,,:Z]~/_x=iMx?)B׊?㢋^K<+8dq׈1۬kөn>+ *cؕq7nX1ghY=0i`r( #~6#X DԊޙ(,(F M4 cllCD-;/;ȦhD1P [Q'&#(aW5D$lzNJU 0,s N,Κ1Mʖ$&,gp"OC@AD:{'YqJ c<U{߂J5%9%LI_p юfAZa ZkDw%> fGxIYtj'pl,Yi7rhuX_(Vb^x8{ |0k'qSO^ op>U֡,rMY({xS܆>#DtȘI;%+'75Gf[.Ւ?YDL +`>O$]aR\q-%˒G3uσMD | ?Y4B$ʕv8ɢ]0\ÃYX8νOFeAU0"N2 ND'X! IDAT2٭m(f ey5&rqv[^Em;̆` a"Vfduפ:yf^ (n7kTYEFeт`8=m^vo@nQuU;{8e"#bf/cMD9Z^5 D}k4o)߮^/h;Yե4X"0A9mpF٨dwzim:Bhc$d Օ9pkƏ}IX}V@qU @1^"9èz/3fԪ]hзxod.ʠox 0zfԂޅMƥa@^Me"^E e+v[qIU)ֵT'IuM3>qإ_*d4E& (O|2:Y0|=w8AhGQdmmHMu:}~ Z=yt`ކQ^T Ω#++=kxJF0K; ij>^ ֺF`f,~^^VTs f#y5wNr+z0::L"x9p^qHHyռ0[rVvQ%|ظj)GQVV7e '2ރv%ܝsWBp/i= ;QE!"qѷ#.wAc[:-ԅ^&kld yvּDDoځ yLany?HP8`yj[0 =_"x.{n!L0d`Eq7~׾u:LY *K8L*XH9 q vu3㾎E/D4c)h/)c|fmJv*fqC}G`bA.p+K*j\ED߀I ʶ%f=0QI: ":u9IazAy'@㜇jzLVbѰ߫B% XpgpjyXM6X,]{ Z0< 0>qsњmԣq[?xG`ƵqW~3SIݾ #1LqUN":fCD0RIUì5MT;/[(tHam0L%IIJ\1]~Ǝz޻cI{ cvףQiu:W,zd#kAH$ٔUF&o6h[T?cʰW`6Vџ̄YduEqv`ԒeԷ;oA-7,Y9و,Cof@-C_ l*3`k]i0!Y3 `6_Hմ`&)T0 b <|OP}I[`$sbB= [l6`z\7zYd`3ڪ_À:E0g0)#׎/;NVYsIk v=Ծoa@>_(.A󧢁0ڞX`e)!m}9{a\ujt4dG"=x9oϵ5sYFO 4+IFAXG تLveinQU3?~v8};`R}if­oBLe+t/yYl<tsu$d7@vAdxb}' `$ okx3ס2qk=F0a$ig,6*껙4xf2J-ֈ cy.k%Bm tm> ctLT4u4&Z7Ċ_5zTD`J(ov17fg϶I$V=j$I*$y$P1L*IDi":.ߢYyciA\o[~QaMSIy߄_3%a@=V_- f7M"U*g%-+ \űtFlVORәGk]=NQٺ5広m0GaVU i?joh뺯_j.ZKT DQT>i-2wİ=&R@ODtZrg_E AaD^TuV8jiekkN 1T)PJUf憵5V@8I 8J9 6>UKyIa!z~Iږjf„ Q]k)V-~<DJc JMrHl zx`fszʘl%Np uJ  d6"l"kG( (R"FDN p#dpF`5T*~7JeKR([+<Өy^q.%_0BD/8Br D䵷w zf6V/"嶂`vi\n!cm-b []u  kԵ@J8ݝGۈhR3cECks "y0:܌t:]( ֖"M@TXv1MYMAdy^E'1_3@EEO)Zdkh h6&)Y'^Ԁ-NÌY井E7l ~'ђ3LAD'TiΛ!fBofY8HմRnt;À~ `x#+iQ,(Kv+~u85Z0FI&e S6eJI"`&_k0 Lq7.dn]+cU!fuUT5r9bK=3ˠ0N"RQ""NhDk]TJ RJ A`ܖNWB QnyPPkoI*Ҿہ6mvm[ngWWڲeKWo 514D%t-Ԩ5b}ugD_┡t:R-)c+aYXCiM2B$t,tZ@~^(FQstcgYlٲe F衡 R$k,ACcLNoE%DE#E ( ]X,\wLẠُP{4H$`^j:Fgg'6lhEH '"fŢ_JC/W{|~|>JUTlN:nŘyq$g8掾yLW5ޟ 1k(ӌ3httT)/NŢf+7 ""s=j"uSJM@E̺*HFM>|>50D 1((ˁcRA6:րEi뢈Aowt:=]7S_&3r,6J:@Dd&bpMTBN:F @pt$Ϟ=`lj<"b|q֚Rb!~L&cc;̙s)dK}?VD4u]uAD a(O)7ϊ@絬VWv^\(A`gƪUjC`w ( ˇa8200PD@eԭ.@kq0x%SHpC۝S(v8v:;;x"AH=m+筬)-T'zKD(U09UEe2Da" 1oD P7@4m 7ʖl^ dY8N"2۠ Q$9EfcS'6L&3~rZ@Dp&{lϙ FP B.kxsgV w 3i-9R=Zx9xkxr \ ! 4-~ĉZq$ 9On (eNOzy\Uz֚7C" _IHڶڨ 0 +Hre2c,t{C?oA"H+@A@F (F%iOy qU:*1qR .+p"Ͷ0lnC0TvdL#Xqi&f iG8Sh,vEȡo,ԛNCm0 %j+‡ɍ" `hh]'5{& #Rc??8)#د;J OB!h.0u,E{qROoذaŋӷv[M'gϞaFJ褫, ECP 0 ]]]ʕ+#2c /H+!g庱ĀffA88 Ŝb3%h%rcB)Lx[K]]/rhLNwb'"? ҁZQt+*"B'}n6Nu]7JUWOӦMCPxj%!vZj9y.1֊8(3g##1X8 14iE5kZ6(-)Q`_{ Tv~CCCA@B]ZhvUD* k}]v@Y|`ڣV_C̛(MfW3s^?бajycD hBG!LU,MQrPkȍZ ڊ` Gc/Zɑ𭡡ޢE>Pt*~`={ŰEbŊzIӦMQr]Ux\!5xp5N'8]sf^\EZm '8})idنk Lf{XSmǣ0"^MN2=K˖-kƖ-[ں&v~_DfRU裐*\1*wwwCD!ْ\%~@Dx3 :G-/+Q(b`gk̛.%l($@KU@бrfRCO eAR@c2눘oWnZh#;r2kBpR*f͚RaiӦ#Jv]n-Aނ(>uuu-ҳD@uG~|@UUbTk]'0qLЬT41]vdf坒@Nu9Tf>x⤮/~F'㎛# C6C-UL! VH ݓm4cD\h <7at9;쌈Dc6eNeJ9*Ѱ5lFR*KPU:=3m@]߲;}rܹ L5T;"ED52T-Yr̼HGZ@@G2Q*+WV"Qv'癙A}aڴ']dr~-[Fl: _њ}aL&CCCujf%8Tiȃd;zQR9&eYq[ RQfucGy)*b;uR0't8UY5~~ 3pjkQ(^h&4,[^m yQp bO}&L˚EanI9ri"ۀwFx@kVJ97d/ZGbNLE0z;Ǝ͡bHYx)բ+MXzmPl]$#a&ӝKCf\(\"@`&.]rgp #Eg…]prife}' 2 =Pn9`-屴m9G6ÌzybdTZe[9 tdϞ~D8#ΦW^uU իsmmT7DD ɷ}_㦛n|'` D8It Z@ yu CCC#<@M17Dh~=$ӴbdisDxD= 4d['vz+u 2\ zf zfB_t 7T/^ʩ7rw fR{0KblWpx( »uX+V0|v=])u*JZQ?=޿Wݠlt<M*I lv! 8>D"4 "h=Ek7O)Riя8,\{RDIDATN;0:%=D*ԷP$r^m/]zڇO?㔣49ZdhWF0ė^rSg w?%рΨ&ȥqJD{Z)6T~׿uCrz6ʪ- f1a :L)ODlͦ6 ļQbb"b",,=t+W11>8A$φܡE?A_Hb| ">S -՚F bf KD$GD[7:}))(2mi ,,bf p,"z_~^h;Cz&'+"mu*DƦq1h-rGFa 57gEil/^3?F=׹^ G: BT4OMZ˥ z| \" E#p :S/`J)0(bdj3KD*AsDDH|S?4}^sb^!bޝ@Lx-i&'n-[NJ Xa : 1'Kpݝ5$ vlWΟ磬-*e~:Ĭ B7+$QHVCY-_@B"Mz@3' Pa"$!EQF/[DDLӂ(*^F #DO=ǙO]LDA q'yu-GAAHX\ |p*)'ve˜KX0MC{qNt vRTF agWDw/X! .+ } iJ ,itDiL@y0 ѠoU$7xضe˗Q]r<b@ Dr:0J^&q:}7`hH XkW\D[0lMf9Ã̰VzU~( i yJ^¿9)8DM:Di jsȲe˜^dΗ4S$JEr`鄦v@ 1eGxTvٱ;x C(`PZ&SorE y%*G<7 ?vnq,Tt3 DB24K ZkYs!!Wi{ZvAKZ- S]Um\CRDPd E业$QA8??_滽p~կQX򢌈t)Q`ȓHYĦ:U'PH*be HI9fV*30ucM}bb"͞={yMaDS+0xPAث*QZc4 H]V]tG婧@? .UԈ#`#V%e;N,ֺW@_ݝ $`]Bq7d1w0 ;ѣGOx1upW^ye Xc˶JDFSDl t  %,iY>??冪W_}u9YkQQXE{8m"b3Sjz* M`քY!<=5"l8,gp!3wFZB]UI ' RE-PVKtH,Q*8f&e"GDq!5]U9z___[ ժ!{fiOXc[؃L7KB WUh=[!f4??2FW^yeӳ@40QTQEFu9!#T d]IDhvEcBf/0XF,{b3#N`Az&&&088`n,3QR5kDbD~l zg:a:SWfK޳͑W x9%(nYXH(ꌤ+r.f I5̀ilO;18hOtBsI=R:2ÎY"%HLjZ#""F֕52ƸG}e_ovL&Sd2ފ*8V`Dı: #G/w/%B2$g-o!ۄGbrL ݵg-taaW}8{RTe+e. ,X4xyl̑jWRgb{=f#Q)/'AIXW4$ C$I֣$V[Xw$A6EЇI$Z C= ࠬ9ZJ*ai.Hрٰ7 "X$z]='$_>%PPÃEQbU5e4xÑWOZ =8Ø_j;ό(I$A-Ih|2zp%E ԄMlK֒"WukT[ 'I 0&b40^z=Ҁ|_o<AƘЧm8A'kƍ|1Ec>NRў={9ouz펻-#v!KK⭵9k?=&3Cs@K+PS)T*FJ34`:UvVd2ZT(ɘ0 M:ff6Ap9TuM$I"Q0;X[[ݼmQt:唦iEsgEpߵkЗ]Hh~~/=<ttthww...J;aAZXX;v裏>}}}gm[zhbbb&qj˵440HJ:V&iz!;4ݺ.ϧ]y/SÃHw殮%Z[[nmm˹9=2N(+sk{,,,4K288ȭ~{v}-'@8e=ֲZu;圖I^y!8tQUahsy:zy^iキf3JymmfWN62~m^el;6ۼvmyl*cUƶoͫFy%P.F]! |; 6 %0@\Q)<ɵM]AVw{uP*zAQ0 Lf w2۷/<[4|_Mqut{0٨ }[ x}(xKMӝ)(HZ~ aHc'??s c?.U} ȽT.|PxQ*M^ 7qaqzpGm=_¯xk;[9#~Q*O@3| d/, wVk|| D6r]~kABFD ϔSfGb @*1埁ݒK+ `  eGNU*zaji=l>›_r<^)\n_,L|; ~`(;vtgpH\o߾hȽ^hڔ#G.}&#l>i=&?R9~@peLO~^774Ho)LX^>z=sUwGB! wAn^;rp+/V硡It"rxB;@ {C.7r8< oF[ ׭Gc(<ß*]VM5'bz`+nm=m:< z,@™t?ozz@ o@qx>nW*JW{CCCϋ24tKӅgCřC{ ]ߧSbz28m'9==uxm| ^T+%h?0>>B|Mic/+y@oT?ŏo^3iT j]mN@/S6;r\o<7s6!_d#W4gӿ@!]Dԝy||\p6 i>K9sAuxgEpNˑNR44Wr#@;Et VAu <$dmKzAҝQ*W\Npfˍ=T*f? 6#m755Gz|87:b8WmqZ, i RCCC+r!"sڝ?8\v錒VGG%:/mOQmT|v=`'RPv)L6V™P8QڐbB$@.{h4ɛSh::-AT9N祈`/[佹-',f&SNjoUr7ޛr.ϸ;R5Op-"i :By c(vigf@rጝr (e6- op1CY(K6-V@h:gn{'x7Tyj˕i87G~l[< 3==xX@?!*q$}S43s[>ljp܊\.W"5T< Qn R> '?0]PRѯlNaOk(󝥙@x;) 6lz9TJ"#_!(''y[,o}Hvˤ Oz׶&|OEg궩K"~R:8I_P& 榧_qS?>O) + c/cjr@jo=xIR7Ksrªwo-ĝ̵~+>]*V[VoL788g_*ҝQ%Ǡ_lkf[/ image/svg+xml systemtap logo Andy Fitzsimon, Red Hat 2008 systemtap systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/warning.png000066400000000000000000000036251260561570600305330ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATh]lWww޵wg㴉T؎Ǝ !4 8Pߚ`C RT}!g) }HHRBRQƖ? "Bhשϙ쮽3; 4{{sW}֊HІ[JB˅z:Xu͟f2+Wᡂ }{%i S1Zl}rQrQyo5ޥTQ28=>g?&| XM~0t?ҫE:'qɏ>!b@Qc=Oھ%to۾;x'z/,1xEd^<&?vbl&i m֓ %=BaϾsO?Dx4<zӶCB݇wMOX" js|<a4F[]ca6x޶}w֎2lcaJ obC2RDj{ w| %jԵ+ox h |u5zޑ<bU@gGobD|d.n"V ޾]GGȋ(Qqt^4Jl`N`,7D{N־zv,FÌ`}W ErKK'񂖱DMlE:D8]/*@BM~l2V,KK{FLz'涌է9IJZ'cEXA 6YZȗ歷Nu&=#n(}WEyz B"_AwLc-Bzɤ}8F6`/R;>E@Kyd: ۪m PO5wo2'Oha:Hˑ 'y`Ʃ&@!ܙ>hאMy@t _ >LʻNԇj6-x@ˤc>`$&9@Kx-vT)!nT$1Ed"F4A kRȆI6`؇} ޿ݤ,=!\?dk<ځ\eqC.G|ɹG p % ع8cph˒/Vehk,Nbfw(*e d ??Ɯ ټ1ټTX;5q[Fgo<,piw-ߜsaR;–}(O{㋭nhk@T#ǖLޟG%Qe{,R._%: bK95q*W%.͖}i*(tsՂ S%JTtg {kWްE+Hfg"V_/0Ƈ ^G{Tڪ۹8]9}%y{h}R-b*?Ce÷In6"–M'BH͟a~֌'UnjnH^=TbG(FhA͏`,1w % Q-P' *ePP-З¿kKEx1{f[+3Ց0|' o_oH.<8#[-CQTQ<8#%@S\忮$TY~i#foFVw:pCL((g&00EXZ^ռsOǵɰYukAțoOƫ3bIENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/warning.svg000066400000000000000000000127441260561570600305500ustar00rootroot00000000000000 image/svg+xml systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/watermark-draft.png000066400000000000000000000614251260561570600321630ustar00rootroot00000000000000PNG  IHDRߊbKGD pHYs B(xtIME !? IDATxu%ewYt%۾! Np $$Xp.I  C^,NpiXpfx xx)}V !_?VO]//f/%B!Z'+[#lZ_.13}룀7W׀ׁՁ݀U|ST`6VwD.6!=p^ 毥ϻlR:L5~enq`A:5o,0e*緽, BԾ>lAuv fIЅB/ ͪ>88>ѝ !Dop#R6n[t!-B7x;/_Wn>}·T?Ip3@!Z./K샀#2fbJwY3t!B>8ذϳFtI콒] lQKN] ]!zb< w)+kQOw2ڮ.,t%B|,]70fg/wrJνE:g5&k ]V%q1_8X̟/')A.x<ߛV9(``zES!DCB>7|N,׃f@.J"a(n~.%a4-Y+! !Dх|j4ʯM'oUCx +kr=h]!Z)ۤY99'p^0{3H`&`vz]!&KTD|`i7(IN9X/!B.Z+y'=׺/}&Y``6NmM!/pM(``ZW9@0;_x [O +$B%3/J܎~uQx6z  fOٗc7aYsW- !|p=S;ډs6pheC` 8˒-z lG0Ѕ5ssIM361Oq3;q%]-j`6hWTO !Dy؝)] :%ƣ,)z h,[,F KЅU[l)h- _. fKπ]<$BJ we f``vpʲfUq;xHr BGJkzz zgMh=T_ f$n\|! B>}0 pf0ۿ1V8X`` = .(,_6Yx3;U9S1"mlkB.Z*e{NfḂ  1ْϳ̪;ꡚ !D%7@ۺ̟?f;OSz'<4\y~쭂I~l*kEud`vz]! 4xJJiMf'7+Ob4[n_N~W.MlRڣ[C,~$n5J0LNclb.:|F0{ϤsxHމzʣHqBfx41kne1;j,}oWCV 6$/ (裁𭇕ً{b6㯇1TӴ[淋i.hp-f붨opc=ǼV5|woeε*q5"6σ ..ILfŗCg|ԯZrcv<R풿OGe㎸ZX}X$)P<Ҡ9Y !:x]ė/k7XXׄq-G[ZÁ,$musOQm-xZړҎ,+8YY1cfBvI* /\gi6YҚf V,=i4sJЅe}s*rR>)`{\BӚV`Sڶ\DNA$B$˲;86m355C^Gs fcxu`ς^~۟gw bY7(CE|9*(4`p?9qڂi^Lx4CB! n;[cOH3Zfm57~mpjă_Ux_N xɆ̎(X{Bv;h ' y?`Zr:xur̺ef_ʋ=QFp|npe6߽e 1l}pn)f|Y NTIvt!Dd ꙩ*Jf}sq';ٲD¿#bM㱸1 b l f/=g1n-Pm: 10qh`ɹ֢oY W3y~t}}Fߗ\gQX/s~ |[T*&Uٺ7wMkp&`m}%ՍO?БڸlT֎a#\vpMbۦVg{#`vWӠ^>& 5C )ɕy>˸{Je줢y,;=k+fϦ˸ygׁ>YmB ߩg0K[U g\gQ8ݯz7%B_gb,3uBɿۖSm>.X{,Ƴ`¢K+_ge1OY 35~{47wB6k"m4D;t!D ׀,ƃq_Syl`zgz,nrfbOЯENo?VJ"pE罒*'FFkiu 7 !J6^^:G)ڮx6)_vj5.l+8$!mAջo8-Tu^gQ8?_/ ㆌ(p-"c)QGI{̏S/ e1 zIw{)LKuKj˒Wp xz> !Z=X5ִ^^Ӛ>P. $2,i@߽ Qg{ܜ~QZ=,3>m`vZOG$Bt Ռ9䢂5j<|L ̀[—~jُ 4w3*w;3Y.e5@4ʃlPcl~,Uq ߺ=n fwK}2w0̾J+#KТti||_^.h)ă|7%H0;pI~(mkj}l{`&_U8``6:of'xn21EUk J4<-USn+껞:6IЅM6ӚZ2P~R2?WMVGX}H0hiMS\\Hu -`k.r"U[〛(\]Z1lf Νv^&̵*kۘ*yZ.h/f1ޝD`v^sv9 O0{O Vvu V:f``ߗnóuc v/v Ytߏpm}pz,xJӃir*=`{g{ϲKeCfiyF1x,}F~ԵLt&o{䑪vlzQ:!}uމg6mt!,aVhB}CZXv+^ST5lj8rWOPn+Ocrt0{ s+YC e
    #>;PI*]m9ꐴy>3x=("mL0[?[C=I(.*G Ѝ hвK_!/YW[W9wNb b1 8 !Sz<tS|LwkpJ~EIYy8s w%ss.wwrL|⯂x{8%w݅|$X쿁kp*}"d1 1M~Hɳ_d1P~~L[W_ fP_Ewx6+/1y0۬Hb8]㉸v}S$]ͩIl{0ou';*i6/2T/ÁM:au9LYGf1n,AB7q<>m%d0@m'qG(P:)TϺl$ޞGO#xZk9hTr/LY،'Sk[<>â<Ŭ Fi|ԒNb&p63_-]Vpl,KqxZV)UG݅9۬S/.0$R`iZfWj(Nt!_ Yknoǭld$%wQl!o~-G18[$1b2`TU Mxr*r$Gu>V@o1`#1뾋<'>Ʒ\>J~=.Ng$3/;%+%%XUnVP3 ͨm03k^R`vh'uχbyHk㡙ma1_(ӡ]pό[J~t6{XU^Nrß3p;V1N0{Y.+w?q?-iݧrUh8-djƗQb@ س>})qc|8\.{}sQZX||p0h9ʻ`Jh)Q9_ۦ)쨨9~0e|XKE^,pK!9{3``mi X倧S̀V7~M,b'g}e<:%l9yl~E?_vWp{`{.-"cZx?#͑ixolS[tڇ{ <9Uzyqi׾t & nrf%eu,?Z,< \̾Exir*<З hs,a֭H3Ÿ-ϗ%/UYV+s^mTͩȏ}5i%袵|x`-r,ҋj`nPxW['x-8 +B f{h\ _Y="'vGC<Ӧs Cl nRυdzo> xؼ×ӫe:|jϜ~7^'It0| G욡>}Ó9s*[|_eB˱ݷj;߶^KuOi^OK;Q{HwS|TDWK/ =EG3K +9E|~t|4Y1"'`I/oaik5Ã,۵Jzh˖v%fO/S]IYU&T`vroõZO>o/ҋÅ2-h]Tzg*GpOcPUʵEu zxC7 f6Z`6)q?:]٥Uz&JY|N~: vV n4C-|L3r*C w#^-A}7NȩQ)9q{rv0[0tc&2A#4ZjpWO<OY_(d]㩖 fg&6l֡%-=cA9p8.sBjy[om:9+`/m< L6+ ?\yLhs,tl_">>'X.Z[.Scs?u =ݾv fn]#u5ҪaErJ~N:2D2=1} žpt|0Rq7ySw{YcG~ 2 _!S=Sgx;a"F͢}oLWpY#p@/˕5C5{#k5+@H`o~*^Ktr)v f.ۦѸD}bzyπ| 8q$qxR7*C=]| y&v"X}f]iM'דcŸI0{^ ^x5otv0Sg}jho`r4OO hTOݑO..yg—Ld/`o ˳/Oe1n[[ &Utzi_5"iTfj=STx .!LsBfx`scf^ f;硸t;rY7na _z,L4j=`&f-t|4++"KYEG,i~&&ooy Y_e6qF8ptW؊{)GP[F(>bI8ƭ/ fGT(kqRs},[TK _i܁z3%0gyz.*R8,Ax܀=ڍsyF(d!Ab ^r,>bI{[iҤSXdLTK nSlSZ} H<<ؗPl 6Ʀ@h\oyn/X^_ ۴II\'!A-{1y-/KB#IHXbgۿG%b/F}[as4nt ,Ҡ޿}ltS194+op󊔓;d htnK%=5,^<9hNEK㊴XyG"Z>e?2B_3`=|iټ֠? ̮b||\NÃ#mH|MdzWM/7ݗ,}]~w\V.Z/mc1 7/4i_`}Z$6 fNNmݪ7P#X`GoAl"(X^9.[׿J"~G0c۶FSH=-w==Խ/1ǔx#/V,^orm 4jw pV0{9w&<ʩT[9``62qL|"0cgGY⁄>nN%wП|.bF,x Yqۃkp5JE>[щ4bӌ/EG,i HX{Э>?v^ʚ3]mRݚnL nh|+B"nNb `)``vyVfy~xefi>KnT<ő躪=#ao\,kb{Km+>f1OL?]=fN+䴴U{|H`vtVrw=ƜUB^H! _6b[X1oO8 {%L[xN b- qt|#Kg#K88`PNifs ps0 !A-}]rkw }xaYO`tZYC}-S0<\oµ6ۘToY܎ֿʽxKmK .§oȱŲ49k-G%?kbXܭ(UƜmCށ>KgG9;$}TCL)_f$yDJ,nQG.'j<|7^1gs[' yWO?/>Qf-{Sو O}ZQuiaX1Y~%ܗzjԾudAz|::xV 잂9'2ٸsB޺+Z"ͩ=~/RW>ĭ5[>q+R]0aPy/NXдKq-`sO3&e1/^y?NlT㻸V#+2K x`Uu_`7ܘ'9.nzFZQ) = g1ޅfMwU\G;9ʏăt M0~ka.kBmq7D0۫`b3<_ss\H[pK&_LB\`mw]Ix"r*)``c0F[Q+C[73RQ[8qܭ7G q_c6,مesFG!T'þhr-FgC7io'KÊ,=½fϩ؏Cˋf*$=QJ;8d4#m㯔O`G6p{;wJ؎/-+m) 4#|I4?'Q:<, 8/y{-+su_BNfiЯDeD{%-C.LJve KB~{7mei2u.mYEO/bWQ5{9 fk?0'[y~_6|ɽ/fP=ު3/й5s29i^c⍸e=}$ոl'Byv`vk2>D~b|XU[ Bqwfg1۩Ui=w'Cr;NTK)I0Of WH+1Tiu>hɽ}n:s_Ԣ#1ofG'O{ORKRo7gݞZ/cδWz!bAnAQ`rfphj`hos`nE}65n$@0[3om84_mb\!,< Ь94tmYg1vOjbnvFNb>8/ۚ|g;lŀUo48Ңb'?^ oH*-PQ+/MPܿ{\TO k`M;e%g/+U`yQ^dWWnbc. IDAT_/s9YgGs\h^_M:CnrSV 9Ti4}f?ޤy[ݑ`^ msy-)\ohfh,ƽhy } fOt^p׫[qngË򚸝99 885Tw U36x-cڇ{ gASoԟ> "z,?fSՀm--&V_-+Xy^fk zDhO%zw5MK/6IDvf:!o)]̩p3٘dӜ,x,U0B^P1GcKk t]}p%=8ŏ1O7&}Fz4Io!h_G#b?. f5YVj\O`0 wLق VDB+-'ٓ{VWģ-Scq{?ό(_`2) fWZ6je"`}s*p8`6@xƪ[(oo[ zE,J4og>op ][X7}`rZ7[d<oqffm;^D^x5ݿuGZYUz0{$&z!y m.}G y< mE<}+EO7&gw w\3z)LpQ):TAx7o<@@4} u}A#}ӂ(6 Բd19YVy>z^L9lT0;w!ۏɻ>O(r$B{5%qt)UW<`4n'[&A Y| ,̮+i4J0.}GIH{,aY!7O>OQw눅ފ0LJmH0;-qW' kO@KG5 =Ҡ[+G,s&r}7ZQ+##k,ƾR/p]7 ?}ZE’{ 6n.p=pc0Ԃ='} <-s{ܓ>Mc˗MOc KoBjA^xZc_g1~f!<,y ve0:'g,-3UsʴjPs`$Pv`(xMqW tv&sC&oXMx24l !A':E``v{ M3Er/f{>IiB`8 |ո^7]̶nWZ} EĂ5o)Nɍ<=WT5ub^Y`6**7`pA < p@u}l,+o{{VD zA 1^e.`w}0k7~V~oN~yוM:mK/wYm F6c1]pͧz~,r,yRrqZW},jû[S75\אQHB/qoM`Ϝ-``\ zt=#s:~D^uю3Ŗ^֤T?b=`d+YK;U5hVƷ[Wne(1_xwECↂBHkbiv9ej:|T153aըYS%Z|{\5BMQKtT_7M|p-]xV3 `vj m{GK02~[īҬrNNu]YYvn^" ~g0s9kBq_,9w`3|?y~~wLŃY} 3G٪}C@kCܸ* B^_כj098vNm7wʓ-j<cx8E7fmYX⣁?TWÓ='1[ z?.d`[R&˧.M<_v]CN4G*}`619 #5d/Q~?U^P+u~}40o0r;\9ƍj4[Yg͝-= m5o$s^p;6H9Si~ގx'HC1E/滁qu~wjglB0"i6J`W``c07+ u.ϱKLN/7{;_|; ਜԿ z^ݕu~`p5 Dj&xH<yֻŸ`<`m 29ugLeաJFN?C"`As㒭B38΀[7`#p|Uj tfO&$wŀ;ll3ن{p/zߙX|;8!HF#8ʠ:f]Y 0("" k \"[$J{}h:UUUsNNz~wH _Tf`.5{%EҧkS2cK*";YN2ڃc(R:Hi:0Hi"Ӏ-|Ypj?&V`&fZm<&c6,RFD3nY?祈ېӖsKs}b>DUFHPDIxe( t,UOtV{9͌n֤luڟFL|QeV_{X_N.Rzoz)RHDrFMov\\t{-0|- Oh6ѪYϝ28ֳAT}{wν̫eMAH8d@}6q9<2m:9G˥j9Z4ހs-k1 thKֆ9jRmV 䫕9P:KM- 'Fug_-sn%_jGG$84'9'GUxW]C%UDg)-@|G)ѝ|EeTt{.WU~P}oR1J0P|1 ܷf_C1f?3z[-N`f"0qՒII'*Fo9:;H5 <֒ו9Z[h2痶OW=vKj%FyػL0/s~euvMOM0K_1׮Jx_x[ݦkZpEuH2j:H#-no;g/$?vlBTLH:֦9{eMo!f_]2/ Ab p1F)m:X{܌{k+6ػ9C=Aȍ-lLD_7ָ"=&1Wu7Y@Lzl$)G['9侤S9Φcs˜6I?iƫ 37%j赚&?Hibs'ҁUeļt=f KMQ?=tvt[m]H{+S#L1&9Uu0Q}XXزHsI8mO1@ n6*u{KҵUFSܿv%.'U 2IljÁۈkt?)]'T/?O*Rz{iu"5Oߕ< ]&"i ڟc9bݗ>GƎf5߁5߀/'VY$ɀ|݊.n6} 8}O-ĐI:&n%,DnX@ Z$8/SdJ?Z/}Kv*R6Dս7vɅuc]O沵|HT_mަCf1s'y˜GTO0?^lZt\=|/lD\o5zy10H6n.E v2pY`jJl"̿yDYKtI2/@2a~+`:Hi6=>U*Rz=RONRJGK`4-R:m-ވΆn 2D峡mg2'`MwED#"ɀ_} ?)ĄicqPEJ[4+VAIJO6i*Rޓ{I.'oS!ɀ߁} ')^ϱ)6V$R~^ +^Ìj`.5{l~ $'V`_vM;9|h&&ivFuUttC+cI0XpJҳ j4`CdkcUpS$=52㩿 k>pLzhl\wAపB$t:X3ߖcɔׁo̹"/%*=gVIݴ`+Rӫ[=V1m.4S`^/ɀ/m x0U lץ~1|^;6R :4HZZro_9 wO$Ey ^U9Xc-)O$kwkiN,R:WnB0Kʜ2jx͸pG$ 3\ZHd't8Hiv倽 vLj{)Rr]Rz{|شſ_XZ{[_MDB+zii.5\Pd}j.T*s}'hqDn)epIe+ *MV~SX2&f)s6mj"=O_D\#?op'%ՒzCP&5db9[#~B@Ku[q::}=v1{_lwZT=tu3@̺nfGEJ:b=["tEJOxdI2kiҜH)kY "mҰӹ2WeMohԏwL ,4"]ύ49GwD0x]Π{/GNsItuңp V"|-/#.+l|b" =t$;'2ϒ&֓_ԃ{2O$Ŝ1<K䠟#ɀ^Z"o~KʜW>'͗5HssU$ɀ_v*wEJ,by#DYӵ; 1ap("AHIt'ImEH k}#oѡ&tIrN\wBIt# ^9E eUJ鵯I_꙯ԡ`"3ʜŲ P`{p[PZիy Y`NҹeWuL{z5qZ)_LF x2O9oG]ķwgǁ 撖ErTѓxwuNEJ` Na=> SW/I*ܗN|Ab]=|q1DZn6kKjhwzTIZ9tNIeU{.uNwMs7"] d@_j-R|.pOY2 z=3hBߏsi``"_x$I󼆾t9ՍjNm4i;2Á/YuTbLsEJyHҒޣʜ'9ˇ h)^DK|S jYYĒP!֧oXM1C~18:gw)-}F syarߏ-sMuxHiζJ imbWo}Ryi')=!I)/Od8۫[l ukd5,5,BL[PժrcDZʜ KE7êWG$5\H <`RI$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$IZܫmB{IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Common_Content/images/yellow.png000066400000000000000000000002571260561570600303770ustar00rootroot00000000000000PNG  IHDRtsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<,IDATc'+???K]?2?^Y2`$IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml000066400000000000000000000277171260561570600266030ustar00rootroot00000000000000
    Generating Instrumentation for Other Computers cross-instrumentation building kernel modules from SystemTap scripts cross-instrumentation generating instrumentation from SystemTap scripts cross-compiling script from here: http://sourceware.org/ml/systemtap/2008-q3/msg00310.html kernel modules from SystemTap scripts, building building kernel modules from SystemTap scripts instrumentation modules from SystemTap scripts, building building instrumentation modules from SystemTap scripts compiling instrumentation/kernel modules from SystemTap scripts cross-compiling above; add short description, significance, howto, script (test first) When users run a SystemTap script, SystemTap builds a kernel module out of that script. SystemTap then loads the module into the kernel, allowing it to extract the specified data directly from the kernel (refer to in for more information). Normally, however, SystemTap scripts can only be run on systems where SystemTap is deployed (as in ). This could mean that if you want to run SystemTap on ten systems, you would need to deploy SystemTap on all those systems. In some cases, this may be neither feasible nor desired. For instance, corporate policy may prohibit an administrator from installing RPM packages that provide compilers or debug information on specific machines, and thus prevent the deployment of SystemTap. To work around this problem, SystemTap allows you to use cross-instrumentation. Cross-instrumentation is the process of generating SystemTap instrumentation module from a SystemTap script on one computer to be used on another computer. This process offers the following benefits: cross-instrumentation advantages of advantages of cross-instrumentation The kernel information packages for various machines can be installed on a single host machine. Each target machine only needs one RPM package to be installed in order to use the generated SystemTap instrumentation module: the systemtap-runtime package. For the sake of simplicity, the following terms are used throughout this section: cross-instrumentation instrumentation module instrumentation module cross-instrumentation Instrumentation module — the kernel module built from a SystemTap script. The SystemTap module is built on the host system, and will be loaded on the target kernel of target system. cross-instrumentation host system host system cross-instrumentation Host system — the system on which you compile the instrumentation modules from SystemTap scripts in order to load them on target systems. cross-instrumentation target system target system cross-instrumentation Target system — the system for which you are building the instrumentation modules from SystemTap scripts. cross-instrumentation target kernel target kernel cross-instrumentation Target kernel — the kernel of the target system. This is the kernel on which you intend to load or run the instrumentation module. To configure a host system and target systems, complete the following steps: cross-instrumentation configuration host system and target system host system and target system cross-instrumentation configuration target system and host system configuration Install the systemtap-runtime package on each target system. Determine the kernel running on each target system by running the uname -r command on each of these systems. Install SystemTap on the host system. You will be building the instrumentation module for the target systems on the host system. For instructions on how to install SystemTap, refer to . Using the target kernel version determined earlier, install the target kernel and related RPM packages on the host system as described in . If multiple target systems use different target kernels, repeat this step for each different kernel used on the target systems. After completing these steps, you can now build the instrumentation module (for any target system) on the host system. To build the instrumentation module, run the following command on the host system (be sure to specify the appropriate values): stap -r kernel_version script -m module_name Here, kernel_version refers to the version of the target kernel (the output of the uname -r command on the target machine), script refers to the script to be converted into the instrumentation module, and module_name is the desired name of the instrumentation module. Note uname -m determining architecture notation architecture notation, determining To determine the architecture notation of a running kernel, you can run the following command: uname -m Once the instrumentation module is compiled, copy it to the target system and then load it using: staprun module_name.ko For example, to create the instrumentation module simple.ko from a SystemTap script named simple.stp for the target kernel 2.6.18-92.1.10.el5 (on x86_64 architecture), use the following command: stap -r 2.6.18-92.1.10.el5 -e 'probe vfs.read {exit()}' -m simple This creates a module named simple.ko. To use this instrumentation module, copy it to the target system and run the following command (on the target system): staprun simple.ko Important The host system must be the same architecture and running the same distribution of Linux as the target system in order for the built instrumentation module to work.
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Errors.xml000066400000000000000000000671041260561570600241710ustar00rootroot00000000000000 Understanding SystemTap Errors By type - http://sourceware.org/systemtap/tutorial/node23.html This chapter explains the most common errors you may encounter while using SystemTap.
    Parse and Semantic Errors understanding SystemTap errors parse/semantics error errors parse/semantics error parse/semantics error understanding SystemTap errors Parse and semantic errors occur while SystemTap attempts to parse and translate the script into C, before converting it into a kernel module. For example, type errors result from operations that assign invalid values to variables or arrays. parse error: expected foo, saw bar understanding SystemTap errors parse/semantics error invalid values to variables/arrays errors parse/semantics error invalid values to variables/arrays parse/semantics error understanding SystemTap errors invalid values to variables/arrays invalid values to variables/arrays parse/semantics error understanding SystemTap errors understanding SystemTap errors parse/semantics error grammatical/typographical script error errors parse/semantics error grammatical/typographical script error parse/semantics error understanding SystemTap errors grammatical/typographical script error grammatical/typographical script error parse/semantics error understanding SystemTap errors typographical script error parse/semantics error understanding SystemTap errors The script contains a grammatical or typographical error. SystemTap detected the type of the construct that is incorrect, given the context of the probe. need more clarification (example) on this; could not replicate. how to replicate? For example, the following invalid SystemTap script is missing its probe handlers: An attempt to run this SystemTap script fails with the following error message showing that the parser expects something other than the probe keyword in column 1 of line 2: parse error: expected one of '. , ( ? ! { = +=' saw: keyword at perror.stp:2:1 1 parse error(s). parse error: embedded code in unprivileged script understanding SystemTap errors parse/semantics error embedded code in unprivileged script errors parse/semantics error embedded code in unprivileged script parse/semantics error understanding SystemTap errors embedded code in unprivileged script embedded code in unprivileged script parse/semantics error understanding SystemTap errors unprivileged script, embedded code in parse/semantics error understanding SystemTap errors unsafe embedded code in unprivileged script parse/semantics error understanding SystemTap errors The script contains unsafe embedded C code, that is, blocks of code surrounded by %{ and %}. SystemTap allows you to embed C code in a script, which is useful if there are no tapsets to suit your purposes. However, embedded C constructs are not safe and SystemTap reports this error to warn you if such constructs appear in the script. understanding SystemTap errors parse/semantics error guru mode errors parse/semantics error guru mode parse/semantics error understanding SystemTap errors guru mode guru mode parse/semantics error understanding SystemTap errors If you are sure that any similar constructs in the script are safe and you are a member of the stapdev group (or have root privileges), run the script in "guru" mode by using the option: stap -g script semantic error: type mismatch for identifier 'foo' ... string vs. long understanding SystemTap errors parse/semantics error type mismatch for identifier errors parse/semantics error type mismatch for identifier parse/semantics error understanding SystemTap errors type mismatch for identifier type mismatch for identifier parse/semantics error understanding SystemTap errors identifier type mismatch parse/semantics error understanding SystemTap errors The function foo in the script used the wrong type (such as %s or %d). In the following example, the format specifier should be %s and not %d, because the execname() function returns a string: probe syscall.open { printf ("%d(%d) open\n", execname(), pid()) } semantic error: unresolved type for identifier 'foo' understanding SystemTap errors parse/semantics error unresolved type for identifier errors parse/semantics error unresolved type for identifier parse/semantics error understanding SystemTap errors unresolved type for identifier unresolved type for identifier parse/semantics error understanding SystemTap errors The identifier (variable) was used, but no type (integer or string) could be determined. This occurs, for instance, if you use a variable in a printf statement while the script never assigns a value to the variable. semantic error: Expecting symbol or array index expression understanding SystemTap errors parse/semantics error expected symbol/array index expression errors parse/semantics error expected symbol/array index expression parse/semantics error understanding SystemTap errors expected symbol/array index expression expected symbol/array index expression parse/semantics error understanding SystemTap errors SystemTap could not assign a value to a variable or to a location in an array. The destination for the assignment is not a valid destination. The following example code would generate this error: while searching for arity N function, semantic error: unresolved function call understanding SystemTap errors parse/semantics error unresolved function call errors parse/semantics error unresolved function call parse/semantics error understanding SystemTap errors unresolved function call unresolved function call parse/semantics error understanding SystemTap errors function call (unresolved) parse/semantics error understanding SystemTap errors A function call or array index expression in the script used an invalid number of arguments or parameters. In SystemTap, arity can either refer to the number of indices for an array, or the number of parameters to a function. semantic error: array locals not supported, missing global declaration? array locals not supported parse/semantics error understanding SystemTap errors understanding SystemTap errors parse/semantics error non-global arrays errors parse/semantics error non-global arrays parse/semantics error understanding SystemTap errors non-global arrays non-global arrays parse/semantics error understanding SystemTap errors The script used an array operation without declaring the array as a global variable (global variables can be declared after their use in SystemTap scripts). Similar messages appear if an array is used, but with inconsistent arities. semantic error: variable 'foo' modified during 'foreach' iteration understanding SystemTap errors parse/semantics error variable modified during 'foreach' errors parse/semantics error variable modified during 'foreach' parse/semantics error understanding SystemTap errors variable modified during 'foreach' variable modified during 'foreach' parse/semantics error understanding SystemTap errors The array foo is being modified (being assigned to or deleted from) within an active foreach loop. This error also displays if an operation within the script performs a function call within the foreach loop. semantic error: probe point mismatch at position N, while resolving probe point foo understanding SystemTap errors parse/semantics error probe mismatch errors parse/semantics error probe mismatch parse/semantics error understanding SystemTap errors probe mismatch probe mismatch parse/semantics error understanding SystemTap errors SystemTap did not understand what the event or SystemTap function foo refers to. This usually means that SystemTap could not find a match for foo in the tapset library. N refers to the line and column of the error. how to explain N in previous? "The divergence from the “tree” of probe point namespace is at position N (starting with zero at left)." (from tutorial) semantic error: no match for probe point, while resolving probe point foo understanding SystemTap errors parse/semantics error no match for probe point errors parse/semantics error no match for probe point parse/semantics error understanding SystemTap errors no match for probe point no match for probe point parse/semantics error understanding SystemTap errors probe point (no match for) parse/semantics error understanding SystemTap errors SystemTap could not resolve the events or handler function foo for a variety of reasons. This error occurs when the script contains the event kernel.function("something"), and something does not exist. In some cases, the error could also mean the script contains an invalid kernel file name or source line number. semantic error: unresolved target-symbol expression understanding SystemTap errors parse/semantics error unresolved target-symbol expression errors parse/semantics error unresolved target-symbol expression parse/semantics error understanding SystemTap errors unresolved target-symbol expression unresolved target-symbol expression parse/semantics error understanding SystemTap errors target-symbol expression, unresolved parse/semantics error understanding SystemTap errors A handler in the script references a target variable, but the value of the variable could not be resolved. This error could also mean that a handler is referencing a target variable that is not valid in the context when it was referenced. This may be a result of compiler optimization of the generated code. semantic error: libdwfl failure understanding SystemTap errors parse/semantics error libdwfl failure errors parse/semantics error libdwfl failure parse/semantics error understanding SystemTap errors libdwfl failure libdwfl failure parse/semantics error understanding SystemTap errors There was a problem processing the debugging information. In most cases, this error results from the installation of a kernel-debuginfo package whose version does not match the probed kernel exactly. The installed kernel-debuginfo package itself may have some consistency or correctness problems. semantic error: cannot find foo debuginfo SystemTap could not find a suitable kernel-debuginfo package.
    Runtime Errors and Warnings understainding SystemTap errors runtime errors/warnings errors runtime errors/warnings runtime errors/warnings understainding SystemTap errors Runtime errors and warnings occur when the SystemTap instrumentation has been installed and is collecting data on the system. WARNING: Number of errors: N, skipped probes: M understainding SystemTap errors runtime errors/warnings number of errors: N, skipped probes: M errors runtime errors/warnings number of errors: N, skipped probes: M runtime errors/warnings understainding SystemTap errors number of errors: N, skipped probes: M number of errors: N, skipped probes: M runtime errors/warnings understainding SystemTap errors Errors and/or skipped probes occurred during this run. Both N and M are the counts of the number of probes that were not executed due to conditions such as too much time required to execute event handlers over an interval of time. division by 0 understainding SystemTap errors runtime errors/warnings division by 0 errors runtime errors/warnings division by 0 runtime errors/warnings understainding SystemTap errors division by 0 division by 0 runtime errors/warnings understainding SystemTap errors invalid division runtime errors/warnings understainding SystemTap errors The script code performed an invalid division. aggregate element not found understainding SystemTap errors runtime errors/warnings aggregate element not found errors runtime errors/warnings aggregate element not found runtime errors/warnings understainding SystemTap errors aggregate element not found aggregate element not found runtime errors/warnings understainding SystemTap errors A statistics extractor function other than @count was invoked on an aggregate that has not had any values accumulated yet. This is similar to a division by zero. aggregation overflow understainding SystemTap errors runtime errors/warnings aggregation overflow errors runtime errors/warnings aggregation overflow runtime errors/warnings understainding SystemTap errors aggregation overflow aggregation overflow runtime errors/warnings understainding SystemTap errors overflow of aggregation runtime errors/warnings understainding SystemTap errors An array containing aggregate values contains too many distinct key pairs at this time. MAXNESTING exceeded understainding SystemTap errors runtime errors/warnings MAXNESTING exceeded errors runtime errors/warnings MAXNESTING exceeded runtime errors/warnings understainding SystemTap errors MAXNESTING exceeded MAXNESTING exceeded runtime errors/warnings understainding SystemTap errors exceeded MAXNESTING runtime errors/warnings understainding SystemTap errors Too many levels of function call nesting were attempted. The default nesting of function calls allowed is 10. MAXACTION exceeded understainding SystemTap errors runtime errors/warnings MAXACTION exceeded errors runtime errors/warnings MAXACTION exceeded runtime errors/warnings understainding SystemTap errors MAXACTION exceeded MAXACTION exceeded runtime errors/warnings understainding SystemTap errors exceeded MAXACTION runtime errors/warnings understainding SystemTap errors The probe handler attempted to execute too many statements in the probe handler. The default number of actions allowed in a probe handler is 1000. kernel/user string copy fault at ADDR understainding SystemTap errors runtime errors/warnings copy fault errors runtime errors/warnings copy fault runtime errors/warnings understainding SystemTap errors copy fault copy fault runtime errors/warnings understainding SystemTap errors The probe handler attempted to copy a string from kernel or user space at an invalid address (ADDR). pointer dereference fault understainding SystemTap errors runtime errors/warnings pointer dereference fault errors runtime errors/warnings pointer dereference fault runtime errors/warnings understainding SystemTap errors pointer dereference fault pointer dereference fault runtime errors/warnings understainding SystemTap errors There was a fault encountered during a pointer dereference operation such as a target variable evaluation.
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Feedback.xml000066400000000000000000000022371260561570600243750ustar00rootroot00000000000000 %BOOK_ENTITIES; ]>
    We Need Feedback! feedback contact information for this manual If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla: http://sourceware.org/bugzilla/ against the product systemtap. When submitting a report, be sure to include the specific file or URL the report refers to and the manual's identifier: &BOOKID; If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Installation.xml000066400000000000000000000236321260561570600253540ustar00rootroot00000000000000
    Installation and Setup required packages, installation thru yum, repos (?); possibly, a script to install all required packages notes in ~/Desktop/SystemTap/aug21chatlog and ~/Desktop/SystemTap/noted_wcohenmeeting Installation Setup and Installation Setup and Installation To deploy SystemTap, install the SystemTap packages along with the corresponding set of -devel, -debuginfo, and -debuginfo-common packages for your kernel. If your system has multiple kernels installed and you intend to use SystemTap on more than one of them, also install the -devel and -debuginfo packages for each of those kernel versions. The following sections discuss the installation procedures in greater detail. Important Many users confuse -debuginfo with -debug. Remember that the deployment of SystemTap requires the installation of the -debuginfo package of the kernel, not the -debug version of the kernel.
    Installing SystemTap To deploy SystemTap, install the following RPM packages: Installation systemtap package systemtap package Installation systemtap-runtime package systemtap-runtime package systemtap systemtap-runtime To do so, run the following command as root: yum install systemtap systemtap-runtime Note that before using SystemTap, you still need to install the required kernel information packages. On modern systems, run the following command as root to install these packages: stap-prep If this command does not work, try manual installation as described below.
    Installing Required Kernel Information Packages Manually Installation required packages required packages packages required to run SystemTap RPMs required to run SystemTap Installation kernel information packages kernel information packages SystemTap needs information about the kernel in order to place instrumentation in it (in other words, probe it). This information also allows SystemTap to generate the code for the instrumentation. The required information is contained in the matching -devel, -debuginfo, and -debuginfo-common packages for your kernel. The necessary -devel and -debuginfo packages for the ordinary "vanilla" kernel are as follows: kernel-debuginfo kernel-debuginfo-common kernel-devel Likewise, the necessary packages for the PAE kernel are kernel-PAE-debuginfo, kernel-PAE-debuginfo-common, and kernel-PAE-devel. Installation kernel version, determining the kernel version, determining the determining the kernel version uname -r To determine what kernel your system is currently using, use: uname -r For example, if you intend to use SystemTap on kernel version 2.6.18-53.el5 on an i686 machine, download and install the following RPM packages: kernel-debuginfo-2.6.18-53.1.13.el5.i686.rpm kernel-debuginfo-common-2.6.18-53.1.13.el5.i686.rpm kernel-devel-2.6.18-53.1.13.el5.i686.rpm Important The version, variant, and architecture of the -devel, -debuginfo and -debuginfo-common packages must match the kernel you wish to probe with SystemTap exactly. The easiest way to install the required kernel information packages is through yum install and debuginfo-install commands. The debuginfo-install command is included with later versions of the yum-utils package (for example, version 1.1.10) and also requires an appropriate yum repository from which to download and install -debuginfo and -debuginfo-common packages. You can install the required -devel, -debuginfo, and -debuginfo-common packages for your kernel. When the appropriate software repositories are enabled, install the corresponding packages for a specific kernel with the following commands: yum install kernelname-devel-version debuginfo-install kernelname-version Replace kernelname with the appropriate kernel variant name (for example, ), and version with the target kernel's version. For example, to install the required kernel information packages for the kernel-PAE-2.6.18-53.1.13.el5 kernel, run: yum install kernel-PAE-devel-2.6.18-53.1.13.el5 debuginfo-install kernel-PAE-2.6.18-53.1.13.el5 Once you have manually downloaded the required packages to the machine, run the following command as root to install them: rpm --force -ivh package_names
    Initial Testing Installation initial testing initial testing testing, initial If you are currently using the kernel you intend to probe with SystemTap, you can immediately test whether the deployment was successful. If not, you restart the system and load the appropriate kernel. To start the test, run the following command: stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}' This command instructs SystemTap to print read performed and then exit properly once a virtual file system read is detected. If the SystemTap deployment was successful, it prints output similar to the following: Pass 1: parsed user script and 45 library script(s) in 340usr/0sys/358real ms. Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) in 290usr/260sys/568real ms. Pass 3: translated to C into "/tmp/stapiArgLX/stap_e5886fa50499994e6a87aacdc43cd392_399.c" in 490usr/430sys/938real ms. Pass 4: compiled C into "stap_e5886fa50499994e6a87aacdc43cd392_399.ko" in 3310usr/430sys/3714real ms. Pass 5: starting run. read performed Pass 5: run completed in 10usr/40sys/73real ms. The last three lines of the output (beginning with Pass 5) indicate that SystemTap was able to successfully create the instrumentation to probe the kernel, run the instrumentation, detect the event being probed (in this case, a virtual file system read), and execute a valid handler (print text then close it with no errors).
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml000066400000000000000000000174261260561570600254000ustar00rootroot00000000000000 %BOOK_ENTITIES; ]> Introduction Introduction performance monitoring performance monitoring Introduction SystemTap is a tracing and probing tool that allows users to study and monitor the activities of the computer system (particularly, the kernel) in fine detail. It provides information similar to the output of tools like netstat, ps, top, and iostat, but is designed to provide more filtering and analysis options for collected information.
    Documentation Goals Introduction documentation goals documentation goals Introduction Introduction goals, documentation goals, documentation Introduction SystemTap provides the infrastructure to monitor the running Linux kernel for detailed analysis. This can assist administrators and developers in identifying the underlying cause of a bug or performance problem. Without SystemTap, monitoring the activity of a running kernel would require a tedious instrument, recompile, install, and reboot sequence. SystemTap is designed to eliminate this and allows users to gather the same information by running user-written SystemTap scripts. SystemTap was initially designed for users with intermediate to advanced knowledge of the kernel. As a consequence, it is less useful to administrators or developers with limited knowledge of and experience with the Linux kernel. Moreover, much of the existing SystemTap documentation is aimed at knowledgeable and experienced users, which makes learning the tool similarly difficult. To lower these barriers, the SystemTap Beginners Guide was written with the following goals: to introduce users to SystemTap, familiarize them with its architecture, and provide setup instructions; to provide pre-written SystemTap scripts for monitoring detailed activity in different components of the system, along with instructions on how to run them and analyze their output. above, Short description on the underlying goals of SystemTap_Beginners_Guide, what we want to teach users.
    SystemTap Capabilities ** Short summary; when is SystemTap suitable vs other popular monitoring tools such as top, Oprofile or /proc Introduction capabilities of SystemTap capabilities of SystemTap Introduction Flexibility: SystemTap's framework allows users to develop simple scripts for investigating and monitoring a wide variety of kernel functions, system calls, and other events that occur in kernel space. As a result, SystemTap is not so much a tool as it is a system that allows you to develop your own kernel-specific forensic and monitoring tools. Ease of use: as mentioned earlier, SystemTap allows users to probe kernel-space events without having to resort to instrument, recompile, install, and reboot the kernel. Most of the SystemTap scripts enumerated in demonstrate system forensics and monitoring capabilities not natively available with other similar tools (such as top, oprofile, or ps). These scripts are provided to give readers extensive examples of the application of SystemTap and to educate them further on the capabilities they can employ when writing their own SystemTap scripts.
    Limitations of SystemTap Introduction limitations of SystemTap limitations of SystemTap Introduction The current iteration of SystemTap allows for a multitude of options when probing kernel-space events for a wide range of kernels. However, SystemTap's ability to probe user-space events depends on kernel support (the Utrace mechanism) that is not available in many kernels. As a consequence, only some kernel versions support user-space probing. At present, the developmental efforts of the SystemTap community are geared towards improving SystemTap's user-space probing capabilities.
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Legal_Notice.xml000066400000000000000000000017171260561570600252400ustar00rootroot00000000000000 This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. For more details see the file COPYING in the source distribution of Linux. systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Preface.xml000066400000000000000000000011411260561570600242470ustar00rootroot00000000000000 Preface systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/References.xml000066400000000000000000000103561260561570600247730ustar00rootroot00000000000000 References display links to other useful, more advanced systemtap docs - http://sourceware.org/systemtap/documentation.html, http://sourceware.org/systemtap/wiki/HomePage This chapter enumerates other references for more information about SystemTap. Refer to these sources in the course of writing advanced probes and tapsets. SystemTap Wiki The SystemTap Wiki is a collection of links and articles related to the deployment, usage, and development of SystemTap. You can find it at . SystemTap Tutorial Much of the content in this book comes from the SystemTap Tutorial. The SystemTap Tutorial is a more appropriate reference for users with intermediate to advanced knowledge of C++ and kernel development, and you can find it at . man stapprobes The stapprobes3stap man page enumerates a variety of probe points supported by SystemTap, along with additional aliases defined by the SystemTap tapset library. The bottom part of the man page includes a list of other man pages enumerating similar probe points for specific system components, such as tapset::scsi, tapset::kprocess, tapset::signal, and so on. man stapfuncs The stapfuncs3stap man page enumerates numerous functions supported by the SystemTap tapset library, along with the prescribed syntax for each of them. Note, however, that it does not provide a complete list of all supported functions; there are more undocumented functions available. SystemTap Tapset Reference Manual The SystemTap Tapset Reference Manual describes the individual predefined functions and probe points of the tapsets in greater detail. You can find it at . SystemTap Language Reference The SystemTap Language Reference is a comprehensive reference of SystemTap's language constructs and syntax. It is recommended for users with a rudimentary to intermediate knowledge of C++ and other similar programming languages, and is available to all users at . Tapset Developers Guide Once you have sufficient proficiency in writing SystemTap scripts, you can try to write your own tapsets. The Tapset Developers Guide describes how to add functions to your tapset library. Test Suite The systemtap-testsuite package allows you to test the entire SystemTap toolchain without having to build it from source code. In addition, it also contains numerous examples of SystemTap scripts to study and test; some of these scripts are also documented in . By default, the example scripts included in systemtap-testsuite are located in the /usr/share/systemtap/testsuite/systemtap.examples/ directory. systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Revision_History.xml000066400000000000000000000043471260561570600262340ustar00rootroot00000000000000 Revision History 2.0-1 Mon Jul 20 2009 Don Domingo ddomingo@redhat.com includes 5.4 minor updates and additional script "dropwatch.stp" 1.0-1 Wed Jun 17 2009 Don Domingo ddomingo@redhat.com Building+pushing to RHEL systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml000066400000000000000000000653701260561570600262540ustar00rootroot00000000000000
    Basic SystemTap Handler Constructs handlers SystemTap handler constructs SystemTap handlers SystemTap handler constructs handlers SystemTap handler constructs syntax and format SystemTap handlers SystemTap handler constructs syntax and format syntax and format SystemTap handler constructs handlers SystemTap supports the use of several basic constructs in handlers. The syntax for most of these handler constructs are mostly based on C and awk syntax. This section describes several of the most useful SystemTap handler constructs, which should provide you with enough information to write simple yet useful SystemTap scripts.
    Variables handlers SystemTap handler constructs variables SystemTap statements SystemTap handler constructs variables variables SystemTap handler constructs handlers format and syntax SystemTap handler constructs handlers Variables can be used freely throughout a handler; simply choose a name, assign a value from a function or expression to it, and use it in an expression. SystemTap automatically identifies whether a variable should be typed as a string or integer, based on the type of the values assigned to it. For instance, if you use set the variable foo to gettimeofday_s() (as in foo = gettimeofday_s()), then foo is typed as a number and can be printed in a printf() with the integer format specifier (%d). handlers SystemTap handler constructs global SystemTap statements SystemTap handler constructs global global SystemTap handler constructs handlers Note, however, that by default variables are only local to the probe they are used in. This means that variables are initialized, used and disposed at each probe handler invocation. To share a variable between probes, declare the variable name using global outside of the probes. Consider the following example: timer-jiffies.stp global count_jiffies, count_ms probe timer.jiffies(100) { count_jiffies ++ } probe timer.ms(100) { count_ms ++ } probe timer.ms(12345) { hz=(1000*count_jiffies) / count_ms printf ("jiffies:ms ratio %d:%d => CONFIG_HZ=%d\n", count_jiffies, count_ms, hz) exit () } CONFIG_HZ, computing for computes the CONFIG_HZ setting of the kernel using timers that count jiffies and milliseconds, then computing accordingly. The global statement allows the script to use the variables count_jiffies and count_ms (set in their own respective probes) to be shared with probe timer.ms(12345). Note The ++ notation in (that is, count_jiffies ++ and count_ms ++) is used to increment the value of a variable by 1. In the following probe, count_jiffies is incremented by 1 every 100 jiffies: probe timer.jiffies(100) { count_jiffies ++ } In this instance, SystemTap understands that count_jiffies is an integer. Because no initial value was assigned to count_jiffies, its initial value is zero by default.
    Target Variables handlers target variables target variables The probe events that map to actual locations in the code (for example kernel.function("function") and kernel.statement("statement")) allow the use of target variables to obtain the value of variables visible at that location in the code. You can use the -L option to list the target variable available at a probe point. If the debug information is installed for the running kernel, you can run the following command to find out what target variables are available for the vfs_read function: stap -L 'kernel.function("vfs_read")' This will yield something similar to the following: kernel.function("vfs_read@fs/read_write.c:277") $file:struct file* $buf:char* $count:size_t $pos:loff_t* Each target variable is proceeded by a $ and the type of the target variable follows the :. The kernel's vfs_read function has $file (pointer to structure describing the file), $buf (pointer to the user-space memory to store the read data), $count (number of bytes to read), and $pos (position to start reading from in the file) target variables at the entry to the function. When a target variable is not local to the probe point, like a global external variable or a file local static variable defined in another file then it can be referenced through @var("varname@src/file.c"). SystemTap tracks the typing information of the target variable and can examine the fields of a structure with the -> operator. The -> operator can be chained to look at data structures contained within data structures and follow pointers to other data structures. The -> operator will obtain the value in the field of the structure. The -> operator is used regardless whether accessing a field in a substructure or accessing another structure through a pointer. For example to access a field of the static files_stat target variable defined in fs/file_table.c (which holds some of the current file system sysctl tunables), one could write: stap -e 'probe kernel.function("vfs_read") { printf ("current files_stat max_files: %d\n", @var("files_stat@fs/file_table.c")->max_files); exit(); }' Which will yield something similar to the following: current files_stat max_files: 386070 For pointers to base types such as integers and strings there are a number of functions listed below to access kernel-space data. The first argument for each functions is the pointer to the data item. Similar functions are described in for accessing target variables in user-space code. kernel_char(address) Obtain the character at address from kernel memory. kernel_short(address) Obtain the short at address from kernel memory. kernel_int(address) Obtain the int at address from kernel memory. kernel_long(address) Obtain the long at address from kernel memory kernel_string(address) Obtain the string at address from kernel memory. kernel_string_n(address, n) Obtain the string at address from the kernel memory and limits the string to n bytes.
    Pretty Printing Target Variables target variables pretty printing SystemTap scripts are often used to observe what is happening within the code. In many cases just printing the values of the various context variables is sufficient. SystemTap makes a number operations available that can generate printable strings for target variables: $$vars Expands to a character string that is equivalent to sprintf("parm1=%x ... parmN=%x var1=%x ... varN=%x", parm1, ..., parmN, var1, ..., varN) for each variable in scope at the probe point. Some values may be printed as =? if their run-time location cannot be found. $$locals Expands to a subset of $$vars containing only the local variables. $$parms Expands to a subset of $$vars containing only the function parameters. $$return Is available in return probes only. It expands to a string that is equivalent to sprintf("return=%x", $return) if the probed function has a return value, or else an empty string. Below is a command-line script that prints the values of the parameters passed into the function vfs_read: stap -e 'probe kernel.function("vfs_read") {printf("%s\n", $$parms); exit(); }' There are four parameters passed into vfs_read: file, buf, count, and pos. The $$parms generates a string for the parameters passed into the function. In this case all but the count parameter are pointers. The following is an example of the output from the previous command-line script: file=0xffff8800b40d4c80 buf=0x7fff634403e0 count=0x2004 pos=0xffff8800af96df48 Having the address a pointer points to may not be useful. Instead the fields of the data structure the pointer points to may be of more use. Use the $ suffix to pretty print the data structure. The following command-line example uses the pretty printing suffix to print more details about the data structures passed into the function vfs_read: stap -e 'probe kernel.function("vfs_read") {printf("%s\n", $$parms$); exit(); }' The previous command line will generate something similar to the following with the fields of the data structure included in the output: file={.f_u={...}, .f_path={...}, .f_op=0xffffffffa06e1d80, .f_lock={...}, .f_count={...}, .f_flags=34818, .f_mode=31, .f_pos=0, .f_owner={...}, .f_cred=0xffff88013148fc80, .f_ra={...}, .f_version=0, .f_security=0xffff8800b8dce560, .private_data=0x0, .f_ep_links={...}, .f_mapping=0xffff880037f8fdf8} buf="" count=8196 pos=-131938753921208 With the $ suffix fields that are composed of data structures are not expanded. The $$ suffix will print the values contained within the nested data structures. Below is an example using the $$ suffix: stap -e 'probe kernel.function("vfs_read") {printf("%s\n", $$parms$$); exit(); }' The $$ suffix, like all strings, is limited to the maximum string size. Below is a representative output from the previous command-line script, which is truncated because of the string size limit: file={.f_u={.fu_list={.next=0xffff8801336ca0e8, .prev=0xffff88012ded0840}, .fu_rcuhead={.next=0xffff8801336ca0e8, .func=0xffff88012ded0840}}, .f_path={.mnt=0xffff880132fc97c0, .dentry=0xffff88001a889cc0}, .f_op=0xffffffffa06f64c0, .f_lock={.raw_lock={.slock=196611}}, .f_count={.counter=2}, .f_flags=34818, .f_mode=31, .f_pos=0, .f_owner={.lock={.raw_lock={.lock=16777216}}, .pid=0x0, .pid_type=0, .uid=0, .euid=0, .signum=0}, .f_cred=0xffff880130129a80, .f_ra={.start=0, .size=0, .async_size=0, .ra_pages=32, .
    Typecasting target variables typecasting In most cases SystemTap can determine a variable's type from the debug information. However, code may use void pointers for variables (for example memory allocation routines) and typing information is not available. Also the typing information available within a probe handler is not available within a function; SystemTap functions arguments use a long in place of a typed pointer. SystemTap's @cast operator (first available in SystemTap 0.9) can be used to indicate the correct type of the object. The is from the task.stp tapset. The function returns the value of the state field from a task_struct pointed to by the long task. The first argument of the @cast operator, task, is the pointer to the object. The second argument is the type to cast the object to, task_struct. The third argument lists what file that the type definition information comes from and is optional. With the @cast operator the various fields of this particular task_struct task can be accessed; in this example the state field is obtained. Casting Example
    Checking Target Variable Availability target variables variable availability As code evolves the target variables available may change. The @defined makes it easier to handle those variations in the available target variables. The @defined provides a test to see if a particular target variable is available. The result of this test can be used to select the appropriate expression. The from the memory.stp tapset provides an probe event alias. Some version of the kernel functions being probed have an argument $flags. When available, the $flags argument is used to generate the local variable write_access. The versions of the probed functions that do not have the $flags argument have a $write argument and that is used instead for the local variable write_access. Testing target variable available Example
    Conditional Statements handlers conditional statements SystemTap statements conditional statements In some cases, the output of a SystemTap script may be too large. To address this, you need to further refine the script's logic in order to delimit the output into something more relevant or useful to your probe. Do this by using conditionals in handlers. SystemTap accepts the following types of conditional statements: If/Else Statements handlers conditional statements if/else SystemTap statements conditional statements if/else if/else conditional statements handlers Format: if (condition) statement1 else statement2 The statement1 is executed if the condition expression is non-zero. The statement2 is executed if the condition expression is zero. The else clause (else statement2) is optional. Both statement1 and statement2 can be statement blocks. ifelse.stp global countread, countnonread probe kernel.function("vfs_read"),kernel.function("vfs_write") { if (probefunc()=="vfs_read") countread ++ else countnonread ++ } probe timer.s(5) { exit() } probe end { printf("VFS reads total %d\n VFS writes total %d\n", countread, countnonread) } is a script that counts how many virtual file system reads (vfs_read) and writes (vfs_write) the system performs within a 5-second span. When run, the script increments the value of the variable countread by 1 if the name of the function it probed matches vfs_read (as noted by the condition if (probefunc()=="vfs_read")); otherwise, it increments countnonread (else {countnonread ++}). While Loops handlers conditional statements while loops SystemTap statements conditional statements while loops while loops conditional statements handlers Format: while (condition) statement So long as condition is non-zero the block of statements in statement are executed. The statement is often a statement block and it must change a value so condition will eventually be zero. For Loops handlers conditional statements for loops SystemTap statements conditional statements for loops for loops conditional statements handlers Format: for (initialization; conditional; increment) statement The for loop is shorthand for a while loop. The following is the equivalent while loop: initialization while (conditional) { statement increment } need simple, simple examples for FOR and WHILE Conditional Operators handlers conditional statements conditional operators SystemTap statements conditional statements conditional operators conditional operators conditional statements handlers Aside from == ("is equal to"), following operators can also be used in conditional statements: >= Greater than or equal to <= Less than or equal to != Is not equal to
    Command-Line Arguments handlers SystemTap handler constructs command-line arguments SystemTap statements SystemTap handler constructs command-line arguments command-line arguments SystemTap handler constructs handlers A SystemTap script can also accept simple command-line arguments using a $ or @ immediately followed by the number of the argument on the command line. Use $ if you are expecting the user to enter an integer as a command-line argument, and @ if you are expecting a string. commandlineargs.stp probe kernel.function(@1) { } probe kernel.function(@1).return { } is similar to , except that it allows you to pass the kernel function to be probed as a command-line argument (as in stap commandlineargs.stp kernel function). You can also specify the script to accept multiple command-line arguments, noting them as @1, @2, and so on, in the order they are entered by the user. handlers SystemTap handler constructs variable notations SystemTap statements SystemTap handler constructs variable notations variable notations SystemTap handler constructs handlers
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml000066400000000000000000001125621260561570600243430ustar00rootroot00000000000000
    SystemTap Scripts scripts introduction SystemTap scripts introduction For the most part, SystemTap scripts are the foundation of each SystemTap session. SystemTap scripts instruct SystemTap on what type of information to collect, and what to do once that information is collected. scripts introduction components SystemTap scripts introduction components components SystemTap scripts introduction scripts introduction events and handlers SystemTap scripts introduction events and handlers handlers and events SystemTap scripts introduction As stated in , SystemTap scripts are made up of two components: events and handlers. Once a SystemTap session is underway, SystemTap monitors the operating system for the specified events and executes the handlers as they occur. Note scripts introduction probes SystemTap scripts introduction probes probes SystemTap scripts introduction An event and its corresponding handler is collectively called a probe. A SystemTap script can have multiple probes. A probe's handler is commonly referred to as a probe body. In terms of application development, using events and handlers is similar to instrumenting the code by inserting diagnostic print statements in a program's sequence of commands. These diagnostic print statements allow you to view a history of commands executed once the program is run. SystemTap scripts allow insertion of the instrumentation code without recompilation of the code and allows more flexibility with regard to handlers. Events serve as the triggers for handlers to run; handlers can be specified to record specified data and print it in a certain manner. Format scripts introduction format and syntax SystemTap scripts introduction format and syntax format and syntax SystemTap scripts introduction syntax and format SystemTap scripts introduction SystemTap scripts use the file extension .stp, and contains probes written in the following format: probe event {statements} SystemTap supports multiple events per probe; multiple events are delimited by a comma (,). If multiple events are specified in a single probe, SystemTap will execute the handler when any of the specified events occur. scripts introduction statement blocks SystemTap scripts introduction statement blocks statement blocks SystemTap scripts introduction Each probe has a corresponding statement block. This statement block is enclosed in braces ({ }) and contains the statements to be executed per event. SystemTap executes these statements in sequence; special separators or terminators are generally not necessary between multiple statements. Note Statement blocks in SystemTap scripts follow the same syntax and semantics as the C programming language. A statement block can be nested within another statement block. scripts introduction functions SystemTap scripts introduction functions functions SystemTap scripts introduction SystemTap allows you to write functions to factor out code to be used by a number of probes. Thus, rather than repeatedly writing the same series of statements in multiple probes, you can just place the instructions in a function, as in: function function_name(arguments) {statements} probe event {function_name(arguments)} The statements in function_name are executed when the probe for event executes. The arguments are optional values passed into the function. Important is designed to introduce readers to the basics of SystemTap scripts. To understand SystemTap scripts better, it is advisable that you refer to ; each section therein provides a detailed explanation of the script, its events, handlers, and expected output.
    Event Events introduction SystemTap events can be broadly classified into two types: synchronous and asynchronous. Synchronous Events Events synchronous events synchronous events Events A synchronous event occurs when any process executes an instruction at a particular location in kernel code. This gives other events a reference point from which more contextual data may be available. Events examples of synchronous and asynchronous events examples of synchronous and asynchronous events Events Examples of synchronous events include: syscall.system_call Events syscall.system_call syscall.system_call Events The entry to the system call system_call. If the exit from a syscall is desired, appending a .return to the event monitor the exit of the system call instead. For example, to specify the entry and exit of the system call close, use syscall.close and syscall.close.return respectively. vfs.file_operation Events vfs.file_operation vfs.file_operation Events The entry to the file_operation event for Virtual File System (VFS). Similar to syscall event, appending a .return to the event monitors the exit of the file_operation operation. kernel.function("function") Events kernel.function("function") kernel.function("function") Events The entry to the kernel function function. For example, kernel.function("sys_open") refers to the "event" that occurs when the kernel function sys_open is called by any thread in the system. To specify the return of the kernel function sys_open, append the return string to the event statement; that is, kernel.function("sys_open").return. Events wildcards wildcards in events events wildcards When defining probe events, you can use asterisk (*) for wildcards. You can also trace the entry or exit of a function in a kernel source file. Consider the following example: wildcards.stp probe kernel.function("*@net/socket.c") { } probe kernel.function("*@net/socket.c").return { } Wild cards also work for other types of events, for example syscall.* In the previous example, the first probe's event specifies the entry of ALL functions in the kernel source file net/socket.c. The second probe specifies the exit of all those functions. Note that in this example, there are no statements in the handler; as such, no information will be collected or displayed. kernel.trace("tracepoint") tracepoint Events kernel.trace("tracepoint") kernel.trace("tracepoint") Events The static probe for tracepoint. Recent kernels (2.6.30 and newer) include instrumentation for specific events in the kernel. These events are statically marked with tracepoints. One example of a tracepoint available in systemtap is kernel.trace("kfree_skb") which indicates each time a network buffer is freed in the kernel. module("module").function("function") Events module("module") module("module") Events Allows you to probe functions within modules. For example: moduleprobe.stp probe module("ext3").function("*") { } probe module("ext3").function("*").return { } The first probe in points to the entry of all functions for the ext3 module. The second probe points to the exits of all functions for that same module; the use of the .return suffix is similar to kernel.function(). Note that the probes in do not contain statements in the probe handlers, and as such will not print any useful data (as in ). A system's kernel modules are typically located in /lib/modules/kernel_version, where kernel_version refers to the currently loaded kernel version. Modules use the file name extension .ko. Asynchronous Events Events asynchronous events asynchronous events Events Asynchronous events are not tied to a particular instruction or location in code. This family of probe points consists mainly of counters, timers, and similar constructs. Examples of asynchronous events include: begin Events begin begin Events The startup of a SystemTap session; that is, as soon as the SystemTap script is run. end Events end end Events The end of a SystemTap session. timer events Events timer events timer events Events An event that specifies a handler to be executed periodically. For example: timer-s.stp probe timer.s(4) { printf("hello world\n") } is an example of a probe that prints hello world every 4 seconds. It is also possible to use the following timer events: timer.ms(milliseconds) timer.us(microseconds) timer.ns(nanoseconds) timer.hz(hertz) timer.jiffies(jiffies) When used in conjunction with other probes that collect information, timer events allows you to print out get periodic updates and see how that information changes over time. Important SystemTap supports the use of a large collection of probe events. For more information about supported events, refer to man stapprobes. The SEE ALSO section of man stapprobes also contains links to other man pages that discuss supported events for specific subsystems and components. is reference appropriate? too advanced for readers (it seems so to me)? please advise.
    SystemTap Handler/Body handlers introduction Consider the following sample script: helloworld.stp probe begin { printf ("hello world\n") exit () } In , the event begin (that is, the start of the session) triggers the handler enclosed in { }, which simply prints hello world followed by a new-line, then exits. Note functions (used in handlers) exit() exit() functions SystemTap scripts continue to run until the exit() function executes. If the users wants to stop the execution of the script, it can interrupted manually with CtrlC. printf ( ) Statements printf() format strings The printf () statement is one of the simplest functions for printing data. printf () can also be used to display data using a wide variety of SystemTap functions in the following format: printf ("format string\n", arguments) printf() format strings format strings printf() The format string specifies how arguments should be printed. The format string of instructs SystemTap to print hello world, and contains no format specifiers. printf() format specifiers format specifiers printf() You can use the format specifiers %s (for strings) and %d (for numbers) in format strings, depending on your list of arguments. Format strings can have multiple format specifiers, each matching a corresponding argument; multiple arguments are delimited by a comma (,). Note printf() syntax and format syntax and format printf() format and syntax printf() Semantically, the SystemTap printf function is very similar to its C language counterpart. The aforementioned syntax and format for SystemTap's printf function is identical to that of the C-style printf. To illustrate this, consider the following probe example: variables-in-printf-statements.stp probe syscall.open { printf ("%s(%d) open\n", execname(), pid()) } instructs SystemTap to probe all entries to the system call open; for each event, it prints the current execname() (a string with the executable name) and pid() (the current process ID number), followed by the word open. A snippet of this probe's output would look like: editorial review: does a clarification that "format specifier1" is to "argument1", "format specifier2" is to "argument2", or is this clear enough? vmware-guestd(2206) open hald(2360) open hald(2360) open hald(2360) open df(3433) open df(3433) open df(3433) open hald(2360) open SystemTap Functions functions SystemTap script functions handler functions SystemTap supports a wide variety of functions that can be used as printf () arguments. uses the SystemTap functions execname() (name of the process that called a kernel function/performed a system call) and pid() (current process ID). is "handler function" an appropriate term? wcohen: use "SystemTap functions" to match up language in man pages The following is a list of commonly-used SystemTap functions: tid() functions tid() functions tid() tid() functions The ID of the current thread. uid() functions uid() uid() functions The ID of the current user. cpu() functions cpu() cpu() functions The current CPU number. gettimeofday_s() functions gettimeofday_s() gettimeofday_s() functions The number of seconds since UNIX epoch (January 1, 1970). ctime() functions ctime() ctime() functions Convert number of seconds since UNIX epoch to date. pp() functions pp() pp() functions A string describing the probe point currently being handled. thread_indent() functions thread_indent() thread_indent() functions This particular function is quite useful in providing you with a way to better organize your print results. The function takes one argument, an indentation delta, which indicates how many spaces to add or remove from a thread's "indentation counter". It then returns a string with some generic trace data along with an appropriate number of indentation spaces. The generic data included in the returned string includes a timestamp (number of microseconds since the first call to thread_indent() by the thread), a process name, and the thread ID. This allows you to identify what functions were called, who called them, and the duration of each function call. If call entries and exits immediately precede each other, it is easy to match them. However, in most cases, after a first function call entry is made several other call entries and exits may be made before the first call exits. The indentation counter helps you match an entry with its corresponding exit by indenting the next function call if it is not the exit of the previous one. Consider the following example on the use of thread_indent(): thread_indent.stp probe kernel.function("*@net/socket.c").call { printf ("%s -> %s\n", thread_indent(1), probefunc()) } probe kernel.function("*@net/socket.c").return { printf ("%s <- %s\n", thread_indent(-1), probefunc()) } prints out the thread_indent() and probe functions at each event in the following format: 0 ftp(7223): -> sys_socketcall 1159 ftp(7223): -> sys_socket 2173 ftp(7223): -> __sock_create 2286 ftp(7223): -> sock_alloc_inode 2737 ftp(7223): <- sock_alloc_inode 3349 ftp(7223): -> sock_alloc 3389 ftp(7223): <- sock_alloc 3417 ftp(7223): <- __sock_create 4117 ftp(7223): -> sock_create 4160 ftp(7223): <- sock_create 4301 ftp(7223): -> sock_map_fd 4644 ftp(7223): -> sock_map_file 4699 ftp(7223): <- sock_map_file 4715 ftp(7223): <- sock_map_fd 4732 ftp(7223): <- sys_socket 4775 ftp(7223): <- sys_socketcall This sample output contains the following information: The time (in microseconds) since the initial thread_indent() call for the thread (included in the string from thread_indent()). The process name (and its corresponding ID) that made the function call (included in the string from thread_indent()). An arrow signifying whether the call was an entry (<-) or an exit (->); the indentations help you match specific function call entries with their corresponding exits. The name of the function called by the process. remember to add a reference later to "tapsets" from here, to clarify that thread_indent is defined in tapsets as a special function of sorts name local variables name variables (local) name name local variables Identifies the name of a specific system call. This variable can only be used in probes that use the event syscall.system_call. target() functions target() target() functions Used in conjunction with stap script -x process ID or stap script -c command. If you want to specify a script to take an argument of a process ID or command, use target() as the variable in the script to refer to it. For example: targetexample.stp probe syscall.* { if (pid() == target()) printf("%s\n", name) } When is run with the argument -x process ID, it watches all system calls (as specified by the event syscall.*) and prints out the name of all system calls made by the specified process. This has the same effect as specifying if (pid() == process ID) each time you wish to target a specific process. However, using target() makes it easier for you to re-use the script, giving you the ability to pass a process ID as an argument each time you wish to run the script (that is, stap targetexample.stp -x process ID). For more information about supported SystemTap functions, refer to man stapfuncs. will need a complete listing of supported handler functions? also, SystemTap function descriptions seem ambiguous, please advise.
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Section.xml000066400000000000000000000004471260561570600243160ustar00rootroot00000000000000
    Section 1 Test Test of a section
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/SystemTap_Beginners_Guide.ent000066400000000000000000000005011260561570600277310ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/SystemTap_Beginners_Guide.xml000066400000000000000000000027351260561570600277560ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Tips_Tricks.xml000066400000000000000000000012121260561570600251370ustar00rootroot00000000000000 Tips and Tricks - This chapter covers miscellaneous tips/tricks - This is a tentative section, and will only be included if content can be provided - add use of exit() here - add "basic constructs" here; that is, using if/else, while loops, for loops, examples; if done, consider moving up to before Useful_SystemTap_Scripts.xm, after Understanding_How_SystemTap_Works.xml systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml000066400000000000000000000200141260561570600315220ustar00rootroot00000000000000 Understanding How SystemTap Works Short summary; probes, handlers, events Understanding How SystemTap Works SystemTap allows users to write and reuse simple scripts to deeply examine the activities of a running Linux system. These scripts can be designed to extract data, filter it, and summarize it quickly (and safely), enabling the diagnosis of complex performance (or even functional) problems. Understanding How SystemTap Works events and handlers events and handlers handlers and events The essential idea behind a SystemTap script is to name events, and to give them handlers. When SystemTap runs the script, SystemTap monitors for the event; once the event occurs, the Linux kernel then runs the handler as a quick sub-routine, then resumes. Understanding How SystemTap Works event types event types Understanding How SystemTap Works There are several kind of events; entering/exiting a function, timer expiration, session termination, etc. A handler is a series of script language statements that specify the work to be done whenever the event occurs. This work normally includes extracting data from the event context, storing them into internal variables, and printing results.
    Architecture ** add diagram, describe architecture, enumerate common tools ** architecture diagram must be simpler, if at all included ** add design advantages? e.g. "building kmods on-the-fly allows safer execution of script etc etc" Understanding How SystemTap Works architecture architecture of SystemTap SystemTap architecture A SystemTap session begins when you run a SystemTap script. This session occurs in the following fashion: SystemTap Session Understanding How SystemTap Works SystemTap sessions SystemTap sessions sessions, SystemTap First, SystemTap checks the script against the existing tapset library (normally in /usr/share/systemtap/tapset/ for any tapsets used. SystemTap will then substitute any located tapsets with their corresponding definitions in the tapset library. SystemTap then translates the script to C, running the system C compiler to create a kernel module from it. The tools that perform this step are contained in the systemtap package (refer to for more information). SystemTap loads the module, then enables all the probes (events and handlers) in the script. The staprun in the systemtap-runtime package (refer to for more information) provides this functionality. As the events occur, their corresponding handlers are executed. Once the SystemTap session is terminated, the probes are disabled, and the kernel module is unloaded. This sequence is driven from a single command-line program: stap. This program is SystemTap's main front-end tool. For more information about stap, refer to man stap (once SystemTap is properly installed on your machine).
    Tapsets Tapsets definition of definition, significance, difference with stap scripts (previous section), library of tapsets in system: location Tapsets are scripts that form a library of pre-written probes and functions to be used in SystemTap scripts. When a user runs a SystemTap script, SystemTap checks the script's probe events and handlers against the tapset library; SystemTap then loads the corresponding probes and functions before translating the script to C (refer to for information on what transpires in a SystemTap session). Like SystemTap scripts, tapsets use the file name extension .stp. The standard library of tapsets is located in /usr/share/systemtap/tapset/ by default. However, unlike SystemTap scripts, tapsets are not meant for direct execution; rather, they constitute the library from which other scripts can pull definitions. The tapset library is an abstraction layer designed to make it easier for users to define events and functions. Tapsets provide useful aliases for functions that users may want to specify as an event; knowing the proper alias to use is, for the most part, easier than remembering specific kernel functions that might vary between kernel versions. Several handlers and functions in and are defined in tapsets. For example, thread_indent() is defined in indent.stp. any other details to be included? i dont want to dwell too long here, though, since IMHO tapset development is beyond the scope of this "beginner's guide"
    systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Advanced_Scripts.xml000066400000000000000000000030041260561570600274410ustar00rootroot00000000000000 Useful SystemTap Scripts This chapter contains several advanced applications of SystemTap. The scripts enumerated herein combine SystemTap scripts with other tools in order to address some complex administrative tasks. All of these scripts are available at the following link: http://sourceware.org/systemtap/wiki/WarStories?action=fullsearch&context=180&value=traceio2&titlesearch=Titles Due to the relative length of the scripts discussed in this chapter, the full version of each script is documented in . this chapter will feature the following scripts: http://sourceware.org/systemtap/wiki/WSPSTimeouts?highlight=((WarStories)) http://sourceware.org/systemtap/wiki/WSPfiles?highlight=((WarStories)) http://sourceware.org/systemtap/wiki/WSPSTimeouts?highlight=%28%28WarStories%29%29 WAIT http://sourceware.org/systemtap/wiki/WSPanicOnOom?highlight=((WarStories)) http://sourceware.org/systemtap/wiki/WSPfiles?highlight=((WarStories)) systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-Disk.xml000066400000000000000000000110271260561570600265500ustar00rootroot00000000000000
    Real-Time Graphing of Disk and CPU Utilization http://sourceware.org/systemtap/examples/subsystem-index.html Graphing Disk and CPU Utilization - http://sourceware.org/systemtap/examples/general/graphs.stp This section describes how you can graph disk and CPU utilization in real-time, that is, in samples of 1 second each. disk-usage-graph.stp #! stap # disk I/O stats probe begin { qnames["ioblock"] ++; qsq_start ("ioblock") } probe ioblock.request { qs_wait ("ioblock") qs_run("ioblock") } probe ioblock.end { qs_done ("ioblock") } # CPU utilization probe begin { qnames["cpu"] ++; qsq_start ("cpu") } probe scheduler.cpu_on { if (!idle) {qs_wait ("cpu") qs_run ("cpu") }} probe scheduler.cpu_off { if (!idle) qs_done ("cpu") } # ------------------------------------------------------------------------ # utilization history tracking global N probe begin { N = 50 } global qnames, util, histidx function qsq_util_reset(q) { u=qsq_utilization (q, 100) qsq_start (q) return u } probe timer.ms(100) { # collect utilization percentages frequently histidx = (histidx + 1) % N # into circular buffer foreach (q in qnames) util[histidx,q] = qsq_util_reset(q) } # ------------------------------------------------------------------------ # general gnuplot graphical report generation probe timer.ms(1000) { # emit gnuplot command to display recent history printf ("set yrange [0:100]\n") printf ("plot ") foreach (q in qnames+) { if (++nq >= 2) printf (", ") printf ("'-' title \"%s\" with lines", q) } printf ("\n") foreach (q in qnames+) { for (i = (histidx + 1) % N; i != histidx; i = (i + 1) % N) printf("%d\n", util[i,q]) printf ("e\n") } printf ("pause 1\n") } outputs raw statistics on both CPU and disk usage per second. I/O usage is tracked through the events ioblock.request and ioblock.request.end, which track each request (and request completion) for a generic block I/O. CPU usage is tracked through scheduler.cpu_on and scheduler.cpu_off, which are activated whenever a process begins (and ends) a command execution on a CPU.
    gnuplot Running by itself hardly presents any data that is useful, as in . Raw disk-usage-graph.stp Output [...] 62 5 3 4 6 4 4 5 5 3 6 5 e pause 1 However, refining the output of through gnuplot presents us with a more useful result. gnuplot is a lightweight, command-line driven plotting program that helps you display data in a graphical format. By piping output to gnuplot (as in stap disk-usage-gr http://sourceware.org/systemtap/examples/subsystem-index.html Graphing Disk and CPU Utilization - http://sourceware.org/systemtap/examples/general/graphs.stp aph.stp | gnuplot), we get a graphical output similar to the following:
    Graphical Output Sample Sample output
presents a cleaner, more useful graphical output. This graph can show you the level of utilization for both I/O and CPU, in real time. question: does this script also capture stap process? that is, does the graph also include CPU utilization by systemtap while the script is running? systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-IO.xml000066400000000000000000000014571260561570600261730ustar00rootroot00000000000000
I/O Subsystem http://sourceware.org/systemtap/examples/subsystem-index.html Tally Reschedule Reason During AIO io_submit Call - http://sourceware.org/systemtap/examples/io/io_submit.stp Periodically Print I/O Activity by Process Name - http://sourceware.org/systemtap/examples/io/iotop.stp Track Cumulative I/O Activity by Process Name - http://sourceware.org/systemtap/examples/io/traceio.stp Watch I/O Activity on a Particular Device http://sourceware.org/systemtap/examples/io/traceio2.stp
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-Kernel.xml000066400000000000000000000014151260561570600270760ustar00rootroot00000000000000
Kernel http://sourceware.org/systemtap/examples/subsystem-index.html Tracing Calls for Sections of Code - http://sourceware.org/systemtap/examples/general/para-callgraph.stp Profile kernel functions - http://sourceware.org/systemtap/examples/process/pf2.stp Count Times Functions Called - http://sourceware.org/systemtap/examples/profiling/functioncallcount.stp Profile kernel functions - http://sourceware.org/systemtap/examples/profiling/thread-times.stp
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-Network.xml000066400000000000000000000011001260561570600272760ustar00rootroot00000000000000
Network http://sourceware.org/systemtap/examples/subsystem-index.html Periodic Listing of Processes Using Network Interfaces - http://sourceware.org/systemtap/examples/network/nettop.stp Trace Functions called in Network Socket Code - http://sourceware.org/systemtap/examples/network/socket-trace.stp
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-Others.xml000066400000000000000000000013331260561570600271210ustar00rootroot00000000000000
Other Useful Scripts http://sourceware.org/systemtap/examples/subsystem-index.html SCHEDULER - Generating Backtraces of Threads Waiting for IO Operations - http://sourceware.org/systemtap/examples/process/sleepingBeauties.stp LOCKING - System-Wide Futex Contention - http://sourceware.org/systemtap/examples/process/futexes.stp CPU - Graphing Disk and CPU Utilization - http://sourceware.org/systemtap/examples/general/graphs.stp
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-Signals.xml000066400000000000000000000014101260561570600272510ustar00rootroot00000000000000
Signals http://sourceware.org/systemtap/examples/subsystem-index.html Signal Counts by Process ID - http://sourceware.org/systemtap/examples/process/sig_by_pid.stp Signal Counts by Process Name - http://sourceware.org/systemtap/examples/process/sig_by_proc.stp Track SIGKILL Signals - http://sourceware.org/systemtap/examples/process/sigkill.stp System-Wide Count of Syscalls by PID - http://sourceware.org/systemtap/examples/process/syscalls_by_pid.stp
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-Syscalls.xml000066400000000000000000000016701260561570600274560ustar00rootroot00000000000000
System Calls http://sourceware.org/systemtap/examples/subsystem-index.html Trace Time Spent in Read and Write for Files - http://sourceware.org/systemtap/examples/io/iotime.stp Trace Time Spent in nanosleep Syscalls - http://sourceware.org/systemtap/examples/process/sleeptime.stp System-Wide Count of Syscalls by PID - http://sourceware.org/systemtap/examples/process/syscalls_by_pid.stp System-Wide Count of Syscalls by Executable - http://sourceware.org/systemtap/examples/process/syscalls_by_proc.stp Trace Time Spent in wait4 Syscalls - http://sourceware.org/systemtap/examples/process/wait4time.stp
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-disktop.xml000066400000000000000000000163121260561570600273350ustar00rootroot00000000000000
Summarizing Disk Read/Write Traffic script examples summarizing disk I/O traffic examples of SystemTap scripts summarizing disk I/O traffic summarizing disk I/O traffic script examples NO ENTRY IN WAR STORIES: Summarize Disk Read/Write Traffic http://sourceware.org/systemtap/examples/io/disktop.stp disk I/O traffic, summarizing script examples I/O traffic, summarizing script examples heaviest disk reads/writes, identifying script examples summarizing disk I/O traffic script examples identifying heaviest disk reads/writes script examples This section describes how to identify which processes are performing the heaviest disk reads/writes to the system. disktop.stp outputs the top ten processes responsible for the heaviest reads/writes to disk. displays a sample output for this script, and includes the following data per listed process: UID — user ID. A user ID of 0 refers to the root user. PID — the ID of the listed process. PPID — the process ID of the listed process's parent process. CMD — the name of the listed process. DEVICE — which storage device the listed process is reading from or writing to. T — the type of action performed by the listed process; W refers to write, while R refers to read. BYTES — the amount of data read to or written from disk. script examples ctime(), example of usage examples of SystemTap scripts ctime(), example of usage ctime(), example of usage script examples The time and date in the output of is returned by the functions ctime() and gettimeofday_s(). ctime() derives calendar time in terms of seconds passed since the Unix epoch (January 1, 1970). gettimeofday_s() counts the actual number of seconds since Unix epoch, which gives a fairly accurate human-readable timestamp for the output. local variables sample usage $return variables (local) sample usage $return $return sample usage local variables In this script, the $return is a local variable that stores the actual number of bytes each process reads or writes from the virtual file system. $return can only be used in return probes (for example, vfs.read.return and vfs.read.return). <xref linkend="scriptdisktop"/> Sample Output [...] Mon Sep 29 03:38:28 2008 , Average: 19Kb/sec, Read: 7Kb, Write: 89Kb UID PID PPID CMD DEVICE T BYTES 0 26319 26294 firefox sda5 W 90229 0 2758 2757 pam_timestamp_c sda5 R 8064 0 2885 1 cupsd sda5 W 1678 Mon Sep 29 03:38:38 2008 , Average: 1Kb/sec, Read: 7Kb, Write: 1Kb UID PID PPID CMD DEVICE T BYTES 0 2758 2757 pam_timestamp_c sda5 R 8064 0 2885 1 cupsd sda5 W 1678
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-dropwatch.xml000066400000000000000000000102421260561570600276470ustar00rootroot00000000000000
Monitoring Network Packets Drops in Kernel script examples network profiling examples of SystemTap scripts network profiling network profiling examples of SystemTap scripts profiling the network examples of SystemTap scripts network traffic, monitoring examples of SystemTap scripts tracepoint The network stack in Linux can discard packets for various reasons. Some Linux kernels include a tracepoint, kernel.trace("kfree_skb"), which easily tracks where packets are discarded. uses kernel.trace("kfree_skb") to trace packet discards; the script summarizes which locations discard packets every five-second interval. dropwatch.stp The kernel.trace("kfree_skb") traces which places in the kernel drop network packets. The kernel.trace("kfree_skb") has two arguments: a pointer to the buffer being freed ($skb) and the location in kernel code the buffer is being freed ($location). The script provides the function containing $location where possible. The information to map $location back to the function is not in the instrumentation by default. On SystemTap 1.4 the --all-modules option will include the required mapping information and the following command can be used to run the script: stap --all-modules dropwatch.stp On older versions of SystemTap you can use the following command to emulate the --all-modules option: stap -dkernel \ `cat /proc/modules | awk 'BEGIN { ORS = " " } {print "-d"$1}'` \ dropwatch.stp Running the dropwatch.stp script 15 seconds would result in output similar in . The output lists the number of misses for each tracepoint location with either the function name or the address. <xref linkend="dropwatch"/> Sample Output Monitoring for dropped packets 1762 packets dropped at unix_stream_recvmsg 4 packets dropped at tun_do_read 2 packets dropped at nf_hook_slow 467 packets dropped at unix_stream_recvmsg 20 packets dropped at nf_hook_slow 6 packets dropped at tun_do_read 446 packets dropped at unix_stream_recvmsg 4 packets dropped at tun_do_read 4 packets dropped at nf_hook_slow Stopping dropped packet monitor When the script is being compiled on one machine and run on another the --all-modules and /proc/modules directory are not available; the symname function will just print out the raw address. To make the raw address of packet drops more meaningful, refer to the /boot/System.map-`uname -r` file. This file lists the starting addresses for each function, allowing you to map the addresses in the output of to a specific function name. Given the following snippet of the /boot/System.map-`uname -r` file, the address 0xffffffff8149a8ed maps to the function unix_stream_recvmsg: [...] ffffffff8149a420 t unix_dgram_poll ffffffff8149a5e0 t unix_stream_recvmsg ffffffff8149ad00 t unix_find_other [...]
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-functioncalls.xml000066400000000000000000000065351260561570600305320ustar00rootroot00000000000000
Counting Function Calls Made script examples tallying function calls examples of SystemTap scripts tallying function calls tallying function calls examples of SystemTap scripts counting function calls examples of SystemTap scripts function calls, tallying examples of SystemTap scripts WAR STORY: Function call count http://sourceware.org/systemtap/wiki/WSFunctionCallCount?highlight=((WarStories)) no script in examples This section describes how to identify how many times the system called a specific kernel function in a 30-second sample. Depending on the use of wildcards, you can also use this script to target multiple kernel functions. functioncallcount.stp takes the targeted kernel function as an argument. The argument supports wildcards, which enables you to target multiple kernel functions up to a certain extent. script examples timer.ms(), sample usage examples of SystemTap scripts timer.ms(), sample usage timer.ms(), sample usage examples of SystemTap scripts The output of contains the name of the function called and how many times it was called during the sample time (in alphabetical order). contains an excerpt from the output of stap functioncallcount.stp "*@mm/*.c": <xref linkend="countcalls"/> Sample Output [...] __vma_link 97 __vma_link_file 66 __vma_link_list 97 __vma_link_rb 97 __xchg 103 add_page_to_active_list 102 add_page_to_inactive_list 19 add_to_page_cache 19 add_to_page_cache_lru 7 all_vm_events 6 alloc_pages_node 4630 alloc_slabmgmt 67 anon_vma_alloc 62 anon_vma_free 62 anon_vma_lock 66 anon_vma_prepare 98 anon_vma_unlink 97 anon_vma_unlock 66 arch_get_unmapped_area_topdown 94 arch_get_unmapped_exec_area 3 arch_unmap_area_topdown 97 atomic_add 2 atomic_add_negative 97 atomic_dec_and_test 5153 atomic_inc 470 atomic_inc_and_test 1 [...]
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-futexes.xml000066400000000000000000000117151260561570600273450ustar00rootroot00000000000000
Identifying Contended User-Space Locks script examples identifying contended user-space locks (futex contentions) examples of SystemTap scripts identifying contended user-space locks (futex contentions) identifying contended user-space locks (futex contentions) examples of SystemTap scripts contended user-space locks (futex contentions), identifying examples of SystemTap scripts WAR STORY: Futex contention http://sourceware.org/systemtap/wiki/WSFutexContention?highlight=((WarStories)) This section describes how to identify contended user-space locks throughout the system within a specific time period. The ability to identify contended user-space locks can help you investigate poor program performance that you suspect may be caused by futex contentions. futex contentions, identifying examples of SystemTap scripts futex contention, definition examples of SystemTap scripts script examples futex (lock) contentions examples of SystemTap scripts futex (lock) contentions futex (lock) contentions examples of SystemTap scripts Simply put, futex contention occurs when multiple processes are trying to access the same lock variable at the same time. This can result in a poor performance because the lock serializes execution; one process obtains the lock while the other processes must wait for the lock variable to become available again. script examples futex system call examples of SystemTap scripts futex system call futex system call examples of SystemTap scripts The script probes the futex system call to show lock contention. futexes.stp needs to be manually stopped; upon exit, it prints the following information: Name and ID of the process responsible for a contention The location of the contested lock variable How many times the lock variable was contended Average time of contention throughout the probe contains an excerpt from the output of upon exiting the script (after approximately 20 seconds). <xref linkend="futexcontention"/> Sample Output [...] automount[2825] lock 0x00bc7784 contended 18 times, 999931 avg us synergyc[3686] lock 0x0861e96c contended 192 times, 101991 avg us synergyc[3758] lock 0x08d98744 contended 192 times, 101990 avg us synergyc[3938] lock 0x0982a8b4 contended 192 times, 101997 avg us [...]
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-inodewatch.xml000066400000000000000000000122531260561570600300050ustar00rootroot00000000000000
Monitoring Reads and Writes to a File script examples monitoring reads and writes to a file examples of SystemTap scripts monitoring reads and writes to a file monitoring reads and writes to a file examples of SystemTap scripts file reads/writes, monitoring examples of SystemTap scripts reads/writes to a file, monitoring examples of SystemTap scripts writes/reads to a file, monitoring examples of SystemTap scripts WAR STORY: monitoring inode activity http://sourceware.org/systemtap/wiki/WSFileMonitor?highlight=((WarStories)) no script in examples This section describes how to monitor reads from and writes to a file in real time. inodewatch.stp need to add references to sources/man pages that explain how "dev_nr = $file->f_dentry->d_inode->i_sb->s_dev" and "($1 << 20 | $2)". takes the following information about the file as arguments on the command line: script examples file device number (integer format) examples of SystemTap scripts file device number (integer format) file device number (integer format) examples of SystemTap scripts device number of a file (integer format) examples of SystemTap scripts The file's major device number. The file's minor device number. The file's inode number. script examples stat -c, determining file device number (integer format) examples of SystemTap scripts stat -c, determining file device number (integer format) stat -c, determining file device number (integer format) examples of SystemTap scripts To get this information, use stat -c '%D %i' filename, where filename is an absolute path. For instance: to monitor /etc/crontab, run stat -c '%D %i' /etc/crontab first. This gives the following output: 805 1078319 script examples inode number examples of SystemTap scripts inode number inode number examples of SystemTap scripts 805 is the base-16 (hexadecimal) device number. The lower two digits are the minor device number and the upper digits are the major number. 1078319 is the inode number. To start monitoring /etc/crontab, run stap inodewatch.stp 0x8 0x05 1078319 (The 0x prefixes indicate base-16 values. The output of this command contains the name and ID of any process performing a read/write, the function it is performing (that is, vfs_read or vfs_write), the device number (in hex format), and the inode number. contains the output of stap inodewatch.stp 0x8 0x05 1078319 (when cat /etc/crontab is executed while the script is running) : <xref linkend="inodewatch"/> Sample Output cat(16437) vfs_read 0x800005/1078319 cat(16437) vfs_read 0x800005/1078319
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-inodewatch2.xml000066400000000000000000000057141260561570600300730ustar00rootroot00000000000000
Monitoring Changes to File Attributes script examples monitoring changes to file attributes examples of SystemTap scripts monitoring changes to file attributes monitoring changes to file attributes examples of SystemTap scripts changes to file attributes, monitoring examples of SystemTap scripts file attributes, monitoring changes to examples of SystemTap scripts WAR STORY: monitoring more inode activity http://sourceware.org/systemtap/wiki/WSFileMonitor2?highlight=((WarStories)) no script in examples This section describes how to monitor if any processes are changing the attributes of a targeted file, in real time. inodewatch2.stp Like from , takes the targeted file's device number (in integer format) and inode number as arguments. For more information on how to retrieve this information, refer to . The output for is similar to that of , except that also contains the attribute changes to the monitored file, as well as the ID of the user responsible (uid()). shows the output of while monitoring /home/joe/bigfile when user joe executes chmod 777 /home/joe/bigfile and chmod 666 /home/joe/bigfile. <xref linkend="inodewatch2"/> Sample Output chmod(17448) inode_setattr 0x800005/6011835 100777 500 chmod(17449) inode_setattr 0x800005/6011835 100666 500
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-ioblktime.xml000066400000000000000000000066531260561570600276460ustar00rootroot00000000000000
Periodically Print I/O Block Time script examples monitoring I/O block time examples of SystemTap scripts monitoring I/O block time monitoring I/O block time examples of SystemTap scripts I/O block time, monitoring examples of SystemTap scripts printing I/O block time (periodically) examples of SystemTap scripts This section describes how to track the amount of time each block I/O requests spends waiting for completion. This is useful in determining whether there are too many outstanding block I/O operations at any given time. ioblktime.stp computes the average waiting time for block I/O per device, and prints a list every 10 seconds. As always, you can revise this refresh rate by editing the specified value in probe timer.s(10), end {. In some cases, there can be too many outstanding block I/O operations, at which point the script can exceed the default number of MAXMAPENTRIES. MAXMAPENTRIES is the maximum number of rows in an array if the array size is not specified explicitly when declared. If the script exceeds the default MAXMAPENTRIES value of 2048, run the script again with the stap option -DMAXMAPENTRIES=10000. <xref linkend="ioblktime"/> Sample Output device rw total (us) count avg (us) sda W 9659 6 1609 dm-0 W 20278 6 3379 dm-0 R 20524 5 4104 sda R 19277 5 3855 displays the device name, operations performed (rw), total wait time of all operations (total(us)), number of operations (count), and average wait time for all those operations (avg (us)). The times tallied by the script are in microseconds.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-iotime.xml000066400000000000000000000123231260561570600271440ustar00rootroot00000000000000
Tracking I/O Time For Each File Read or Write script examples monitoring I/O time examples of SystemTap scripts monitoring I/O time monitoring I/O time examples of SystemTap scripts I/O time, monitoring examples of SystemTap scripts time of I/O examples of SystemTap scripts This section describes how to monitor the amount of time it takes for each process to read from or write to any file. This is useful to determine what files are slow to load on a given system. iotime.stp tracks each time a system call opens, closes, reads from, and writes to a file. For each file any system call accesses, counts the number of microseconds it takes for any reads or writes to finish and tracks the amount of data (in bytes) read from or written to the file. local variables sample usage $count variables (local) sample usage $count $count sample usage local variables also uses the local variable $count to track the amount of data (in bytes) that any system call attempts to read or write. Note that $return (as used in from ) stores the actual amount of data read/written. $count can only be used on probes that track data reads or writes (that is, syscall.read and syscall.write). <xref linkend="iotime"/> Sample Output [...] 825946 3364 (NetworkManager) access /sys/class/net/eth0/carrier read: 8190 write: 0 825955 3364 (NetworkManager) iotime /sys/class/net/eth0/carrier time: 9 [...] 117061 2460 (pcscd) access /dev/bus/usb/003/001 read: 43 write: 0 117065 2460 (pcscd) iotime /dev/bus/usb/003/001 time: 7 [...] 3973737 2886 (sendmail) access /proc/loadavg read: 4096 write: 0 3973744 2886 (sendmail) iotime /proc/loadavg time: 11 [...] prints out the following data: A timestamp, in microseconds. Process ID and process name. An access or iotime flag. The file accessed. If a process was able to read or write any data, a pair of access and iotime lines should appear together. The access line's timestamp refers to the time that a given process started accessing a file; at the end of the line, it will show the amount of data read/written (in bytes). The iotime line will show the amount of time (in microseconds) that the process took in order to perform the read or write. If an access line is not followed by an iotime line, it means that the process did not read or write any data.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-iotop.xml000066400000000000000000000070001260561570600270040ustar00rootroot00000000000000
Periodically Print I/O Activity script examples monitoring I/O activity examples of SystemTap scripts monitoring I/O activity monitoring I/O activity examples of SystemTap scripts I/O activity, monitoring examples of SystemTap scripts printing I/O activity (periodically) examples of SystemTap scripts This section describes how to monitor I/O activity on the system. iotop.stp prints out the top ten executables generating I/O traffic every 5-second interval, in descending order. Its output contains the process name and the amount of data read or written by the process, in KB. For example: <xref linkend="iotop"/> Sample Output [...] Process KB Read KB Written Xorg 50287 0 staprun 3328 0 multiload-apple 3039 23 sshd 208 1 floaters 14 62 NetworkManager 15 0 gnome-vfs-daemo 8 0 cupsd 3 3 sendmail 4 0 mixer_applet2 3 0 Process KB Read KB Written Xorg 51886 0 staprun 3328 0 multiload-apple 3039 23 sshd 1344 4 snmpd 90 0 floaters 15 66 NetworkManager 23 0 irqbalance 16 0 pam_timestamp_c 9 0 sendmail 4 0 displays top I/O writes and reads within a random 10-second interval. Note that also detects I/O resulting from SystemTap activity — displays reads done by staprun.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-kernelprofiling.xml000066400000000000000000000101741260561570600310520ustar00rootroot00000000000000
Kernel Profiling WAR STORY: Kernel Profiling http://sourceware.org/systemtap/wiki/WSKernelProfile?highlight=((WarStories)) http://sourceware.org/systemtap/examples/process/pf2.stp In , you can revise the wildcards used in the probe to target all kernel functions. This can be useful if you are interested in indentifying what the kernel is performing over a specific time period. However, doing so can cause considerable stress on the machine. In addition, this does not provide any indication of whether a specific function is being called too often during small time increments. This section describes how to profile the kernel properly. does this by providing a list of the top ten kernel functions called within a specific time period, and how many times each function was called during that time. kernelprof.stp #! /usr/bin/env stap global profile, pcount probe timer.profile { pcount <<< 1 fn = probefunc () if (fn != "") profile[fn] <<< 1 } probe timer.ms(5000) { printf ("\n--- %d samples recorded:\n", @count(pcount)) foreach (f in profile- limit 10) { printf ("%-30s\t%6d\n", f, @count(profile[f])) } delete profile delete pcount } records and outputs kernel functions called every 5 seconds. You can change this setting by editing probe timer.ms(5000) accordingly. contains an excerpt of the output over a 20-second period: <xref linkend="kernelprof"/> Sample Output [...] --- 10002 samples recorded: sys_recvfrom 1 memmove 1 __copy_from_user_ll 17 __copy_to_user_ll 15 mwait_idle 5868 link_path_walk 1 kfree 1 fget_light 1 audit_syscall_exit 1 __d_lookup 1 --- 10002 samples recorded: sysfs_read_file 1 free_poll_entry 1 syscall_exit_work 1 profile_hit 1 do_page_fault 2 _read_lock 3 kmap_atomic 4 strncpy_from_user 1 find_vma_prepare 1 __copy_from_user_ll 12 --- 10000 samples recorded: system_call 4 unix_stream_sendmsg 1 __d_path 1 do_page_fault 2 kmap_atomic 1 find_vma 1 __copy_to_user_ll 16 __copy_from_user_ll 10 mwait_idle 5759 memcpy_fromiovec 1 --- 10004 samples recorded: syscall_exit 1 __d_path 1 fput 2 do_page_fault 4 strncpy_from_user 1 may_open 1 ide_outb 1 ide_outsw 1 __copy_to_user_ll 11 __copy_from_user_ll 14 [...] allows you to identify interesting kernel-specific performance facts about the system, such as kernel-intensive workloads and idle times (in this case, mwait_idle. Note that does not count user-space functions, although it counts all kernel functions as part of the sample (even if the script cannot identify from which specific kernel function a call originated.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-nettop.xml000066400000000000000000000141321260561570600271670ustar00rootroot00000000000000
Network Profiling script examples network profiling examples of SystemTap scripts network profiling network profiling examples of SystemTap scripts WAR STORY: Top network users by PID http://sourceware.org/systemtap/wiki/WSNetTop?highlight=((WarStories)) probably http://sourceware.org/systemtap/examples/network/nettop.stp profiling the network examples of SystemTap scripts network traffic, monitoring examples of SystemTap scripts This section describes how to profile network activity. provides a glimpse into how much network traffic each process is generating on a machine. nettop.stp script examples if/else conditionals, alternative syntax examples of SystemTap scripts if/else conditionals, alternative syntax if/else conditionals, alternative syntax examples of SystemTap scripts Note that function print_activity() uses the following expressions: n_xmit ? @sum(ifxmit[pid, dev, exec, uid])/1024 : 0 n_recv ? @sum(ifrecv[pid, dev, exec, uid])/1024 : 0 These expressions are if/else conditionals. The first statement is a more concise way of writing the following psuedo code: if n_recv != 0 then @sum(ifrecv[pid, dev, exec, uid])/1024 else 0 tracks which processes are generating network traffic on the system, and provides the following information about each process: PID — the ID of the listed process. UID — user ID. A user ID of 0 refers to the root user. DEV — which ethernet device the process used to send / receive data (for example, eth0, eth1) XMIT_PK — number of packets transmitted by the process RECV_PK — number of packets received by the process XMIT_KB — amount of data sent by the process, in kilobytes RECV_KB — amount of data received by the service, in kilobytes provides network profile sampling every 5 seconds. You can change this setting by editing probe timer.ms(5000) accordingly. contains an excerpt of the output from over a 20-second period: <xref linkend="nettop"/> Sample Output [...] PID UID DEV XMIT_PK RECV_PK XMIT_KB RECV_KB COMMAND 0 0 eth0 0 5 0 0 swapper 11178 0 eth0 2 0 0 0 synergyc PID UID DEV XMIT_PK RECV_PK XMIT_KB RECV_KB COMMAND 2886 4 eth0 79 0 5 0 cups-polld 11362 0 eth0 0 61 0 5 firefox 0 0 eth0 3 32 0 3 swapper 2886 4 lo 4 4 0 0 cups-polld 11178 0 eth0 3 0 0 0 synergyc PID UID DEV XMIT_PK RECV_PK XMIT_KB RECV_KB COMMAND 0 0 eth0 0 6 0 0 swapper 2886 4 lo 2 2 0 0 cups-polld 11178 0 eth0 3 0 0 0 synergyc 3611 0 eth0 0 1 0 0 Xorg PID UID DEV XMIT_PK RECV_PK XMIT_KB RECV_KB COMMAND 0 0 eth0 3 42 0 2 swapper 11178 0 eth0 43 1 3 0 synergyc 11362 0 eth0 0 7 0 0 firefox 3897 0 eth0 0 1 0 0 multiload-apple [...]
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-paracallgraph.xml000066400000000000000000000122421260561570600304570ustar00rootroot00000000000000
Call Graph Tracing script examples call graph tracing examples of SystemTap scripts call graph tracing call graph tracing examples of SystemTap scripts incoming/outgoing function calls, tracing examples of SystemTap scripts function calls (incoming/outgoing), tracing examples of SystemTap scripts tracing incoming/outgoing function calls examples of SystemTap scripts tracing call graph examples of SystemTap scripts WAR STORY: Call graph tracing http://sourceware.org/systemtap/wiki/WSCallGraph?highlight=((WarStories)) script: http://sourceware.org/systemtap/examples/general/para-callgraph.stp This section describes how to trace incoming and outgoing function calls. para-callgraph.stp script examples multiple command-line arguments, example of examples of SystemTap scripts multiple command-line arguments, example of multiple command-line arguments, example of examples of SystemTap scripts example of multiple command-line arguments examples of SystemTap scripts takes two command-line arguments: script examples trigger function examples of SystemTap scripts trigger function trigger function examples of SystemTap scripts The function/s whose entry/exit call you'd like to trace ($1). A second optional trigger function ($2), which enables or disables tracing on a per-thread basis. Tracing in each thread will continue as long as the trigger function has not exited yet. please verify previous if correct; i'm particularly interested in finding out how to better describe "trigger function" script examples thread_indent(), sample usage examples of SystemTap scripts thread_indent(), sample usage thread_indent(), sample usage examples of SystemTap scripts uses thread_indent(); as such, its output contains the timestamp, process name, and thread ID of $1 (that is, the probe function you are tracing). For more information about thread_indent(), refer to its entry in . The following example contains an excerpt from the output for stap para-callgraph.stp 'kernel.function("*@fs/*.c")' 'kernel.function("sys_read")': <xref linkend="scriptcallgraph"/> Sample Output [...] 267 gnome-terminal(2921): <-do_sync_read return=0xfffffffffffffff5 269 gnome-terminal(2921):<-vfs_read return=0xfffffffffffffff5 0 gnome-terminal(2921):->fput file=0xffff880111eebbc0 2 gnome-terminal(2921):<-fput 0 gnome-terminal(2921):->fget_light fd=0x3 fput_needed=0xffff88010544df54 3 gnome-terminal(2921):<-fget_light return=0xffff8801116ce980 0 gnome-terminal(2921):->vfs_read file=0xffff8801116ce980 buf=0xc86504 count=0x1000 pos=0xffff88010544df48 4 gnome-terminal(2921): ->rw_verify_area read_write=0x0 file=0xffff8801116ce980 ppos=0xffff88010544df48 count=0x1000 7 gnome-terminal(2921): <-rw_verify_area return=0x1000 12 gnome-terminal(2921): ->do_sync_read filp=0xffff8801116ce980 buf=0xc86504 len=0x1000 ppos=0xffff88010544df48 15 gnome-terminal(2921): <-do_sync_read return=0xfffffffffffffff5 18 gnome-terminal(2921):<-vfs_read return=0xfffffffffffffff5 0 gnome-terminal(2921):->fput file=0xffff8801116ce980
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-sockettrace.xml000066400000000000000000000104611260561570600301660ustar00rootroot00000000000000
Tracing Functions Called in Network Socket Code script examples tracing functions called in network socket code examples of SystemTap scripts tracing functions called in network socket code tracing functions called in network socket code examples of SystemTap scripts network socket code, tracing functions called in examples of SystemTap scripts functions called in network socket code, tracing examples of SystemTap scripts http://sourceware.org/systemtap/examples/network/socket-trace.stp script examples net/socket.c, tracing functions from examples of SystemTap scripts net/socket.c, tracing functions from net/socket.c, tracing functions from examples of SystemTap scripts This section describes how to trace functions called from the kernel's net/socket.c file. This task helps you identify, in finer detail, how each process interacts with the network at the kernel level. socket-trace.stp is identical to , which was earlier used in to illustrate how thread_indent() works. <xref linkend="sockettrace"/> Sample Output [...] 0 Xorg(3611): -> sock_poll 3 Xorg(3611): <- sock_poll 0 Xorg(3611): -> sock_poll 3 Xorg(3611): <- sock_poll 0 gnome-terminal(11106): -> sock_poll 5 gnome-terminal(11106): <- sock_poll 0 scim-bridge(3883): -> sock_poll 3 scim-bridge(3883): <- sock_poll 0 scim-bridge(3883): -> sys_socketcall 4 scim-bridge(3883): -> sys_recv 8 scim-bridge(3883): -> sys_recvfrom 12 scim-bridge(3883):-> sock_from_file 16 scim-bridge(3883):<- sock_from_file 20 scim-bridge(3883):-> sock_recvmsg 24 scim-bridge(3883):<- sock_recvmsg 28 scim-bridge(3883): <- sys_recvfrom 31 scim-bridge(3883): <- sys_recv 35 scim-bridge(3883): <- sys_socketcall [...] contains a 3-second excerpt of the output for . For more information about the output of this script as provided by thread_indent(), refer to .
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml000066400000000000000000000073241260561570600314340ustar00rootroot00000000000000
Tracking System Call Volume Per Process script examples monitoring system calls (volume per process) examples of SystemTap scripts monitoring system calls (volume per process) monitoring system calls (volume per process) examples of SystemTap scripts system calls volume (per process), monitoring examples of SystemTap scripts uses systemtap/testsuite/systemtap.examples/process/syscalls_by_p*.stp This section illustrates how to determine which processes are performing the highest volume of system calls. In previous sections, we've described how to monitor the top system calls used by the system over time (). We've also described how to identify which applications use a specific set of "polling suspect" system calls the most (). Monitoring the volume of system calls made by each process provides more data in investigating your system for polling processes and other resource hogs. syscalls_by_proc.stp lists the top 20 processes performing the highest number of system calls. It also lists how many system calls each process performed during the time period. Refer to for a sample output. <xref linkend="topsys"/> Sample Output Collecting data... Type Ctrl-C to exit and display results #SysCalls Process Name 1577 multiload-apple 692 synergyc 408 pcscd 376 mixer_applet2 299 gnome-terminal 293 Xorg 206 scim-panel-gtk 95 gnome-power-man 90 artsd 85 dhcdbd 84 scim-bridge 78 gnome-screensav 66 scim-launcher [...] To display the process IDs instead of the process names, use the following script instead. syscalls_by_pid.stp As indicated in the output, you need to manually exit the script in order to display the results. You can add a timed expiration to either script by simply adding a timer.s() probe; for example, to instruct the script to expire after 5 seconds, add the following probe to the script: probe timer.s(5) { exit() }
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-tcp_connections.xml000066400000000000000000000051661260561570600310550ustar00rootroot00000000000000
Monitoring Incoming TCP Connections script examples monitoring incoming TCP connections examples of SystemTap scripts monitoring incoming TCP connections monitoring incoming TCP connections examples of SystemTap scripts TCP connections (incoming), monitoring examples of SystemTap scripts incoming TCP connections, monitoring examples of SystemTap scripts This section illustrates how to monitor incoming TCP connections. This task is useful in identifying any unauthorized, suspicious, or otherwise unwanted network access requests in real time. tcp_connections.stp While is running, it will print out the following information about any incoming TCP connections accepted by the system in real time: Current UID CMD - the command accepting the connection PID of the command Port used by the connection IP address from which the TCP connection originated <xref linkend="tcpconnections"/> Sample Output UID CMD PID PORT IP_SOURCE 0 sshd 3165 22 10.64.0.227 0 sshd 3165 22 10.64.0.227
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-tcpdumplike.xml000066400000000000000000000075571260561570600302140ustar00rootroot00000000000000
Monitoring TCP Packets script examples monitoring TCP packets examples of SystemTap scripts monitoring TCP packets monitoring TCP packets examples of SystemTap scripts TCP packets, monitoring examples of SystemTap scripts TCP packets, monitoring examples of SystemTap scripts This section illustrates how to monitor TCP packets received by the system. This is useful in analyzing network traffic generated by applications running on the system. tcpdumplike.stp While is running, it will print out the following information about any received TCP packets in real time: Source and destination IP address (saddr, daddr, respectively) Source and destination ports (sport, dport, respectively) Packet flags To determine the flags used by the packet, uses the following functions: urg - urgent ack - acknowledgement psh - push rst - reset syn - synchronize fin - finished The aforementioned functions return 1 or 0 to specify whether the packet uses the corresponding flag. <xref linkend="tcpdumplike"/> Sample Output ----------------------------------------------------------------- Source IP Dest IP SPort DPort U A P R S F ----------------------------------------------------------------- 209.85.229.147 10.0.2.15 80 20373 0 1 1 0 0 0 92.122.126.240 10.0.2.15 80 53214 0 1 0 0 1 0 92.122.126.240 10.0.2.15 80 53214 0 1 0 0 0 0 209.85.229.118 10.0.2.15 80 63433 0 1 0 0 1 0 209.85.229.118 10.0.2.15 80 63433 0 1 0 0 0 0 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 209.85.229.118 10.0.2.15 80 63433 0 1 1 0 0 0 [...]
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-threadtimes.xml000066400000000000000000000056671260561570600302040ustar00rootroot00000000000000
Determining Time Spent in Kernel and User Space script examples determining time spent in kernel and user space examples of SystemTap scripts determining time spent in kernel and user space determining time spent in kernel and user space examples of SystemTap scripts time spent in kernel/user space, determining examples of SystemTap scripts kernel and user space, determining time spent in examples of SystemTap scripts user and kernel space, determining time spent in examples of SystemTap scripts http://sourceware.org/systemtap/examples/profiling/thread-times.stp This section illustrates how to determine the amount of time any given thread is spending in either kernel or user-space. thread-times.stp script examples CPU ticks examples of SystemTap scripts CPU ticks CPU ticks examples of SystemTap scripts lists the top 20 processes currently taking up CPU time within a 5-second sample, along with the total number of CPU ticks made during the sample. The output of this script also notes the percentage of CPU time each process used, as well as whether that time was spent in kernel space or user space. contains a 5-second sample of the output for : <xref linkend="threadtimes"/> Sample Output tid %user %kernel (of 20002 ticks) 0 0.00% 87.88% 32169 5.24% 0.03% 9815 3.33% 0.36% 9859 0.95% 0.00% 3611 0.56% 0.12% 9861 0.62% 0.01% 11106 0.37% 0.02% 32167 0.08% 0.08% 3897 0.01% 0.08% 3800 0.03% 0.00% 2886 0.02% 0.00% 3243 0.00% 0.01% 3862 0.01% 0.00% 3782 0.00% 0.00% 21767 0.00% 0.00% 2522 0.00% 0.00% 3883 0.00% 0.00% 3775 0.00% 0.00% 3943 0.00% 0.00% 3873 0.00% 0.00%
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-timeout.xml000066400000000000000000000110161260561570600273420ustar00rootroot00000000000000
Monitoring Polling Applications script examples monitoring polling applications examples of SystemTap scripts monitoring polling applications monitoring polling applications examples of SystemTap scripts polling applications, monitoring examples of SystemTap scripts uses systemtap/testsuite/systemtap.examples/profiling/timeout.stp This section describes how to identify and monitor which applications are polling. Doing so allows you to track unnecessary or excessive polling, which can help you pinpoint areas for improvement in terms of CPU usage and power savings. timeout.stp tracks how many times each of the following system calls completed due to time expiring rather than due to an actual event occurring: poll select epoll itimer futex nanosleep signal script examples timer.s(), sample usage examples of SystemTap scripts timer.s(), sample usage timer.s(), sample usage examples of SystemTap scripts <xref linkend="timeouts"/> Sample Output uid | poll select epoll itimer futex nanosle signal| process 28937 | 148793 0 0 4727 37288 0 0| firefox 22945 | 0 56949 0 1 0 0 0| scim-bridge 0 | 0 0 0 36414 0 0 0| swapper 4275 | 23140 0 0 1 0 0 0| mixer_applet2 4191 | 0 14405 0 0 0 0 0| scim-launcher 22941 | 7908 1 0 62 0 0 0| gnome-terminal 4261 | 0 0 0 2 0 7622 0| escd 3695 | 0 0 0 0 0 7622 0| gdm-binary 3483 | 0 7206 0 0 0 0 0| dhcdbd 4189 | 6916 0 0 2 0 0 0| scim-panel-gtk 1863 | 5767 0 0 0 0 0 0| iscsid 2562 | 0 2881 0 1 0 1438 0| pcscd 4257 | 4255 0 0 1 0 0 0| gnome-power-man 4278 | 3876 0 0 60 0 0 0| multiload-apple 4083 | 0 1331 0 1728 0 0 0| Xorg 3921 | 1603 0 0 0 0 0 0| gam_server 4248 | 1591 0 0 0 0 0 0| nm-applet 3165 | 0 1441 0 0 0 0 0| xterm 29548 | 0 1440 0 0 0 0 0| httpd 1862 | 0 0 0 0 0 1438 0| iscsid You can increase the sample time by editing the second probe (timer.s(1)). The output of contains the name and UID of the top 20 polling applications, along with how many times each application performed each polling system call (over time). contains an excerpt of the script. In this particular example firefox is doing an excessive amount of polling due to a plugin module.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-topsys.xml000066400000000000000000000073321260561570600272230ustar00rootroot00000000000000
Tracking Most Frequently Used System Calls script examples monitoring system calls examples of SystemTap scripts monitoring system calls monitoring system calls examples of SystemTap scripts system calls, monitoring examples of SystemTap scripts from helps you identify which applications are polling by examining a small subset of system calls ( poll, select, epoll, itimer, futex, nanosleep, and signal). However, in some systems, an excessive number of system calls outside that small subset might be responsible for time spent in the kernel. If you suspect that an application is using system calls excessively, you need to identify the most frequently used system calls on the system. To do this, use . topsys.stp lists the top 20 system calls used by the system per 5-second interval. It also lists how many times each system call was used during that period. Refer to for a sample output. script examples timer.s(), sample usage examples of SystemTap scripts timer.s(), sample usage timer.s(), sample usage examples of SystemTap scripts <xref linkend="topsys"/> Sample Output -------------------------------------------------------------- SYSCALL COUNT gettimeofday 1857 read 1821 ioctl 1568 poll 1033 close 638 open 503 select 455 write 391 writev 335 futex 303 recvmsg 251 socket 137 clock_gettime 124 rt_sigprocmask 121 sendto 120 setitimer 106 stat 90 time 81 sigreturn 72 fstat 66 --------------------------------------------------------------
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio.xml000066400000000000000000000114771260561570600273150ustar00rootroot00000000000000
Track Cumulative IO script examples tracking cumulative I/O examples of SystemTap scripts tracking cumulative I/O tracking cumulative I/O examples of SystemTap scripts cumulative I/O, tracking examples of SystemTap scripts monitoring cumulative I/O examples of SystemTap scripts printing I/O activity (cumulative) examples of SystemTap scripts This section describes how to track the cumulative amount of I/O to the system. traceio.stp prints the top ten executables generating I/O traffic over time. In addition, it also tracks the cumulative amount of I/O reads and writes done by those ten executables. This information is tracked and printed out in 1-second intervals, and in descending order. local variables sample usage $return variables (local) sample usage $return $return sample usage local variables Note that also uses the local variable $return, which is also used by from . <xref linkend="traceio"/> Sample Output [...] Xorg r: 583401 KiB w: 0 KiB floaters r: 96 KiB w: 7130 KiB multiload-apple r: 538 KiB w: 537 KiB sshd r: 71 KiB w: 72 KiB pam_timestamp_c r: 138 KiB w: 0 KiB staprun r: 51 KiB w: 51 KiB snmpd r: 46 KiB w: 0 KiB pcscd r: 28 KiB w: 0 KiB irqbalance r: 27 KiB w: 4 KiB cupsd r: 4 KiB w: 18 KiB Xorg r: 588140 KiB w: 0 KiB floaters r: 97 KiB w: 7143 KiB multiload-apple r: 543 KiB w: 542 KiB sshd r: 72 KiB w: 72 KiB pam_timestamp_c r: 138 KiB w: 0 KiB staprun r: 51 KiB w: 51 KiB snmpd r: 46 KiB w: 0 KiB pcscd r: 28 KiB w: 0 KiB irqbalance r: 27 KiB w: 4 KiB cupsd r: 4 KiB w: 18 KiB
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml000066400000000000000000000126671260561570600274010ustar00rootroot00000000000000
I/O Monitoring (By Device) script examples monitoring device I/O examples of SystemTap scripts monitoring device I/O monitoring device I/O examples of SystemTap scripts I/O monitoring (by device) examples of SystemTap scripts device I/O, monitoring examples of SystemTap scripts example from http://sourceware.org/systemtap/examples/io/traceio2.stp, but error WAR STORY: http://sourceware.org/systemtap/wiki/WSDeviceMonitor?highlight=((WarStories)), but script errored was able to correct script through http://sourceware.org/systemtap/wiki/WSFileMonitor?highlight=((WarStories)) This section describes how to monitor I/O activity on a specific device. traceio2.stp script examples stat -c, determining whole device number examples of SystemTap scripts stat -c, determining whole device number stat -c, determining whole device number examples of SystemTap scripts script examples whole device number (usage as a command-line argument) examples of SystemTap scripts whole device number (usage as a command-line argument) whole device number (usage as a command-line argument) examples of SystemTap scripts takes 1 argument: the whole device number. To get this number, use stat -c "0x%D" directory, where directory is located in the device to be monitored. script examples usrdev2kerndev() examples of SystemTap scripts usrdev2kerndev() usrdev2kerndev() examples of SystemTap scripts The usrdev2kerndev() function converts the whole device number into the format understood by the kernel. The output produced by usrdev2kerndev() is used in conjunction with the MKDEV(), MINOR(), and MAJOR() functions to determine the major and minor numbers of a specific device. The output of includes the name and ID of any process performing a read/write, the function it is performing (that is, vfs_read or vfs_write), and the kernel device number. The following example is an excerpt from the full output of stap traceio2.stp 0x805, where 0x805 is the whole device number of /home. /home resides in /dev/sda5, which is the device we wish to monitor. <xref linkend="traceio2"/> Sample Output [...] synergyc(3722) vfs_read 0x800005 synergyc(3722) vfs_read 0x800005 cupsd(2889) vfs_write 0x800005 cupsd(2889) vfs_write 0x800005 cupsd(2889) vfs_write 0x800005 [...]
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml000066400000000000000000000111411260561570600276660ustar00rootroot00000000000000 Useful SystemTap Scripts SystemTap scripts useful examples examples of SystemTap scripts useful examples of SystemTap scripts systemtap-testsuite package sample scripts This chapter enumerates several SystemTap scripts you can use to monitor and investigate different subsystems. All of these scripts are available at /usr/share/systemtap/testsuite/systemtap.examples/ once you install the systemtap-testsuite RPM. short intro, reference to online source (http://sourceware.org/systemtap/examples/subsystem-index.html); "always updated" short description of gnuplot (?) for better GUI of results case studies and more info on some scripts here - http://sourceware.org/systemtap/wiki/WarStories
Network The following sections showcase scripts that trace network-related functions and build a profile of network activity.
Disk The following sections showcase scripts that monitor disk and I/O activity.
Profiling The following sections showcase scripts that profile kernel activity by monitoring function calls.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Userspace_probing.xml000066400000000000000000000274631260561570600263730ustar00rootroot00000000000000 User-space Probing SystemTap initially focused on kernel-space probing. Because there are many instances where user-space probing can help diagnose a problem, SystemTap 0.6 added support to allow probing user-space processes. SystemTap can probe the entry into and return from a function in user-space processes, probe predefined markers in user-space code, and monitor user-process events. SystemTap requires the uprobes module to perform user-space probing. If your Linux kernel is version 3.5 or higher, it already includes uprobes. To verify that the current kernel supports uprobes natively, run the following command: grep CONFIG_UPROBES /boot/config-`uname -r` If uprobes is integrated, the output of this command is as follows: CONFIG_UPROBES=y If you are running a kernel prior to version 3.5, SystemTap automatically builds the uprobes module. However, you also need the utrace kernel extensions required by the SystemTap user-space probing to track various user-space events. More details about the utrace infrastructure are available at . To determine whether the currently running Linux kernel provides the needed utrace support, type the following at a shell prompt: grep CONFIG_UTRACE /boot/config-`uname -r` If the Linux kernel supports user-space probing, the command produces the following output: CONFIG_UTRACE=y
User-Space Events Events user-space All user-space event probes begin with process. You can limit the process events to a specific running process by specifying the process ID. You can also limit the process events to monitor a particular executable by specifying the path to the executable (PATH). SystemTap makes use of the PATH environment variable, which allows you to use both the name used on the command-line to start the executable and the absolute path to the executable. Several of the user-space probe events limit their scope to a particular executable name (PATH), because SystemTap must use debug information to statically analyze where to place the probes. But for many user-space probe events, the process ID and executable name are optional. Any process event in the list below that include process ID or the path to the executable must include those arguments. The process ID and path to the executable are optional for the process events that do not list them: process("PATH").function("function") The entry to the user-space function function for the executable PATH. This event is the user-space analogue of the kernel.function("function") event. It allows wildcards for the function function and .return suffix. process("PATH").statement("statement") The earliest instruction in the code for statement. This is the user-space analogue of kernel.statement("statement"). process("PATH").mark("marker") The static probe point marker defined in PATH. You can use wildcards for marker to specify multiple marks with a single probe. The static probe points may also have numbered arguments ($1, $2, and so on) available to the probe. A variety of user-space packages such as Java include these static probe points. Most packages that provide static probe points also provide aliases for the raw user-space mark events. Below is one such alias for the x86_64 Java hotspot JVM: probe hotspot.gc_begin = process("/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so").mark("gc__begin") process.begin A user-space process is created. You can limit this to a particular process ID or a full path to the executable. process.thread.begin A user-space thread is created. You can limit this to a particular process ID or a full path to the executable. process.end A user-space process dies. You can limit this to a particular process ID or a full path to the executable. process.thread.end A user-space thread is destroyed. You can limit this to a particular process ID or a full path to the executable. process.syscall A user-space process makes a system call. The system call number is available in the $syscall context variable, and the fist six arguments are available in $arg1 through $arg6. The .return suffix places the probe at the return from the system call. For syscall.return, the return value is available through the $return context variable. You can limit this to a particular process ID or a full path to the executable.
Accessing User-Space Target Variables target variables user-space You can access user-space target variables in the same manner as described in . In Linux, however, there are separate address spaces for the user and kernel code. When using the -> operator, SystemTap accesses the appropriate address space. For pointers to base types such as integers and strings, there are a number of functions listed below to access user-space data. The first argument for each functions is the pointer to the data item. user_char(address) Obtains the character at address for the current user process. user_short(address) Obtains the short integer at address for the current user process. user_int(address) Obtains the integer at address for the current user process. user_long(address) Obtains the long integer at address for the current user process. user_string(address) Obtains the string at address for the current user process. user_string_n(address, n) Obtains the string at address for the current user process and limits the string to n bytes.
User-Space Stack Backtraces Stack backtrace user-space The probe point (pp) function indicates which particular event triggered the SystemTap event handler. A probe on the entry into a function would list the function name. However, in many cases the same probe point event may be triggered by many different modules in the program; this is particularly true for functions in shared libraries. A SystemTap backtrace of the user-space stack can provide additional context on how the probe point event is triggered. The user-space stack backtrace generation is complicated by the compiler producing code optimized to eliminate stack frame pointers. However, the compiler also includes information in the debug information section to allow debugging tools to produce stack backtraces. SystemTap user-space stack backtrace mechanism makes use of that debug information to walk the stack to generate stack traces for 32-bit and 64-bit x86 processors; other processor architectures do not yet support the use of debug information to unwind the user-space stack. To ensure that the needed debug information is used to produce the user-space stack backtraces, use the option for executables and for shared libraries. For example, you can use the user-space backtrack functions to see how the xmalloc function is being called by the ls command. With the debuginfo for the ls command installed, the following SystemTap command provides a backtrace each time the xmalloc function is called: stap -d /bin/ls --ldd \ -e 'probe process("ls").function("xmalloc") {print_usyms(ubacktrace())}' \ -c "ls /" When executed, this command produces output similar to the following: bin dev lib media net proc sbin sys var boot etc lib64 misc op_session profilerc selinux tmp cgroup home lost+found mnt opt root srv usr 0x4116c0 : xmalloc+0x0/0x20 [/bin/ls] 0x4116fc : xmemdup+0x1c/0x40 [/bin/ls] 0x40e68b : clone_quoting_options+0x3b/0x50 [/bin/ls] 0x4087e4 : main+0x3b4/0x1900 [/bin/ls] 0x3fa441ec5d : __libc_start_main+0xfd/0x1d0 [/lib64/libc-2.12.so] 0x402799 : _start+0x29/0x2c [/bin/ls] 0x4116c0 : xmalloc+0x0/0x20 [/bin/ls] 0x4116fc : xmemdup+0x1c/0x40 [/bin/ls] 0x40e68b : clone_quoting_options+0x3b/0x50 [/bin/ls] 0x40884a : main+0x41a/0x1900 [/bin/ls] 0x3fa441ec5d : __libc_start_main+0xfd/0x1d0 [/lib64/libc-2.12.so] ... For more details on the functions available for user-space stack backtraces, refer to ucontext-symbols.stp and ucontext-unwind.stp tapsets. You can also find the description of the functions in the aforementioned tapsets in the SystemTap Tapset Reference Manual.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml000066400000000000000000000317141260561570600260110ustar00rootroot00000000000000 Using SystemTap short intro, contents of chapter Using SystemTap This chapter documents how to install SystemTap in the system and explains how to use the stap utility to run SystemTap scripts.
Running SystemTap Scripts - basic commands (e.g. stap), useful options per command (e.g. stap -vv), tool references (man pages, related kernel-doc), references within book (i.e. errors chapter) - running systemtap scripts Usage running SystemTap scripts running SystemTap scripts Usage Usage stap stap Usage Usage staprun staprun Usage SystemTap is distributed with a number of command line tools that allow you to monitor the activities of the system. The stap command reads probing instructions from a SystemTap script, translates these instructions into C code, builds a kernel module, and loads it into the running Linux kernel. The staprun command runs SystemTap instrumentation, that is, a kernel module built from SystemTap scripts during a cross-instrumentation. SystemTap scripts, how to run Running stap and staprun requires elevated privileges to the system. Because not all users can be granted root access just to run SystemTap, you can allow a non-privileged user to run SystemTap instrumentation on their machine by adding them to one of the following user groups: stapdev Usage stapdev stapdev Usage Members of this group can use the stap command to run SystemTap scripts, or staprun to run SystemTap instrumentation modules. Running the stap command involves compiling SystemTap scripts into kernel modules and loading them into the kernel. This operation requires elevated privileges to the system, which are granted to stapdev members. Unfortunately, such privileges also grant effective root access to stapdev members. As a consequence, only grant stapdev group membership to users whom you can trust with root access. stapusr Usage stapusr stapusr Usage Members of this group can only use the staprun command to run SystemTap instrumentation modules. In addition, they can only run modules from the /lib/modules/kernel_version/systemtap/ directory. Note that this directory must be owned only by the root user, and must only be writable by the root user. The stap command reads a SystemTap script either from a file, or from standard input. To tell stap to read a SystemTap script from a file, specify the file name on the command line: stap file_name Usage standard input, running scripts from standard input, running scripts from Usage running scripts from standard input To instruct stap to read a SystemTap script from standard input, use the switch instead of the file name. Note that any command-line options you wish to use must be inserted before the switch. For example, to make the output of the stap command more verbose, type: echo "probe timer.s(1) {exit()}" | stap -v - Below is a list of commonly used stap options: Usage options, stap options, stap Usage stap options -v Makes the output of the SystemTap session more verbose. You can repeat this option multiple times to provide more details on the script's execution, for example: stap -vvv script.stp This option is particularly useful if you encounter any errors in running the script. For more information about common SystemTap script errors, refer to . -o file_name Sends the standard output to a file named file_name. -S size,count Limits the maximum size of output files to size megabytes and the maximum number of stored files to count. This option implements logrotate operations for SystemTap and the resulting file names have a sequence number suffix. -x process_id Sets the SystemTap handler function target() to the specified process ID. For more information about target(), refer to . -c 'command' Sets the SystemTap handler function target() to the specified command and runs the SystemTap instrumentation for the duration of this command. For more information about target(), refer to . -e 'script' Uses script rather than a file as input for the SystemTap translator. -F Uses SystemTap's flight recorder mode and makes the script a background process. For more information about flight recorder mode, refer to . any other useful options worth noting here for beginners? For more information about the stap command, refer to the stap1 man page. For more information about the staprun command and cross-instrumentation, refer to or the staprun8 man page.
SystemTap Flight Recorder Mode flight recorder mode SystemTap's flight recorder mode allows you to run a SystemTap script for long periods of time and just focus on recent output. The flight recorder mode limits the amount of output generated. There are two variations of the flight recorder mode: in-memory and file mode. In both cases, the SystemTap script runs as a background process.
In-memory Flight Recorder flight recorder mode in-memory mode When flight recorder mode is used without a file name, SystemTap uses a buffer in kernel memory to store the output of the script. Once the SystemTap instrumentation module is loaded and the probes start running, the instrumentation detaches and is put in the background. When the interesting event occurs, you can reattach to the instrumentation to see the recent output in the memory buffer and any continuing output. To run a SystemTap script by using the flight recorder in-memory mode, run the stap command with the command line option: stap -F iotime.stp Once the script starts, stap prints a message similar to the following to provide you with the command to reconnect to the running script: Disconnecting from systemtap module. To reconnect, type "staprun -A stap_5dd0073edcb1f13f7565d8c343063e68_19556" When the interesting event occurs, run the following command to connect to the currently running script, output the recent data in the memory buffer, and get continuing output: staprun -A stap_5dd0073edcb1f13f7565d8c343063e68_19556 By default, the kernel buffer is 1MB in size. You can increase this value by using the option with the size in megabytes (rounded up to the next power over 2) for the buffer. For example, on the SystemTap command line would specify 2MB for the buffer.
File Flight Recorder flight recorder mode file mode The flight recorder mode can also store data to files. You can control the number and size of the files kept by using the option followed by two numerical arguments separated by a comma: the first argument is the maximum size in megabytes for the each output file, the second argument is the number of recent files to keep. To specify the file name, use the option followed by the name. SystemTap automatically adds a number suffix to the file name to indicate the order of the files. The following command starts SystemTap in file flight recorder mode with the output going to files named /tmp/iotime.log.[0-9]+, each file 1MB or smaller, and keeping latest two files: stap -F -o /tmp/pfaults.log -S 1,2 pfaults.stp The command prints the process ID to standard output. Sending a SIGTERM to the process terminates the SystemTap script and stops the data collection. For example, if the previous command listed 7590 as the process ID, the following command would stop the SystemTap script: kill -s SIGTERM 7590 In this example, only the most recent two files generated by the script are kept: SystemTap automatically removes older files. As a result, the ls -sh /tmp/pfaults.log.* command lists two files: 1020K /tmp/pfaults.log.5 44K /tmp/pfaults.log.6 To examine the latest data, read the file with the highest number, in this case /tmp/pfaults.log.6.
systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/extras/000077500000000000000000000000001260561570600234715ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/extras/cast_example.stp000066400000000000000000000001571260561570600266710ustar00rootroot00000000000000function task_state:long (task:long) { return @cast(task, "task_struct", "kernel")->state } systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/extras/defined_example.stp000066400000000000000000000004341260561570600273330ustar00rootroot00000000000000probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?, kernel.function("handle_mm_fault@mm/memory.c") ? { name = "pagefault" write_access = (@defined($flags) ? $flags & FAULT_FLAG_WRITE : $write_access) address = $address } systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/extras/fedoradebugurl.sh000077500000000000000000000005151260561570600270230ustar00rootroot00000000000000#! /bin/bash echo -n "Enter nvr of kernel-debuginfo (e.g. 2.6.25-14.fc9.x86_64) " ; \ read NVR; \ BASE=`uname -m` ; \ NVR=`echo $NVR | sed s/.$BASE//` ; \ VERSION=`echo $NVR | awk -F- '{print $1}'` ; \ RELEASE=`echo $NVR | awk -F- '{print $2}'` ; \ echo "http://kojipkgs.fedoraproject.org/\ packages/kernel/$VERSION/$RELEASE/$BASE/" systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/extras/perror.stp000066400000000000000000000000371260561570600255320ustar00rootroot00000000000000probe vfs.read probe vfs.write systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/extras/rhelchannels.sh000077500000000000000000000010401260561570600264710ustar00rootroot00000000000000#! /bin/bash pkg=`rpm -q --whatprovides "redhat-release"` releasever=`rpm -q --qf "%{version}" $pkg` variant=`echo $releasever | tr -d "[:digit:]" | tr "[:upper:]" "[:lower:]" ` if test -z "$variant"; then echo "No Red Hat Enterprise Linux variant (workstation/client/server) found." exit 1 fi version=`echo $releasever | tr -cd "[:digit:]"` base=`uname -i` echo "rhel-$base-$variant-$version" echo "rhel-$base-$variant-$version-debuginfo" echo "rhel-$base-$variant-optional-$version-debuginfo" echo "rhel-$base-$variant-optional-$version" systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/extras/rheldebugurl.sh000077500000000000000000000003211260561570600265100ustar00rootroot00000000000000#! /bin/bash pkg=`rpm -q --whatprovides "redhat-release"` releasever=`rpm -q --qf "%{version}" $pkg` base=`uname -m` echo "ftp://ftp.redhat.com/pub/redhat/linux/\ enterprise/$releasever/en/os/$base/Debuginfo" systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/extras/werror.stp000066400000000000000000000000401260561570600255330ustar00rootroot00000000000000probe begin { printf("x") = 1 } systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/images/000077500000000000000000000000001260561570600234305ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/images/gnuplotsample.png000077500000000000000000000201361260561570600270350ustar00rootroot00000000000000PNG  IHDR/(?Zj9Rp,T0vӖ@8X|,-:m}w_q)Y[@=϶bG??=U+ret'jW|Wb>x^DϏ2.a7x_K IE[33흉4J*OVϾ^]}aj^Ze2cK*53[^[I^`C>ǻvEXbB1Bs;( _>smU_S(#?yo}{bpݖ(Gyh}cj9xq5qqՙƏw?戈­<_c?O;ŎxW ^;1q,v]zVڛKqڦ(DǷlzω~+rh`]Gi[`׶2^.X~NQaU!yk*Oo?gS{ĚU08Q񙣱MqR|Ǣʸ3wXuם1ykbx썋>1v)q=?3O_.ſ#l^{ŧF̖w?3GǮw5ψgLįwC8DXِ3al6vFӇ㦏aZc#(Dsz&Y""";C#;bpxc|s +]Q>c黷џq] Y' q+N[M7~qݟ}=ν Ҧ8[_Ŋ WgC}{|3q}\1߽q]/+Ц37Yᐫ`l0lfQ [~ϝlzKF#]X,E(cx !~qXl^76Gqh =|~t\~Ʌ1yc<qlÉV#~hMص=btgLĖnG7"޹kKēOXx幨=9^yں""b~ȑ,5~Z-\|w>qQ??ﷴ`\tSK.q,GY0Bt|[C</ kO}`8qL kFk㵙r bqu i;^駝6EY\/m<=퉁_u?\=3D9" Q,ΝAX_5# @vUS0Y5n<߯T>v'/nk=Gab1sO\g<5n'̪8gkGFDՋ>G1x;p~/M[t߁xGc7/z*> _}ol*m[mϝ~š(->8=Q\j\V4RnzJM/"ED?}iӫ-wmPsxb?s?}XٵW/y-~ŕgxybpp0~qPu4k};?ϼgGuWqI|;~=u7K.Wc?&>{b"V,ڿg'㪷oyyQ(_Սq|/Vm0 '?q8ct_vYِ3#xg?v k̅fg˯{OplƸ-7f{LP oUFy]1u᱋<;cO1>3GFapexqxط2k/O_DqyiW;?wgLY\?؁'bQj1t뢸vSsqm7Ǒ쫇"b{թSlȑv[jf>8 b[ ].V@N7lGt_;QّQ(Ć~#G;}l #Q.GXgF#p=]ry& +q{˳[X1ç]6Gg"ʅ1vSV+]O8zhCSQ\Ŋi: ][I^Љ5QXLoX"b`u[Ea~V †m1uG7!V]+5^;T}8}׿bzȤ]sG/ES,ݰW3w|ݷTMO04W;}uߛ5 xe(k?c+`ގkOcD7-'X2;(Z4#H~0ƺq2͢pjb|} c%}:}cX Y>F! [`rVO}W6,A5nLpJ:#1PIEqFcF͜Mzэw %`$د;"FR=S}G.?Ȃ8u lr*1GѸQ',zH`dA *< pt]@0fR_ԍ,a[@0rh#XH p `@0F#,7@02J;`IF#Iֿ`@0 rr"`@0 Dq 059[,"#H7 Ʈ-rjǃpjb|_u V>h$ !Fk0TaeT]ݜ@%,`RRu79n]T;poŴ-B3)znTI5ωEcm$.st@@iR&nx@0 F#(nx@0""`@0w@\ `@0  a~߹#`w=@0'#U~1S<@0 F nx@0 !K@q4S9HMOLj<_VD#`r1$`Ré<洖uxV_jC^u`l:OE {ij$6Ӷ* ͨ#˲͹9X{tuV>'rAҹ X;FFHF#X:@0 -#S1ŝ~`@0B4:EFF#FX.1R#G`@0 @0R5z{@F;P (#]0eLX]a]D F.FF#\FЎҘG 2`@0)aHFԤFȉq@0 C`@0 !+F ""'cG#uNݍ:Gx1951.A $Vb1"D#@ރ:lXn\0ާ`\û(1 F2R טК\(@sU@f$QuYQ0t 1 F#|cbq46Һ!yiɒDhi,&Ubs~`T@0vh3r]΃q[~;D:,LUdbȷnIYDF,h;(#݌E@³]0ژ軤-B#@?$z^iWQ,8Ob^[rրRnJ؁gDZF92ix#Ɣx{#qsO` `>Mhe$p7=4nZU`>WӸ| E;f<@콳m{di;59 Iiv{ rJ@$}OAέw#=y 2߶:*hTBZ Z^P򶿭nLig\D+ =7ĐEFv_[woj/F!1 dQgHwbp2g)v{~SA0f2{A_,v*Mōɖ]ؼ}xN\x7{`p 7ۉ_QGȳf](`lC3)|-^L؀<`RF̀ιT0BnLuG 'n1(31 H F ׌. F(`%~-@04A^F# QǹYLϣ3{ftNы4?[{Lz:d::۾5x:}}!tp50/k?#6֧dcVaw~<گڗmRӚ֧XLԟ캷,oY[Y;޽uhv_.NIg:Y|D#cVyy]:La\.Gwӓ{&ŏ54'F#`@0 @0 F#@ Vݖmo`B\.[ 4/IENDB`systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/images/icon.svg000066400000000000000000003301271260561570600251070ustar00rootroot00000000000000 image/svg+xml id="path2858" /> systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/xsl/000077500000000000000000000000001260561570600227715ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/xsl/defaults.xsl000066400000000000000000000173461260561570600253430ustar00rootroot00000000000000 figure after example before equation before table before procedure before qanda 0 0 CONFIDENTIAL maybe ansi 0 1 _ _ No DocBook localization exists for " " or " ". Using default " ". systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/xsl/html.xsl000066400000000000000000000254241260561570600244740ustar00rootroot00000000000000


The following annotations are from this essay. You are seeing them here because your browser doesn’t support the user-interface techniques used to make them appear as ‘popups’ on modern browsers.

title

  • SystemTap Beginners Guide


systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/xsl/pdf.xsl000066400000000000000000003430401260561570600242760ustar00rootroot00000000000000 ]> left left 0 - - true italic #0066cc start wrap \ wrap \ #f5f5f5 black 6pt 6pt 6pt pt 1pt solid #aaaaaa 0em 0em 0em 0em 0em 0em 0pt always 0.8em 1em 1.2em 0.8em 1em 1.2em true wrap false preserve preserve start justify start Common_Content/images/ 0em 0em 0em 0em 3em 13pt #eeeeec bold true always #8e9f00 #d08e13 #9e0000 #dddddd 0em 0em #eeeeec 1pt solid #aaaaaa 1pt solid #aaaaaa 1pt solid #aaaaaa 1.5em 1em 1em 0em 0em always black white 0pt 0pt 0em set toc book toc,qandadiv article toc chapter nop qandadiv nop qandaset nop sect1 nop sect2 nop sect3 nop sect4 nop sect5 nop section nop part nop 3 Common_Content/images/ 10pt 1 0.1pt 0.1pt 0.1pt 1em 1em 1em 0.1em 0.1em 0.1em 1em 1em 1em 1em 1em 1em 5pt 0.5em 0.5em 0.5em 0.5pt dashed black always 4pt 4pt 2pt 2pt bold 25pt normal 16pt 0.6pt 0.6pt black black white white white white 1 1 1 15mm 9mm 11mm 8mm 5mm 15mm 19mm 31mm 0pt 0pt 0pt 4pc 0pc #336699 white bold pt false bold always 0.8em 1.0em 1.2em 3pt solid #aaaaaa auto 0em 0.8em 0em 1.5em 2em 2em 2em 0.5em 1em 2em 0.5em 1em 2em auto normal pt 0.1pt 0.1pt 0.1pt normal pt 1em 0.5em 2em 0.1pt 0.1pt 0.1pt pt pt pt pt pt pt bold always 1.8em 2.0em 2.2em 0.1em 0.1em 0.1em left body-start() 0.1em 0.1em 0.1em 1em 0.8em 1.2em bold 12pt center always false black center left white pt 24pt bold left 1em 1em 24pt bold center bold white KacstBook, IPAPGothic,Sazanami Gothic, Baekmuk Batang, ZYSong18030,AR PL UMing CN, Lohit Assamese,Lohit Bengali, Lohit Bengali, Lohit Tamil, Lohit Punjabi, Lohit Hindi, Lohit Devanagari,Lohit Marathi,Lohit Hindi, Lohit Gujarati, AR PL ShanHeiSun Uni,AR PL UMing TW, Lohit Kannada, Meera,Lohit Malayalam, Lohit Oriya, Lohit Telugu, LKLUG, KacstFarsi, David CLM, Garuda, Liberation Sans,sans-serif KacstScreen, IPAGothic,Sazanami Gothic, Baekmuk Batang, ZYSong18030,AR PL UMing CN, Lohit Assamese,Lohit Bengali, Lohit Bengali, Lohit Tamil, Lohit Punjabi, Lohit Hindi, Lohit Devanagari,Lohit Marathi,Lohit Hindi, Lohit Gujarati, AR PL ShanHeiSun Uni,AR PL UMing TW, Lohit Kannada, Meera,Lohit Malayalam, Lohit Oriya, Lohit Telugu, LKLUG, KacstFarsi, Miriam Mono CLM, Garuda, Liberation Mono,monospace no-wrap 0.5pt solid black 0.5pt solid black pt 66.66% normal normal 0.25em 48pt black normal normal 0pt black rule 1in 0 : 6pt 6pt 8pt bold left 18pt 18pt 24pt bold left   right fo:wrapper , , , , always always 0 0 0 0 1 0 0 1.0 1.0 auto auto auto auto auto % scale-to-fit auto auto % scale-to-fit auto before center after auto #0000ff #007f00 #5C3566 #ff00ff #FF00FF #0000ff #00007f #ff0000 #00007f #007f00 #5C3566 #002F5D #ffa500 #b03060 #96b9ff #9b30ff #5C3566 #0000ff #0000ff #000000 < > italic #ff00ff , lot front front back back back index back body -draft -draft . Error: CALS tables must specify the number of columns. fixed No adjustColumnWidths function available. always Don't know how to do callouts with Unexpected verbatim environment: 1 No numberLines function available. 1em -3em 4em 0em 0em 0em 0em 2em systemtap-2.9/doc/SystemTap_Beginners_Guide/en-US/xsl/xhtml-common.xsl000066400000000000000000002754631260561570600261640ustar00rootroot00000000000000 Common_Content/images/ Common_Content/css/default.css Common_Content/css/print.css 0 set toc book toc article nop chapter toc qandadiv toc qandaset toc sect1 nop sect2 nop sect3 nop sect4 nop sect5 nop section toc part toc Note Warning Important Note

before
0 1
<xsl:copy-of select="$title"/> not publican /../chrome.css /../db4.css /..///css/brand.css /../print.cssprint toc_embeded desktop
formalpara

0 0 0 1 0 1.0 1.0 1.0 px px px px 0 0 middle {$alt} Warning: imagemaps not supported on scaled images 0 middle
Sample output of when piped through gnuplot
height: px
background-color:
calspair , , , Warning: only calspair or otherunits='imagemap' supported in imageobjectco Error: CALS tables must specify the number of columns. lt-4-cols gt-4-cols gt-8-cols lt-7-rows gt-7-rows gt-14-rows 100% 100% No convertLength function available. No adjustColumnWidths function available.
No insertCallouts function is available.

{$conum} Don't know how to generate Unicode callouts when $callout.unicode.start.character is ( ) ( ) Unexpected verbatim environment: 1 No numberLines function available. #ftn. [ ]
systemtap-2.9/doc/SystemTap_Tapset_Reference/000077500000000000000000000000001260561570600214215ustar00rootroot00000000000000systemtap-2.9/doc/SystemTap_Tapset_Reference/.gitignore000066400000000000000000000000461260561570600234110ustar00rootroot00000000000000/docproc stamp-* tapsets/ tapsets.xml systemtap-2.9/doc/SystemTap_Tapset_Reference/Makefile.am000066400000000000000000000054261260561570600234640ustar00rootroot00000000000000# Makefile.am --- automake input file for systemtap tapset reference manual ## process this file with automake to produce Makefile.in DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap MAN_INSTALL_DIR = $(DESTDIR)$(mandir)/man3 HTML_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/tapsets ### # The build process is as follows (targets): # (xmldocs) [by docproc] # file.tmpl --> file.xml +--> file.ps (psdocs) [by xmlto] # +--> file.pdf (pdfdocs) [by xmlto] # +--> DIR=file (htmldocs) [by xmlto] # +--> man/ (mandocs) [by xmlto] if BUILD_PDFREFDOCS PDFDOCS = tapsets.pdf endif if XMLTO_STRINGPARAM XMLTOMANPARAMS=--stringparam man.authors.section.enabled=0 --stringparam man.copyright.section.enabled=0 XMLTOHTMLPARAMS=--stringparam use.id.as.filename=1 -m $(abs_srcdir)/generate-toc.xml XMLTOPDFPARAMS=--stringparam refentry.generate.name=0 --stringparam refentry.generate.title=1 endif if HAVE_FOP XMLTOPDF_FOP=--with-fop else XMLTOPDF_FOP= endif if BUILD_REFDOCS noinst_PROGRAMS = docproc SRCTREE=$(abs_top_srcdir)/ DOCPROC=$(abs_builddir)/docproc noinst_SCRIPTS = manpager MANPAGER=$(abs_srcdir)/manpager all: $(PDFDOCS) stamp-htmldocs stamp-mandocs tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp') sed -e '/^!Syscalls/{r $(abs_srcdir)/syscalls.xmlpart' -e 'd}' $(abs_srcdir)/tapsets.tmpl > tapsets.tmpl.new SRCTREE=$(SRCTREE) $(DOCPROC) doc tapsets.tmpl.new > tapsets.xml.new xsltproc $(srcdir)/sort-tapsets.xslt tapsets.xml.new > tapsets.xml.new2 rm tapsets.xml.new tapsets.tmpl.new if test -s tapsets.xml && cmp tapsets.xml.new2 tapsets.xml >/dev/null ; then \ echo tapsets.xml unchanged; \ rm tapsets.xml.new2; \ else \ mv tapsets.xml.new2 tapsets.xml; \ fi stamp-htmldocs: tapsets.xml xmlto $(XMLTOHTMLPARAMS) html -o tapsets tapsets.xml touch stamp-htmldocs # bump up the allocated space so "xmlto pdf" works tapsets.pdf: tapsets.xml env pool_size=6000000 hash_extra=6000000 xmlto $(XMLTOPDF_FOP) $(XMLTOPDFPARAMS) pdf tapsets.xml stamp-mandocs: tapsets.xml xmlto $(XMLTOMANPARAMS) man -o man3 tapsets.xml SRCTREE=$(SRCTREE) $(MANPAGER) # generate tapset::* pages cp $(abs_srcdir)/syscalls.3stap man_pages/tapset\:\:syscalls.3stap touch stamp-mandocs #FIXME need to figure out where to install things appropriately #installmandocs: mandocs install-data-hook: if BUILD_PDFREFDOCS $(MKDIR_P) $(DOC_INSTALL_DIR) $(INSTALL_DATA) tapsets.pdf $(DOC_INSTALL_DIR) endif $(MKDIR_P) $(MAN_INSTALL_DIR) $(INSTALL_DATA) man3/* $(MAN_INSTALL_DIR) $(INSTALL_DATA) man_pages/* $(MAN_INSTALL_DIR) # manpager output $(MKDIR_P) $(HTML_INSTALL_DIR) $(INSTALL_DATA) tapsets/* $(HTML_INSTALL_DIR) endif CLEANFILES=tapsets.xml stamp-* $(PDFDOCS) clean-local: rm -rf man3 man_pages tapsets systemtap-2.9/doc/SystemTap_Tapset_Reference/Makefile.in000066400000000000000000000472461260561570600235030ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am --- automake input file for systemtap tapset reference manual VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @BUILD_REFDOCS_TRUE@noinst_PROGRAMS = docproc$(EXEEXT) subdir = doc/SystemTap_Tapset_Reference DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) docproc_SOURCES = docproc.c docproc_OBJECTS = docproc.$(OBJEXT) docproc_LDADD = $(LDADD) SCRIPTS = $(noinst_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = docproc.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DYNINST_CXXFLAGS = @DYNINST_CXXFLAGS@ DYNINST_LDFLAGS = @DYNINST_LDFLAGS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAVADIR = @JAVADIR@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LOCALEDIR = @LOCALEDIR@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIECFLAGS = @PIECFLAGS@ PIECXXFLAGS = @PIECXXFLAGS@ PIELDFLAGS = @PIELDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STAP_EXTRA_VERSION = @STAP_EXTRA_VERSION@ STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ avahi_CFLAGS = @avahi_CFLAGS@ avahi_LIBS = @avahi_LIBS@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxx11 = @cxx11@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dracutstap = @dracutstap@ dvidir = @dvidir@ elfutils_abs_srcdir = @elfutils_abs_srcdir@ exec_prefix = @exec_prefix@ have_dvips = @have_dvips@ have_fop = @have_fop@ have_jar = @have_jar@ have_javac = @have_javac@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_xmlto = @have_xmlto@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libvirt_CFLAGS = @libvirt_CFLAGS@ libvirt_LIBS = @libvirt_LIBS@ libxml2_CFLAGS = @libxml2_CFLAGS@ libxml2_LIBS = @libxml2_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ nss_CFLAGS = @nss_CFLAGS@ nss_LIBS = @nss_LIBS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ python = @python@ sbindir = @sbindir@ selinux_CFLAGS = @selinux_CFLAGS@ selinux_LIBS = @selinux_LIBS@ sharedstatedir = @sharedstatedir@ sqlite3_LIBS = @sqlite3_LIBS@ srcdir = @srcdir@ stap_LIBS = @stap_LIBS@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ staprun_LIBS = @staprun_LIBS@ subdirs = @subdirs@ support_section_question = @support_section_question@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap MAN_INSTALL_DIR = $(DESTDIR)$(mandir)/man3 HTML_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/tapsets ### # The build process is as follows (targets): # (xmldocs) [by docproc] # file.tmpl --> file.xml +--> file.ps (psdocs) [by xmlto] # +--> file.pdf (pdfdocs) [by xmlto] # +--> DIR=file (htmldocs) [by xmlto] # +--> man/ (mandocs) [by xmlto] @BUILD_PDFREFDOCS_TRUE@PDFDOCS = tapsets.pdf @XMLTO_STRINGPARAM_TRUE@XMLTOMANPARAMS = --stringparam man.authors.section.enabled=0 --stringparam man.copyright.section.enabled=0 @XMLTO_STRINGPARAM_TRUE@XMLTOHTMLPARAMS = --stringparam use.id.as.filename=1 -m $(abs_srcdir)/generate-toc.xml @XMLTO_STRINGPARAM_TRUE@XMLTOPDFPARAMS = --stringparam refentry.generate.name=0 --stringparam refentry.generate.title=1 @HAVE_FOP_FALSE@XMLTOPDF_FOP = @HAVE_FOP_TRUE@XMLTOPDF_FOP = --with-fop @BUILD_REFDOCS_TRUE@SRCTREE = $(abs_top_srcdir)/ @BUILD_REFDOCS_TRUE@DOCPROC = $(abs_builddir)/docproc @BUILD_REFDOCS_TRUE@noinst_SCRIPTS = manpager @BUILD_REFDOCS_TRUE@MANPAGER = $(abs_srcdir)/manpager CLEANFILES = tapsets.xml stamp-* $(PDFDOCS) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/SystemTap_Tapset_Reference/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/SystemTap_Tapset_Reference/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) docproc$(EXEEXT): $(docproc_OBJECTS) $(docproc_DEPENDENCIES) $(EXTRA_docproc_DEPENDENCIES) @rm -f docproc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(docproc_OBJECTS) $(docproc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/docproc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @BUILD_REFDOCS_FALSE@install-data-hook: clean: clean-am clean-am: clean-generic clean-local clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-data-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-local clean-noinstPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-hook install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am @BUILD_REFDOCS_TRUE@all: $(PDFDOCS) stamp-htmldocs stamp-mandocs @BUILD_REFDOCS_TRUE@tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp') @BUILD_REFDOCS_TRUE@ sed -e '/^!Syscalls/{r $(abs_srcdir)/syscalls.xmlpart' -e 'd}' $(abs_srcdir)/tapsets.tmpl > tapsets.tmpl.new @BUILD_REFDOCS_TRUE@ SRCTREE=$(SRCTREE) $(DOCPROC) doc tapsets.tmpl.new > tapsets.xml.new @BUILD_REFDOCS_TRUE@ xsltproc $(srcdir)/sort-tapsets.xslt tapsets.xml.new > tapsets.xml.new2 @BUILD_REFDOCS_TRUE@ rm tapsets.xml.new tapsets.tmpl.new @BUILD_REFDOCS_TRUE@ if test -s tapsets.xml && cmp tapsets.xml.new2 tapsets.xml >/dev/null ; then \ @BUILD_REFDOCS_TRUE@ echo tapsets.xml unchanged; \ @BUILD_REFDOCS_TRUE@ rm tapsets.xml.new2; \ @BUILD_REFDOCS_TRUE@ else \ @BUILD_REFDOCS_TRUE@ mv tapsets.xml.new2 tapsets.xml; \ @BUILD_REFDOCS_TRUE@ fi @BUILD_REFDOCS_TRUE@stamp-htmldocs: tapsets.xml @BUILD_REFDOCS_TRUE@ xmlto $(XMLTOHTMLPARAMS) html -o tapsets tapsets.xml @BUILD_REFDOCS_TRUE@ touch stamp-htmldocs # bump up the allocated space so "xmlto pdf" works @BUILD_REFDOCS_TRUE@tapsets.pdf: tapsets.xml @BUILD_REFDOCS_TRUE@ env pool_size=6000000 hash_extra=6000000 xmlto $(XMLTOPDF_FOP) $(XMLTOPDFPARAMS) pdf tapsets.xml @BUILD_REFDOCS_TRUE@stamp-mandocs: tapsets.xml @BUILD_REFDOCS_TRUE@ xmlto $(XMLTOMANPARAMS) man -o man3 tapsets.xml @BUILD_REFDOCS_TRUE@ SRCTREE=$(SRCTREE) $(MANPAGER) # generate tapset::* pages @BUILD_REFDOCS_TRUE@ cp $(abs_srcdir)/syscalls.3stap man_pages/tapset\:\:syscalls.3stap @BUILD_REFDOCS_TRUE@ touch stamp-mandocs #FIXME need to figure out where to install things appropriately #installmandocs: mandocs @BUILD_REFDOCS_TRUE@install-data-hook: @BUILD_PDFREFDOCS_TRUE@@BUILD_REFDOCS_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR) @BUILD_PDFREFDOCS_TRUE@@BUILD_REFDOCS_TRUE@ $(INSTALL_DATA) tapsets.pdf $(DOC_INSTALL_DIR) @BUILD_REFDOCS_TRUE@ $(MKDIR_P) $(MAN_INSTALL_DIR) @BUILD_REFDOCS_TRUE@ $(INSTALL_DATA) man3/* $(MAN_INSTALL_DIR) @BUILD_REFDOCS_TRUE@ $(INSTALL_DATA) man_pages/* $(MAN_INSTALL_DIR) # manpager output @BUILD_REFDOCS_TRUE@ $(MKDIR_P) $(HTML_INSTALL_DIR) @BUILD_REFDOCS_TRUE@ $(INSTALL_DATA) tapsets/* $(HTML_INSTALL_DIR) clean-local: rm -rf man3 man_pages tapsets # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: systemtap-2.9/doc/SystemTap_Tapset_Reference/docproc.c000066400000000000000000000262621260561570600232260ustar00rootroot00000000000000/* * docproc is a simple preprocessor for the template files * used as placeholders for the kernel internal documentation. * docproc is used for documentation-frontend and * dependency-generator. * The two usages have in common that they require * some knowledge of the .tmpl syntax, therefore they * are kept together. * * documentation-frontend * Scans the template file and call kernel-doc for * all occurrences of ![EIF]file * Beforehand each referenced file is scanned for * any symbols that are exported via these macros: * EXPORT_SYMBOL(), EXPORT_SYMBOL_GPL(), & * EXPORT_SYMBOL_GPL_FUTURE() * This is used to create proper -function and * -nofunction arguments in calls to kernel-doc. * Usage: docproc doc file.tmpl * * dependency-generator: * Scans the template file and list all files * referenced in a format recognized by make. * Usage: docproc depend file.tmpl * Writes dependency information to stdout * in the following format: * file.tmpl src.c src2.c * The filenames are obtained from the following constructs: * !Efilename * !Ifilename * !Dfilename * !Ffilename * !Pfilename * */ #include #include #include #include #include #include #include #include /* exitstatus is used to keep track of any failing calls to kernel-doc, * but execution continues. */ int exitstatus = 0; typedef void DFL(char *); DFL *defaultline; typedef void FILEONLY(char * file); FILEONLY *internalfunctions; FILEONLY *externalfunctions; FILEONLY *symbolsonly; typedef void FILELINE(char * file, char * line); FILELINE * singlefunctions; FILELINE * entity_system; FILELINE * docsection; #define MAXLINESZ 2048 #define MAXFILES 250 #define KERNELDOCPATH "scripts/" #define KERNELDOC "kernel-doc" #define DOCBOOK "-docbook" #define FUNCTION "-function" #define NOFUNCTION "-nofunction" #define NODOCSECTIONS "-no-doc-sections" char *srctree; void usage (void) { fprintf(stderr, "Usage: docproc {doc|depend} file\n"); fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); fprintf(stderr, "doc: frontend when generating kernel documentation\n"); fprintf(stderr, "depend: generate list of files referenced within file\n"); fprintf(stderr, "Environment variable SRCTREE: absolute path to kernel source tree.\n"); } /* * Execute kernel-doc with parameters given in svec */ void exec_kernel_doc(char **svec) { pid_t pid; int ret; char real_filename[PATH_MAX + 1]; /* Make sure output generated so far are flushed */ fflush(stdout); switch (pid=fork()) { case -1: perror("fork"); exit(1); case 0: memset(real_filename, 0, sizeof(real_filename)); strncat(real_filename, srctree, PATH_MAX); strncat(real_filename, KERNELDOCPATH KERNELDOC, PATH_MAX - strlen(real_filename)); execvp(real_filename, svec); fprintf(stderr, "exec "); perror(real_filename); exit(1); default: waitpid(pid, &ret ,0); } if (WIFEXITED(ret)) exitstatus |= WEXITSTATUS(ret); else exitstatus = 0xff; } /* Types used to create list of all exported symbols in a number of files */ struct symbols { char *name; }; struct symfile { char *filename; struct symbols *symbollist; int symbolcnt; }; struct symfile symfilelist[MAXFILES]; int symfilecnt = 0; void add_new_symbol(struct symfile *sym, char * symname) { sym->symbollist = realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); sym->symbollist[sym->symbolcnt++].name = strdup(symname); } /* Add a filename to the list */ struct symfile * add_new_file(char * filename) { symfilelist[symfilecnt++].filename = strdup(filename); return &symfilelist[symfilecnt - 1]; } /* Check if file already are present in the list */ struct symfile * filename_exist(char * filename) { int i; for (i=0; i < symfilecnt; i++) if (strcmp(symfilelist[i].filename, filename) == 0) return &symfilelist[i]; return NULL; } /* * List all files referenced within the template file. * Files are separated by tabs. */ void adddep(char * file) { printf("\t%s", file); } void adddep2(char * file, char * line) { line = line; adddep(file); } void noaction(char * line) { line = line; } void noaction2(char * file, char * line) { file = file; line = line; } /* Echo the line without further action */ void printline(char * line) { printf("%s", line); } /* * Find all symbols in filename that are exported with EXPORT_SYMBOL & * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly). * All symbols located are stored in symfilelist. */ void find_export_symbols(char * filename) { FILE * fp; struct symfile *sym; char line[MAXLINESZ]; if (filename_exist(filename) == NULL) { char real_filename[PATH_MAX + 1]; memset(real_filename, 0, sizeof(real_filename)); strncat(real_filename, srctree, PATH_MAX); strncat(real_filename, filename, PATH_MAX - strlen(real_filename)); sym = add_new_file(filename); fp = fopen(real_filename, "r"); if (fp == NULL) { fprintf(stderr, "docproc: "); perror(real_filename); exit(1); } while (fgets(line, MAXLINESZ, fp)) { char *p; char *e; if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) || ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) { /* Skip EXPORT_SYMBOL{_GPL} */ while (isalnum(*p) || *p == '_') p++; /* Remove parentheses & additional whitespace */ while (isspace(*p)) p++; if (*p != '(') continue; /* Syntax error? */ else p++; while (isspace(*p)) p++; e = p; while (isalnum(*e) || *e == '_') e++; *e = '\0'; add_new_symbol(sym, p); } } fclose(fp); } } /* * Document all external or internal functions in a file. * Call kernel-doc with following parameters: * kernel-doc -docbook -nofunction function_name1 filename * Function names are obtained from all the src files * by find_export_symbols. * intfunc uses -nofunction * extfunc uses -function */ void docfunctions(char * filename, char * type) { int i,j; int symcnt = 0; int idx = 0; char **vec; for (i=0; i <= symfilecnt; i++) symcnt += symfilelist[i].symbolcnt; vec = malloc((2 + 2 * symcnt + 3) * sizeof(char *)); if (vec == NULL) { perror("docproc: "); exit(1); } vec[idx++] = KERNELDOC; vec[idx++] = DOCBOOK; vec[idx++] = NODOCSECTIONS; for (i=0; i < symfilecnt; i++) { struct symfile * sym = &symfilelist[i]; for (j=0; j < sym->symbolcnt; j++) { vec[idx++] = type; vec[idx++] = sym->symbollist[j].name; } } vec[idx++] = filename; vec[idx] = NULL; printf("\n", filename); exec_kernel_doc(vec); fflush(stdout); free(vec); } void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); } void extfunc(char * filename) { docfunctions(filename, FUNCTION); } /* * Document specific function(s) in a file. * Call kernel-doc with the following parameters: * kernel-doc -docbook -function function1 [-function function2] */ void singfunc(char * filename, char * line) { char *vec[200]; /* Enough for specific functions */ int i, idx = 0; int startofsym = 1; vec[idx++] = KERNELDOC; vec[idx++] = DOCBOOK; /* Split line up in individual parameters preceded by FUNCTION */ for (i=0; line[i]; i++) { if (isspace(line[i])) { line[i] = '\0'; startofsym = 1; continue; } if (startofsym) { startofsym = 0; vec[idx++] = FUNCTION; vec[idx++] = &line[i]; } } vec[idx++] = filename; vec[idx] = NULL; exec_kernel_doc(vec); } /* * Insert specific documentation section from a file. * Call kernel-doc with the following parameters: * kernel-doc -docbook -function "doc section" filename */ void docsect(char *filename, char *line) { char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */ char *s; for (s = line; *s; s++) if (*s == '\n') *s = '\0'; vec[0] = KERNELDOC; vec[1] = DOCBOOK; vec[2] = FUNCTION; vec[3] = line; vec[4] = filename; vec[5] = NULL; exec_kernel_doc(vec); } /* * Parse file, calling action specific functions for: * 1) Lines containing !E * 2) Lines containing !I * 3) Lines containing !D * 4) Lines containing !F * 5) Lines containing !P * 6) Default lines - lines not matching the above */ void parse_file(FILE *infile) { char line[MAXLINESZ]; char * s; while (fgets(line, MAXLINESZ, infile)) { if (line[0] == '!') { s = line + 2; switch (line[1]) { case 'E': while (*s && !isspace(*s)) s++; *s = '\0'; externalfunctions(line+2); break; case 'I': while (*s && !isspace(*s)) s++; *s = '\0'; internalfunctions(line+2); break; case 'D': while (*s && !isspace(*s)) s++; *s = '\0'; symbolsonly(line+2); break; case 'F': /* filename */ while (*s && !isspace(*s)) s++; *s++ = '\0'; /* function names */ while (isspace(*s)) s++; singlefunctions(line +2, s); break; case 'P': /* filename */ while (*s && !isspace(*s)) s++; *s++ = '\0'; /* DOC: section name */ while (isspace(*s)) s++; docsection(line + 2, s); break; default: defaultline(line); } } else { defaultline(line); } } fflush(stdout); } int main(int argc, char *argv[]) { FILE * infile; srctree = getenv("SRCTREE"); if (!srctree) srctree = getcwd(NULL, 0); if (argc != 3) { usage(); exit(1); } /* Open file, exit on error */ infile = fopen(argv[2], "r"); if (infile == NULL) { fprintf(stderr, "docproc: "); perror(argv[2]); exit(2); } if (strcmp("doc", argv[1]) == 0) { /* Need to do this in two passes. * First pass is used to collect all symbols exported * in the various files; * Second pass generate the documentation. * This is required because some functions are declared * and exported in different files :-(( */ /* Collect symbols */ defaultline = noaction; internalfunctions = find_export_symbols; externalfunctions = find_export_symbols; symbolsonly = find_export_symbols; singlefunctions = noaction2; docsection = noaction2; parse_file(infile); /* Rewind to start from beginning of file again */ fseek(infile, 0, SEEK_SET); defaultline = printline; internalfunctions = intfunc; externalfunctions = extfunc; symbolsonly = printline; singlefunctions = singfunc; docsection = docsect; parse_file(infile); } else if (strcmp("depend", argv[1]) == 0) { /* Create first part of dependency chain * file.tmpl */ printf("%s\t", argv[2]); defaultline = noaction; internalfunctions = adddep; externalfunctions = adddep; symbolsonly = adddep; singlefunctions = adddep2; docsection = adddep2; parse_file(infile); printf("\n"); } else { fprintf(stderr, "Unknown option: %s\n", argv[1]); exit(1); } fclose(infile); fflush(stdout); return exitstatus; } systemtap-2.9/doc/SystemTap_Tapset_Reference/dummy-tapsets.xml000066400000000000000000000025731260561570600247660ustar00rootroot00000000000000 SystemTap Tapset Reference Manual 2008-2013 Red Hat, Inc. and others SystemTap Hackers Introduction SystemTap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system. This assists diagnosis of a performance or functional problem. SystemTap eliminates the need for the developer to go through the tedious and disruptive instrument, recompile, install, and reboot sequence that may be otherwise required to collect data. SystemTap provides a simple command line interface and scripting language for writing instrumentation for a live running kernel. The instrumentation makes extensive use of the probe points and functions provided in the tapset library. This document describes the various probe points and functions. systemtap-2.9/doc/SystemTap_Tapset_Reference/generate-toc.xml000066400000000000000000000010111260561570600245110ustar00rootroot00000000000000 appendix toc,title article/appendix nop article nop,title book toc,title,figure,table,example,equation chapter nop,title part nop,title preface toc,title qandadiv toc qandaset toc reference nop,title sect1 toc sect2 toc sect3 toc sect4 toc sect5 toc section toc set toc,title systemtap-2.9/doc/SystemTap_Tapset_Reference/manpager000077500000000000000000000116741260561570600231520ustar00rootroot00000000000000#!/bin/bash # This script builds overview man pages for each tapset from the doc # comments in the tapset source. As such, the man page content # generated herein should be in sync with the SystemTap Tapset # Reference. # If testing manually, just run this script with # doc/SystemTap_Tapset_Reference as the working directory # and the SRCTREE variable set to the location of your # systemtap source tree. echo "Starting manpager in" `pwd` # cleanup rm -rf man_pages # create working directory mkdir workingdir ; # create list of man pages to generate cat $SRCTREE/doc/SystemTap_Tapset_Reference/tapsets.tmpl | grep ^\!Itapset > manpageus ; sed -i -e 's/\!Itapset\///g' manpageus ; # copy list of man pages into working directory # with similar basenames concatenated for i in `cat manpageus` ; do b=`basename $i | sed -e 's/.stpm$/.stp/'` cat $SRCTREE/tapset/$i >>workingdir/$b ; done ; # rewrite manpageus to the resulting files ls workingdir >manpageus # enter workdir cd workingdir ; # copy tapsetdescriptions, then clean for i in `cat ../manpageus`; do sed -n '/\/\/ /,/\/\/ <\/tapsetdescription>/ s/.*/&/w temp' < $i ; mv temp $i.tapsetdescription ; sed -i -e 's/\/\/ //g' $i.tapsetdescription ; sed -i -e 's/\/\/ <\/tapsetdescription>//g' $i.tapsetdescription ; sed -i -e 's/\/\///g' $i.tapsetdescription ; # XXX: may want to trim whitespace from description edges done # strip all tapset files to just comments; but all comments must be exactly 1 space before and after "*" for i in `cat ../manpageus` ; do sed -i -e 's/^ \*/ \*/g' $i; sed -i -e 's/^ \* / \* /g' $i; # mark the start of each probe entry (sub "/**") perl -p -i -e 's|^/\*\*| *probestart|g' $i; sed -i -e '/^ \*/!d' $i; # rename all tapsets (remove .stp/.stpm filename suffix), create templates echo $i > tempname ; sed -i -e 's/.stpm*$//g' tempname ; mv $i `cat tempname` ; mv tempname $i ; done ; # create man page headers for i in `ls | grep -v .stp | grep -v tapsetdescription` ; do echo ".\\\" -*- nroff -*-" >> $i.template ; echo ".TH tapset::"$i" 3stap --- IBM" >> $i.template ; echo ".SH NAME" >> $i.template ; echo "tapset::"`cat $i.stp`" \- systemtap "`cat $i.stp`" tapset" >> $i.template ; echo " " >> $i.template ; echo ".SH DESCRIPTION" >> $i.template ; cat $i.stp.tapsetdescription >> $i.template ; echo ".TP" >> $i.template ; done # clean man page body sed -i -e 's/\.stp$//g' ../manpageus ; for i in `cat ../manpageus` ; do mv $i $i.tmp ; perl -e 'while(<>){print"$1\n"if/ \* probe ([^\n]*) -/;}' $i.tmp >$i.probenames; perl -e 'while(<>){print"$1\n"if/ \* sfunction ([^\n]*) -/;}' $i.tmp >$i.funcnames; perl -e 'while(<>){print"$1\n"if/ \* smacro ([^\n]*) -/;}' $i.tmp >$i.macros; # perl -p -i -e 's/ \* (probe|sfunction) ([^\n]*)\n/.P\n.TP\n.B $1 \n $2\n$3\n perl -p -i -e 's/ \* sfunction ([^\n]*) - ([^\n]*)\n/.P\n.TP\n.B $1 \n$2\n.IP\nSee \n.IR function::$1 \(3stap\)\n for details.\n/g' $i.tmp ; perl -p -i -e 's/ \* probe ([^\n]*) - ([^\n]*)\n/.P\n.TP\n.B $1 \n$2\n.IP\n See \n.IR probe::$1 \(3stap\)\n for details.\n/g' $i.tmp ; perl -p -i -e 's/ \* smacro ([^\n]*) - ([^\n]*)\n/.P\n.TP\n.B \@$1 \n$2\n.IP\n See \n.IR macro::$1 \(3stap\)\n for details.\n/g' $i.tmp ; # XXX: the people hunger for argument descriptions, which would be extracted here perl -p -i -e 's/ \*([^\n]*)\n//g' $i.tmp ; # nuke the rest of it done # generate footer template for i in `cat ../manpageus` ; do echo "" >> $i.footer echo ".SH SEE ALSO" >> $i.footer for j in `cat $i.funcnames` ; do echo ".BR" >> $i.footer echo ".IR \\%function::"$j" (3stap)," >> $i.footer done for j in `cat $i.probenames` ; do echo ".BR" >> $i.footer echo ".IR \\%probe::"$j" (3stap)," >> $i.footer done for j in `cat $i.macros` ; do echo ".BR" >> $i.footer echo ".IR \\%macro::"$j" (3stap)," >> $i.footer done echo ".BR" >> $i.footer echo ".IR \\%stap (1)," >> $i.footer echo ".IR \\%stapprobes (3stap)" >> $i.footer done # add cross reference to enclosed functions and probes for i in `cat ../manpageus` ; do for j in `cat $i.funcnames` ; do echo ".SH SEE ALSO\n " >> ../man3/function::$j.3stap echo ".IR tapset::$i (3stap)" >> ../man3/function::$j.3stap done for j in `cat $i.probenames` ; do echo ".SH SEE ALSO\n " >> ../man3/probe::$j.3stap echo ".IR tapset::$i (3stap)" >> ../man3/probe::$j.3stap done for j in `cat $i.macros` ; do echo ".SH SEE ALSO\n " >> ../man3/macro::$j.3stap echo ".IR tapset::$i (3stap)" >> ../man3/macro::$j.3stap done done # assemble parts for i in `cat ../manpageus`; do cat $i.template >> tapset\:\:$i.3stap ; cat $i.tmp >> tapset\:\:$i.3stap ; cat $i.footer >> tapset\:\:$i.3stap ; # final polish sed -i -e 's/\*\/$//g' tapset\:\:$i.3stap ; done # cleanup for i in `ls | grep -v -e "tapset::.*\\.3stap"` ; do rm $i ; done rm ../manpageus ; cd .. mv workingdir man_pages echo " " echo "Finished! man pages generated in ./man_pages." echo " " systemtap-2.9/doc/SystemTap_Tapset_Reference/sort-tapsets.xslt000066400000000000000000000012611260561570600250050ustar00rootroot00000000000000 systemtap-2.9/doc/SystemTap_Tapset_Reference/syscalls.3stap000066400000000000000000000516661260561570600242500ustar00rootroot00000000000000." -*- nroff -*- .TH tapset::task 3stap --- IBM .SH NAME tapset::syscalls \- systemtap syscall tapset .SH DESCRIPTION Following is an overview of available syscall probes and convenience variables they offer. By default, each syscall probe has name and argstr convenience variables, which are not included in the overview in order to keep it short. Non dwarf-based nd_syscall probes are supposed to have the same convenience variables. .TP .P .TP .P .TP .B syscall.accept addr_uaddr, addrlen_uaddr, sockfd .P .TP .B syscall.accept4 addr_uaddr, addrlen_uaddr, flags, flags_str, sockfd .P .TP .B syscall.access mode, mode_str, pathname .P .TP .B syscall.acct filename .P .TP .B syscall.add_key description_uaddr, payload_uaddr, plen, ringid, type_uaddr .P .TP .B syscall.adjtimex buf_str, buf_uaddr .P .TP .B syscall.alarm seconds .P .TP .B syscall.arch_prctl addr, code, code_str .P .TP .B syscall.bdflush data, data_str, func .P .TP .B syscall.bind addrlen, my_addr_uaddr, sockfd, uaddr_af, uaddr_ip, uaddr_ip_port, uaddr_ipv6_flowinfo, uaddr_ipv6_scope_id .P .TP .B syscall.bpf attr_uaddr, cmd, cmd_str, size .P .TP .B syscall.brk brk .P .TP .B syscall.capget data_uaddr, header_uaddr .P .TP .B syscall.capset data_uaddr, header_uaddr .P .TP .B syscall.chdir path .P .TP .B syscall.chmod mode, path .P .TP .B syscall.chown group, owner, path .P .TP .B syscall.chown16 group, owner, path .P .TP .B syscall.chroot path .P .TP .B syscall.clock_adjtime clk_id, clk_id_str, tx_uaddr .P .TP .B syscall.clock_getres clk_id, clk_id_str, res_uaddr .P .TP .B syscall.clock_gettime clk_id, clk_id_str, tp_uaddr .P .TP .B syscall.clock_nanosleep clk_id, clk_id_str, flags, flags_str, rem_uaddr, req_uaddr .P .TP .B syscall.clock_settime clk_id, clk_id_str, tp_uaddr .P .TP .B syscall.clone child_tid_uaddr, clone_flags, parent_tid_uaddr, stack_start .P .TP .B syscall.close fd .P .TP .B syscall.compat_adjtimex buf_str, buf_uaddr .P .TP .B syscall.compat_clock_nanosleep clk_id, clk_id_str, flags, flags_str, rem_uaddr, req_uaddr .P .TP .B syscall.compat_execve args, env_str, filename .P .TP .B syscall.compat_execveat args, dirfd, dirfd_str, env_str, filename, flags, flags_str .P .TP .B syscall.compat_fadvise64 advice, fd, len, offset .P .TP .B syscall.compat_fadvise64_64 advice, fd, len, offset .P .TP .B syscall.compat_fallocate fd, len, mode, offset .P .TP .B syscall.compat_ftruncate64 fd, length .P .TP .B syscall.compat_futex futex_uaddr, op, uaddr2_uaddr, utime_uaddr, val3, val .P .TP .B syscall.compat_futimesat dirfd, dirfd_str, filename, filename_uaddr, tvp_uaddr .P .TP .B syscall.compat_getitimer value_uaddr, which .P .TP .B syscall.compat_lookup_dcookie buffer_uaddr, cookie, len .P .TP .B syscall.compat_nanosleep rem_uaddr, req_uaddr .P .TP .B syscall.compat_ppoll .P .TP .B syscall.compat_pselect6 .P .TP .B syscall.compat_readahead count, fd, offset .P .TP .B syscall.compat_recvmmsg flags, flags_str, mmsg_uaddr, s, timeout_uaddr, vlen .P .TP .B syscall.compat_rt_sigprocmask how, how_str, oldset_uaddr, set_uaddr .P .TP .B syscall.compat_select exceptfds_uaddr, n, readfds_uaddr, timeout_uaddr, writefds_uaddr .P .TP .B syscall.compat_setitimer ovalue_uaddr, value_uaddr, which .P .TP .B syscall.compat_signalfd flags .P .TP .B syscall.compat_sys_msgctl buf_uaddr, cmd, cmd_str, msqid .P .TP .B syscall.compat_sys_msgrcv msgflg, msgflg_str, msgp_uaddr, msgsz, msgtyp, msqid .P .TP .B syscall.compat_sys_msgsnd msgflg, msgflg_str, msgp_uaddr, msgsz, msqid .P .TP .B syscall.compat_sys_recvmsg flags, flags_str, msg_uaddr, s .P .TP .B syscall.compat_sys_semctl arg, cmd, cmdstr, semid, semnum .P .TP .B syscall.compat_sys_semtimedop nsops, semid, sops_uaddr, timeout_uaddr .P .TP .B syscall.compat_sys_sendmsg flags, flags_str, msg_uaddr, s .P .TP .B syscall.compat_sys_shmat shmaddr_uaddr, shmflg, shmid .P .TP .B syscall.compat_sys_shmctl buf_uaddr, cmd, cmd_str, shmid .P .TP .B syscall.compat_sys_utimes filename .P .TP .B syscall.compat_truncate64 length, path, path_uaddr .P .TP .B syscall.compat_utime actime, buf_uaddr, filename, filename_uaddr, modtime .P .TP .B syscall.compat_utimensat dfd, dfd_str, filename, filename_uaddr, flags, flags_str, tsp_uaddr .P .TP .B syscall.compat_vmsplice fd, flags, flags_str, iov, nr_segs .P .TP .B syscall.connect addrlen, serv_addr_uaddr, sockfd, uaddr_af, uaddr_ip, uaddr_ip_port, uaddr_ipv6_flowinfo, uaddr_ipv6_scope_id .P .TP .B syscall.creat mode, pathname .P .TP .B syscall.delete_module flags, flags_str, name_user .P .TP .B syscall.dup oldfd .P .TP .B syscall.dup2 flags, newfd, oldfd .P .TP .B syscall.dup3 flags, newfd, oldfd .P .TP .B syscall.epoll_create flags, size .P .TP .B syscall.epoll_ctl epfd, event_uaddr, fd, op, op_str .P .TP .B syscall.epoll_pwait epfd, events_uaddr, maxevents, sigmask_uaddr, sigsetsize, timeout .P .TP .B syscall.epoll_wait epfd, events_uaddr, maxevents, timeout .P .TP .B syscall.eventfd count, flags, flags_str .P .TP .B syscall.execve args, env_str, filename .P .TP .B syscall.execveat args, dirfd, dirfd_str, env_str, filename, flags, flags_str .P .TP .B syscall.exit status .P .TP .B syscall.exit_group status .P .TP .B syscall.faccessat dirfd, dirfd_str, mode, mode_str, pathname .P .TP .B syscall.fadvise64 advice, fd, len, offset .P .TP .B syscall.fadvise64_64 advice, fd, len, offset .P .TP .B syscall.fallocate fd, len, mode, mode_str, offset .P .TP .B syscall.fanotify_init event_f_flags, event_f_flags_str, flags, flags_str .P .TP .B syscall.fanotify_mark dirfd, dirfd_str, fanotify_fd, flags, flags_str, mask, mask_str, pathname .P .TP .B syscall.fchdir fd .P .TP .B syscall.fchmod fildes, mode .P .TP .B syscall.fchmodat dirfd, dirfd_str, mode, pathname .P .TP .B syscall.fchown fd, group, owner .P .TP .B syscall.fchown16 fd, group, owner .P .TP .B syscall.fchownat dirfd, dirfd_str, flags, flags_str, group, owner, pathname .P .TP .B syscall.fcntl arg, cmd, cmd_str, fd .P .TP .B syscall.fdatasync fd .P .TP .B syscall.fgetxattr filedes, name_str, size, value_uaddr .P .TP .B syscall.finit_module fd, flags, flags_str, uargs .P .TP .B syscall.flistxattr filedes, list_uaddr, size .P .TP .B syscall.flock fd, operation .P .TP .B syscall.fork .P .TP .B syscall.fremovexattr filedes, name_str, name_uaddr .P .TP .B syscall.fsetxattr filedes, flags, flags_str, name_str, name_uaddr, size, value_str, value_uaddr .P .TP .B syscall.fstat buf_uaddr, filedes .P .TP .B syscall.fstatat buf_uaddr, dirfd, dirfd_str, flags, flags_str, path .P .TP .B syscall.fstatfs buf_uaddr, fd .P .TP .B syscall.fstatfs64 buf_uaddr, fd, sz .P .TP .B syscall.fsync fd .P .TP .B syscall.ftruncate fd, length .P .TP .B syscall.futex futex_uaddr, op, uaddr2_uaddr, utime_uaddr, val3, val .P .TP .B syscall.futimesat dirfd, dirfd_str, filename, filename_uaddr, tvp_uaddr .P .TP .B syscall.get_mempolicy addr, flags, flags_str, maxnode, nmask_uaddr, policy_uaddr .P .TP .B syscall.get_robust_list len_uaddr, list_head_uaddr, pid .P .TP .B syscall.get_thread_area u_info_uaddr .P .TP .B syscall.getcpu cpu_uaddr, node_uaddr, tcache_uaddr .P .TP .B syscall.getcwd buf_uaddr, size .P .TP .B syscall.getdents count, dirp_uaddr, fd .P .TP .B syscall.getegid .P .TP .B syscall.geteuid .P .TP .B syscall.getgid .P .TP .B syscall.getgroups list_uaddr, size .P .TP .B syscall.gethostname len, name_uaddr .P .TP .B syscall.getitimer value_uaddr, which .P .TP .B syscall.getpeername name_uaddr, namelen_uaddr, s .P .TP .B syscall.getpgid pid .P .TP .B syscall.getpgrp .P .TP .B syscall.getpid .P .TP .B syscall.getppid .P .TP .B syscall.getpriority which, who .P .TP .B syscall.getrandom buf, count, flags, flags_str .P .TP .B syscall.getresgid egid_uaddr, rgid_uaddr, sgid_uaddr .P .TP .B syscall.getresuid euid_uaddr, ruid_uaddr, suid_uaddr .P .TP .B syscall.getrlimit resource, rlim_uaddr .P .TP .B syscall.getrusage usage_uaddr, who, who_str .P .TP .B syscall.getsid pid .P .TP .B syscall.getsockname name_uaddr, namelen_uaddr, s .P .TP .B syscall.getsockopt fd, level, level_str, optlen_uaddr, optname, optname_str, optval_uaddr .P .TP .B syscall.gettid .P .TP .B syscall.gettimeofday tv_uaddr, tz_uaddr .P .TP .B syscall.getuid .P .TP .B syscall.getxattr name_str, path, size, value_uaddr .P .TP .B syscall.init_module len, uargs, umod_uaddr .P .TP .B syscall.inotify_add_watch fd, mask, path, path_uaddr .P .TP .B syscall.inotify_init flags .P .TP .B syscall.inotify_rm_watch fd, wd .P .TP .B syscall.io_cancel ctx_id, iocb_uaddr, result_uaddr .P .TP .B syscall.io_destroy ctx .P .TP .B syscall.io_getevents ctx_id, events_uaddr, min_nr, nr, timeout_uaddr, timestr .P .TP .B syscall.io_setup ctxp_uaddr, maxevents .P .TP .B syscall.io_submit ctx_id, iocbpp_uaddr, nr .P .TP .B syscall.ioctl argp, fd, request .P .TP .B syscall.ioperm from, num, turn_on .P .TP .B syscall.iopl level .P .TP .B syscall.ioprio_get which, which_str, who .P .TP .B syscall.ioprio_set ioprio, ioprio_str, which, which_str, who .P .TP .B syscall.kcmp idx1, idx2, pid1, pid2, type, type_str .P .TP .B syscall.kexec_file_load cmdline, cmdline_len, flags, flags_str, initrd_fd, kernel_fd .P .TP .B syscall.kexec_load entry, flags, flags_str, nr_segments, segments_uaddr .P .TP .B syscall.keyctl arg2, arg3, arg4, arg5, option .P .TP .B syscall.kill pid, sig .P .TP .B syscall.lchown group, owner, path .P .TP .B syscall.lchown16 group, owner, path .P .TP .B syscall.lgetxattr name_str, path, size, value_uaddr .P .TP .B syscall.link newpath, oldpath .P .TP .B syscall.linkat flags, flags_str, newdirfd, newdirfd_str, newpath, olddirfd, olddirfd_str, oldpath .P .TP .B syscall.listen backlog, sockfd .P .TP .B syscall.listxattr list_uaddr, path, path_uaddr, size .P .TP .B syscall.llistxattr list_uaddr, path, path_uaddr, size .P .TP .B syscall.llseek fd, offset_high, offset_low, result_uaddr, whence, whence_str .P .TP .B syscall.lookup_dcookie buffer_uaddr, cookie, len .P .TP .B syscall.lremovexattr name_str, name_uaddr, path, path_uaddr .P .TP .B syscall.lseek fildes, offset, whence, whence_str .P .TP .B syscall.lsetxattr flags, flags_str, name_str, name_uaddr, path, path_uaddr, size, value_str, value_uaddr .P .TP .B syscall.lstat buf_uaddr, path .P .TP .B syscall.madvise advice, advice_str, length, start .P .TP .B syscall.mbind flags, flags_str, len, maxnode, mode, mode_str, nmask_uaddr, start .P .TP .B syscall.memfd_create flags, flags_str, uname .P .TP .B syscall.migrate_pages maxnode, new_nodes, old_nodes, pid .P .TP .B syscall.mincore length, start, vec_uaddr .P .TP .B syscall.mkdir mode, pathname, pathname_uaddr .P .TP .B syscall.mkdirat dirfd, dirfd_str, mode, pathname .P .TP .B syscall.mknod dev, mode, pathname .P .TP .B syscall.mknodat dev, dirfd, dirfd_str, mode, mode_str, pathname .P .TP .B syscall.mlock addr, len .P .TP .B syscall.mlockall flags .P .TP .B syscall.mmap2 fd, flags, length, pgoffset, prot, start .P .TP .B syscall.modify_ldt bytecount, func, ptr_uaddr .P .TP .B syscall.mount data, filesystemtype, mountflags, mountflags_str, source, target .P .TP .B syscall.move_pages flags, flags_str, nodes, nr_pages, pages, pid, status .P .TP .B syscall.mprotect addr, len, prot, prot_str .P .TP .B syscall.mq_getsetattr mqdes, u_mqstat_uaddr, u_omqstat_uaddr .P .TP .B syscall.mq_notify mqdes, notification_uaddr .P .TP .B syscall.mq_open filename, mode, name_uaddr, oflag, u_attr_uaddr .P .TP .B syscall.mq_timedreceive abs_timeout_uaddr, mqdes, msg_len, msg_prio_uaddr, msg_ptr_uaddr .P .TP .B syscall.mq_timedsend abs_timeout_uaddr, mqdes, msg_len, msg_prio, msg_ptr_uaddr .P .TP .B syscall.mq_unlink u_name, u_name_uaddr .P .TP .B syscall.mremap flags, new_address, new_size, old_address, old_size .P .TP .B syscall.msgctl buf_uaddr, cmd, cmd_str, msqid .P .TP .B syscall.msgget key, key_str, msgflg, msgflg_str .P .TP .B syscall.msgrcv msgflg, msgflg_str, msgp_uaddr, msgsz, msgtyp, msqid .P .TP .B syscall.msgsnd msgflg, msgflg_str, msgp_uaddr, msgsz, msqid .P .TP .B syscall.msync flags, length, start .P .TP .B syscall.munlock addr, len .P .TP .B syscall.munlockall .P .TP .B syscall.munmap length, start .P .TP .B syscall.name_to_handle_at dfd, dfd_str, flags, flags_str, handle_uaddr, mnt_id_uaddr, pathname .P .TP .B syscall.nanosleep rem_uaddr, req_uaddr .P .TP .B syscall.ni_syscall .P .TP .B syscall.nice inc .P .TP .B syscall.open filename, flags, mode .P .TP .B syscall.open_by_handle_at flags, flags_str, handle_uaddr, mount_dfd, mount_dfd_str .P .TP .B syscall.openat dfd, dfd_str, filename, flags, mode .P .TP .B syscall.pause .P .TP .B syscall.perf_event_open attr_uaddr, cpu, flags, flags_str, group_fd, pid .P .TP .B syscall.personality persona .P .TP .B syscall.pipe fildes_uaddr, flag_str, flags, pipe0, pipe1 .P .TP .B syscall.pivot_root new_root_str, old_root_str .P .TP .B syscall.poll nfds, timeout, ufds_uaddr .P .TP .B syscall.ppoll .P .TP .B syscall.prctl arg2, arg3, arg4, arg5, option .P .TP .B syscall.pread buf_uaddr, count, fd, offset .P .TP .B syscall.preadv count, fd, offset, vector_uaddr .P .TP .B syscall.prlimit64 new_rlim_uaddr, old_rlim_uaddr, pid, resource .P .TP .B syscall.process_vm_readv flags, liovcnt, local_iov_uaddr, pid, remote_iov_uaddr, riovcnt .P .TP .B syscall.process_vm_writev flags, liovcnt, local_iov_uaddr, pid, remote_iov_uaddr, riovcnt .P .TP .B syscall.pselect6 .P .TP .B syscall.ptrace addr, data, pid, request .P .TP .B syscall.pwrite buf_uaddr, count, fd, offset .P .TP .B syscall.pwritev count, fd, offset, vector_uaddr .P .TP .B syscall.quotactl addr_uaddr, cmd, cmd_str, id, special, special_str .P .TP .B syscall.read buf_uaddr, count, fd .P .TP .B syscall.readahead count, fd, offset .P .TP .B syscall.readdir count, dirent, fd .P .TP .B syscall.readlink buf_uaddr, bufsiz, path .P .TP .B syscall.readlinkat buf_uaddr, bufsiz, dfd, dfd_str, path .P .TP .B syscall.readv count, fd, vector_uaddr .P .TP .B syscall.reboot arg_uaddr, flag, flag_str, magic2, magic2_str, magic, magic_str .P .TP .B syscall.recv buf_uaddr, flags, flags_str, len, s .P .TP .B syscall.recvfrom addr_uaddr, addrlen_uaddr, buf_uaddr, flags, flags_str, len, s .P .TP .B syscall.recvmmsg flags, flags_str, mmsg_uaddr, s, timeout_uaddr, vlen .P .TP .B syscall.recvmsg flags, flags_str, msg_uaddr, s .P .TP .B syscall.remap_file_pages flags, pgoff, prot, size, start .P .TP .B syscall.removexattr name_str, path .P .TP .B syscall.rename newpath, oldpath .P .TP .B syscall.renameat newdfd, newdfd_str, newname, newname_str, olddfd, olddfd_str, oldname, oldname_str .P .TP .B syscall.renameat2 flags, flags_str, newdfd, newdfd_str, newname, newname_str, olddfd, olddfd_str, oldname, oldname_str .P .TP .B syscall.request_key callout_info_uaddr, description_uaddr, destringid, type_uaddr .P .TP .B syscall.restart_syscall .P .TP .B syscall.rmdir pathname .P .TP .B syscall.rt_sigaction act_uaddr, oact_uaddr, sig, sigsetsize .P .TP .B syscall.rt_sigaction32 act_uaddr, oact_uaddr, sig, sigsetsize .P .TP .B syscall.rt_sigpending set_uaddr, sigsetsize .P .TP .B syscall.rt_sigprocmask how, how_str, oldset_uaddr, set_uaddr .P .TP .B syscall.rt_sigqueueinfo pid, sig, uinfo_uaddr .P .TP .B syscall.rt_sigreturn .P .TP .B syscall.rt_sigsuspend set_uaddr, sigsetsize .P .TP .B syscall.rt_sigtimedwait sigsetsize, uinfo_uaddr, uthese_uaddr, uts_uaddr .P .TP .B syscall.rt_tgsigqueueinfo sig, tgid, tid, uinfo_uaddr .P .TP .B syscall.sched_get_priority_max policy .P .TP .B syscall.sched_get_priority_min policy .P .TP .B syscall.sched_getaffinity len, mask_uaddr, pid .P .TP .B syscall.sched_getattr flags, pid, sched_attr_str, sched_attr_uaddr, size .P .TP .B syscall.sched_getparam p_uaddr, pid .P .TP .B syscall.sched_getscheduler pid .P .TP .B syscall.sched_rr_get_interval pid, tp_uaddr .P .TP .B syscall.sched_setaffinity len, mask_uaddr, pid .P .TP .B syscall.sched_setattr flags, pid, sched_attr_str, sched_attr_uaddr .P .TP .B syscall.sched_setparam p_uaddr, pid .P .TP .B syscall.sched_setscheduler p_uaddr, pid, policy, policy_str .P .TP .B syscall.sched_yield .P .TP .B syscall.seccomp flags, flags_str, op, op_str, uargs, uargs_uaddr .P .TP .B syscall.select exceptfds_uaddr, n, readfds_uaddr, timeout_uaddr, writefds_uaddr .P .TP .B syscall.semctl arg, cmd, cmdstr, semid, semnum .P .TP .B syscall.semget key, key_str, nsems, semflg, semflg_str .P .TP .B syscall.semop nsops, semid, sops_uaddr .P .TP .B syscall.semtimedop nsops, semid, sops_uaddr, timeout_uaddr .P .TP .B syscall.send buf_uaddr, flags, flags_str, len, s .P .TP .B syscall.sendfile count, in_fd, offset_uaddr, out_fd .P .TP .B syscall.sendmmsg flags, flags_str, mmsg_uaddr, s, vlen .P .TP .B syscall.sendmsg flags, flags_str, msg_uaddr, s .P .TP .B syscall.sendto buf_uaddr, flags, flags_str, len, s, to_uaddr, tolen .P .TP .B syscall.set_mempolicy maxnode, mode, mode_str, nmask_uaddr .P .TP .B syscall.set_robust_list len, list_head_uaddr .P .TP .B syscall.set_thread_area u_info_uaddr .P .TP .B syscall.set_tid_address tidptr_uaddr .P .TP .B syscall.setdomainname domainname_str, domainname_uaddr, len .P .TP .B syscall.setfsgid fsgid .P .TP .B syscall.setfsuid fsuid .P .TP .B syscall.setgid gid .P .TP .B syscall.setgroups list_uaddr, size .P .TP .B syscall.sethostname hostname_uaddr, len, name_str .P .TP .B syscall.setitimer ovalue_uaddr, value_uaddr, which .P .TP .B syscall.setns fd, nstype .P .TP .B syscall.setpgid pgid, pid .P .TP .B syscall.setpriority prio, which, which_str, who .P .TP .B syscall.setregid egid, rgid .P .TP .B syscall.setregid16 egid, rgid .P .TP .B syscall.setresgid egid, rgid, sgid .P .TP .B syscall.setresgid16 egid, rgid, sgid .P .TP .B syscall.setresuid euid, ruid, suid .P .TP .B syscall.setresuid16 euid, ruid, suid .P .TP .B syscall.setreuid euid, ruid .P .TP .B syscall.setreuid16 euid, ruid .P .TP .B syscall.setrlimit resource, rlim_uaddr .P .TP .B syscall.setsid .P .TP .B syscall.setsockopt fd, level, level_str, optlen, optname, optname_str, optval_uaddr .P .TP .B syscall.settimeofday tv_uaddr, tz_uaddr .P .TP .B syscall.settimeofday32 tv_uaddr, tz_uaddr .P .TP .B syscall.setuid uid .P .TP .B syscall.setxattr flags, flags_str, name_str, name_uaddr, path, path_uaddr, size, value_str, value_uaddr .P .TP .B syscall.sgetmask .P .TP .B syscall.shmat shmaddr_uaddr, shmflg, shmid .P .TP .B syscall.shmctl buf_uaddr, cmd, cmd_str, shmid .P .TP .B syscall.shmdt shmaddr_uaddr .P .TP .B syscall.shmget key, shmflg, shmflg_str, size .P .TP .B syscall.shutdown how, how_str, s .P .TP .B syscall.sigaction32 act_uaddr, oact_uaddr, sig .P .TP .B syscall.sigaltstack uoss_uaddr, uss_uaddr .P .TP .B syscall.signal handler, sig .P .TP .B syscall.signalfd flags .P .TP .B syscall.sigpending .P .TP .B syscall.sigprocmask how, how_str, oldset_uaddr, set_uaddr .P .TP .B syscall.sigreturn .P .TP .B syscall.sigsuspend mask .P .TP .B syscall.socket family, protocol, type .P .TP .B syscall.socketpair family, protocol, sv_uaddr, type .P .TP .B syscall.splice fd_in, fd_out, flags, flags_str, len, off_in, off_out .P .TP .B syscall.ssetmask newmask, newmask_str .P .TP .B syscall.stat buf_uaddr, filename, filename_uaddr .P .TP .B syscall.statfs buf_uaddr, path .P .TP .B syscall.statfs64 buf_uaddr, path, sz .P .TP .B syscall.stime t_uaddr .P .TP .B syscall.swapoff path .P .TP .B syscall.swapon path, swapflags, swapflags_str .P .TP .B syscall.symlink newpath, oldpath .P .TP .B syscall.symlinkat newdfd, newdfd_str, newname, newname_str, oldname, oldname_str .P .TP .B syscall.sync .P .TP .B syscall.sync_file_range fd, flags, flags_str, nbytes, offset .P .TP .B syscall.syncfs fd .P .TP .B syscall.sysctl .P .TP .B syscall.sysfs arg1, arg2, option .P .TP .B syscall.sysinfo info_uaddr .P .TP .B syscall.syslog bufp_uaddr, len, type .P .TP .B syscall.tee fdin, fdout, flags, len .P .TP .B syscall.tgkill pid, sig, tgid .P .TP .B syscall.time t_uaddr .P .TP .B syscall.timer_create clockid, clockid_str, evp_uaddr, timerid_uaddr .P .TP .B syscall.timer_delete timerid .P .TP .B syscall.timer_getoverrun timerid .P .TP .B syscall.timer_gettime timerid, value_uaddr .P .TP .B syscall.timer_settime flags, ovalue_uaddr, timerid, value_uaddr .P .TP .B syscall.timerfd_create clockid, clockid_str, flags, flags_str .P .TP .B syscall.timerfd_gettime fd, value_uaddr .P .TP .B syscall.timerfd_settime fd, flags, flags_str, ovalue_uaddr, value_uaddr .P .TP .B syscall.times buf_uaddr .P .TP .B syscall.tkill pid, sig .P .TP .B syscall.truncate length, path, path_uaddr .P .TP .B syscall.umask mask .P .TP .B syscall.umount flags, flags_str, target .P .TP .B syscall.uname .P .TP .B syscall.unlink pathname, pathname_uaddr .P .TP .B syscall.unlinkat dfd, dfd_str, flag, flag_str, pathname, pathname_str .P .TP .B syscall.unshare unshare_flags .P .TP .B syscall.ustat dev, ubuf_uaddr .P .TP .B syscall.ustat32 dev, ubuf_uaddr .P .TP .B syscall.utime actime, buf_uaddr, filename, filename_uaddr, modtime .P .TP .B syscall.utimensat dfd, dfd_str, filename, filename_uaddr, flags, flags_str, tsp_uaddr .P .TP .B syscall.utimes filename, filename_uaddr, tvp_uaddr .P .TP .B syscall.vfork .P .TP .B syscall.vhangup .P .TP .B syscall.vmsplice fd, flags, flags_str, iov, nr_segs .P .TP .B syscall.wait4 options, options_str, pid, rusage_uaddr, status_uaddr .P .TP .B syscall.waitid infop_uaddr, options, options_str, pid, rusage_uaddr, which, which_str .P .TP .B syscall.waitpid options, options_str, pid, status_uaddr .P .TP .B syscall.write buf_uaddr, count, fd .P .TP .B syscall.writev count, fd, vector_uaddr .SH SEE ALSO .BR .IR \%stap (1), .IR \%stapprobes (3stap) systemtap-2.9/doc/SystemTap_Tapset_Reference/syscalls.xmlpart000066400000000000000000001027601260561570600246750ustar00rootroot00000000000000 syscalls Following is an overview of available syscall probes and convenience variables they offer. By default, each syscall probe has name and argstr convenience variables, which are not included in the overview in order to keep it short. Non dwarf-based nd_syscall probes are supposed to have the same convenience variables. Syscalls list syscall params accept addr_uaddr, addrlen_uaddr, sockfd accept4 addr_uaddr, addrlen_uaddr, flags, flags_str, sockfd access mode, mode_str, pathname acct filename add_key description_uaddr, payload_uaddr, plen, ringid, type_uaddr adjtimex buf_str, buf_uaddr alarm seconds arch_prctl addr, code, code_str bdflush data, data_str, func bind addrlen, my_addr_uaddr, sockfd, uaddr_af, uaddr_ip, uaddr_ip_port, uaddr_ipv6_flowinfo, uaddr_ipv6_scope_id bpf attr_uaddr, cmd, cmd_str, size brk brk capget data_uaddr, header_uaddr capset data_uaddr, header_uaddr chdir path chmod mode, path chown group, owner, path chown16 group, owner, path chroot path clock_adjtime clk_id, clk_id_str, tx_uaddr clock_getres clk_id, clk_id_str, res_uaddr clock_gettime clk_id, clk_id_str, tp_uaddr clock_nanosleep clk_id, clk_id_str, flags, flags_str, rem_uaddr, req_uaddr clock_settime clk_id, clk_id_str, tp_uaddr clone child_tid_uaddr, clone_flags, parent_tid_uaddr, stack_start close fd compat_adjtimex buf_str, buf_uaddr compat_clock_nanosleep clk_id, clk_id_str, flags, flags_str, rem_uaddr, req_uaddr compat_execve args, env_str, filename compat_execveat args, dirfd, dirfd_str, env_str, filename, flags, flags_str compat_fadvise64 advice, fd, len, offset compat_fadvise64_64 advice, fd, len, offset compat_fallocate fd, len, mode, offset compat_ftruncate64 fd, length compat_futex futex_uaddr, op, uaddr2_uaddr, utime_uaddr, val3, val compat_futimesat dirfd, dirfd_str, filename, filename_uaddr, tvp_uaddr compat_getitimer value_uaddr, which compat_lookup_dcookie buffer_uaddr, cookie, len compat_nanosleep rem_uaddr, req_uaddr compat_ppoll compat_pselect6 compat_readahead count, fd, offset compat_recvmmsg flags, flags_str, mmsg_uaddr, s, timeout_uaddr, vlen compat_rt_sigprocmask how, how_str, oldset_uaddr, set_uaddr compat_select exceptfds_uaddr, n, readfds_uaddr, timeout_uaddr, writefds_uaddr compat_setitimer ovalue_uaddr, value_uaddr, which compat_signalfd flags compat_sys_msgctl buf_uaddr, cmd, cmd_str, msqid compat_sys_msgrcv msgflg, msgflg_str, msgp_uaddr, msgsz, msgtyp, msqid compat_sys_msgsnd msgflg, msgflg_str, msgp_uaddr, msgsz, msqid compat_sys_recvmsg flags, flags_str, msg_uaddr, s compat_sys_semctl arg, cmd, cmdstr, semid, semnum compat_sys_semtimedop nsops, semid, sops_uaddr, timeout_uaddr compat_sys_sendmsg flags, flags_str, msg_uaddr, s compat_sys_shmat shmaddr_uaddr, shmflg, shmid compat_sys_shmctl buf_uaddr, cmd, cmd_str, shmid compat_sys_utimes filename compat_truncate64 length, path, path_uaddr compat_utime actime, buf_uaddr, filename, filename_uaddr, modtime compat_utimensat dfd, dfd_str, filename, filename_uaddr, flags, flags_str, tsp_uaddr compat_vmsplice fd, flags, flags_str, iov, nr_segs connect addrlen, serv_addr_uaddr, sockfd, uaddr_af, uaddr_ip, uaddr_ip_port, uaddr_ipv6_flowinfo, uaddr_ipv6_scope_id creat mode, pathname delete_module flags, flags_str, name_user dup oldfd dup2 flags, newfd, oldfd dup3 flags, newfd, oldfd epoll_create flags, size epoll_ctl epfd, event_uaddr, fd, op, op_str epoll_pwait epfd, events_uaddr, maxevents, sigmask_uaddr, sigsetsize, timeout epoll_wait epfd, events_uaddr, maxevents, timeout eventfd count, flags, flags_str execve args, env_str, filename execveat args, dirfd, dirfd_str, env_str, filename, flags, flags_str exit status exit_group status faccessat dirfd, dirfd_str, mode, mode_str, pathname fadvise64 advice, fd, len, offset fadvise64_64 advice, fd, len, offset fallocate fd, len, mode, mode_str, offset fanotify_init event_f_flags, event_f_flags_str, flags, flags_str fanotify_mark dirfd, dirfd_str, fanotify_fd, flags, flags_str, mask, mask_str, pathname fchdir fd fchmod fildes, mode fchmodat dirfd, dirfd_str, mode, pathname fchown fd, group, owner fchown16 fd, group, owner fchownat dirfd, dirfd_str, flags, flags_str, group, owner, pathname fcntl arg, cmd, cmd_str, fd fdatasync fd fgetxattr filedes, name_str, size, value_uaddr finit_module fd, flags, flags_str, uargs flistxattr filedes, list_uaddr, size flock fd, operation fork fremovexattr filedes, name_str, name_uaddr fsetxattr filedes, flags, flags_str, name_str, name_uaddr, size, value_str, value_uaddr fstat buf_uaddr, filedes fstatat buf_uaddr, dirfd, dirfd_str, flags, flags_str, path fstatfs buf_uaddr, fd fstatfs64 buf_uaddr, fd, sz fsync fd ftruncate fd, length futex futex_uaddr, op, uaddr2_uaddr, utime_uaddr, val3, val futimesat dirfd, dirfd_str, filename, filename_uaddr, tvp_uaddr get_mempolicy addr, flags, flags_str, maxnode, nmask_uaddr, policy_uaddr get_robust_list len_uaddr, list_head_uaddr, pid get_thread_area u_info_uaddr getcpu cpu_uaddr, node_uaddr, tcache_uaddr getcwd buf_uaddr, size getdents count, dirp_uaddr, fd getegid geteuid getgid getgroups list_uaddr, size gethostname len, name_uaddr getitimer value_uaddr, which getpeername name_uaddr, namelen_uaddr, s getpgid pid getpgrp getpid getppid getpriority which, who getrandom buf, count, flags, flags_str getresgid egid_uaddr, rgid_uaddr, sgid_uaddr getresuid euid_uaddr, ruid_uaddr, suid_uaddr getrlimit resource, rlim_uaddr getrusage usage_uaddr, who, who_str getsid pid getsockname name_uaddr, namelen_uaddr, s getsockopt fd, level, level_str, optlen_uaddr, optname, optname_str, optval_uaddr gettid gettimeofday tv_uaddr, tz_uaddr getuid getxattr name_str, path, size, value_uaddr init_module len, uargs, umod_uaddr inotify_add_watch fd, mask, path, path_uaddr inotify_init flags inotify_rm_watch fd, wd io_cancel ctx_id, iocb_uaddr, result_uaddr io_destroy ctx io_getevents ctx_id, events_uaddr, min_nr, nr, timeout_uaddr, timestr io_setup ctxp_uaddr, maxevents io_submit ctx_id, iocbpp_uaddr, nr ioctl argp, fd, request ioperm from, num, turn_on iopl level ioprio_get which, which_str, who ioprio_set ioprio, ioprio_str, which, which_str, who kcmp idx1, idx2, pid1, pid2, type, type_str kexec_file_load cmdline, cmdline_len, flags, flags_str, initrd_fd, kernel_fd kexec_load entry, flags, flags_str, nr_segments, segments_uaddr keyctl arg2, arg3, arg4, arg5, option kill pid, sig lchown group, owner, path lchown16 group, owner, path lgetxattr name_str, path, size, value_uaddr link newpath, oldpath linkat flags, flags_str, newdirfd, newdirfd_str, newpath, olddirfd, olddirfd_str, oldpath listen backlog, sockfd listxattr list_uaddr, path, path_uaddr, size llistxattr list_uaddr, path, path_uaddr, size llseek fd, offset_high, offset_low, result_uaddr, whence, whence_str lookup_dcookie buffer_uaddr, cookie, len lremovexattr name_str, name_uaddr, path, path_uaddr lseek fildes, offset, whence, whence_str lsetxattr flags, flags_str, name_str, name_uaddr, path, path_uaddr, size, value_str, value_uaddr lstat buf_uaddr, path madvise advice, advice_str, length, start mbind flags, flags_str, len, maxnode, mode, mode_str, nmask_uaddr, start memfd_create flags, flags_str, uname migrate_pages maxnode, new_nodes, old_nodes, pid mincore length, start, vec_uaddr mkdir mode, pathname, pathname_uaddr mkdirat dirfd, dirfd_str, mode, pathname mknod dev, mode, pathname mknodat dev, dirfd, dirfd_str, mode, mode_str, pathname mlock addr, len mlockall flags mmap2 fd, flags, length, pgoffset, prot, start modify_ldt bytecount, func, ptr_uaddr mount data, filesystemtype, mountflags, mountflags_str, source, target move_pages flags, flags_str, nodes, nr_pages, pages, pid, status mprotect addr, len, prot, prot_str mq_getsetattr mqdes, u_mqstat_uaddr, u_omqstat_uaddr mq_notify mqdes, notification_uaddr mq_open filename, mode, name_uaddr, oflag, u_attr_uaddr mq_timedreceive abs_timeout_uaddr, mqdes, msg_len, msg_prio_uaddr, msg_ptr_uaddr mq_timedsend abs_timeout_uaddr, mqdes, msg_len, msg_prio, msg_ptr_uaddr mq_unlink u_name, u_name_uaddr mremap flags, new_address, new_size, old_address, old_size msgctl buf_uaddr, cmd, cmd_str, msqid msgget key, key_str, msgflg, msgflg_str msgrcv msgflg, msgflg_str, msgp_uaddr, msgsz, msgtyp, msqid msgsnd msgflg, msgflg_str, msgp_uaddr, msgsz, msqid msync flags, length, start munlock addr, len munlockall munmap length, start name_to_handle_at dfd, dfd_str, flags, flags_str, handle_uaddr, mnt_id_uaddr, pathname nanosleep rem_uaddr, req_uaddr ni_syscall nice inc open filename, flags, mode open_by_handle_at flags, flags_str, handle_uaddr, mount_dfd, mount_dfd_str openat dfd, dfd_str, filename, flags, mode pause perf_event_open attr_uaddr, cpu, flags, flags_str, group_fd, pid personality persona pipe fildes_uaddr, flag_str, flags, pipe0, pipe1 pivot_root new_root_str, old_root_str poll nfds, timeout, ufds_uaddr ppoll prctl arg2, arg3, arg4, arg5, option pread buf_uaddr, count, fd, offset preadv count, fd, offset, vector_uaddr prlimit64 new_rlim_uaddr, old_rlim_uaddr, pid, resource process_vm_readv flags, liovcnt, local_iov_uaddr, pid, remote_iov_uaddr, riovcnt process_vm_writev flags, liovcnt, local_iov_uaddr, pid, remote_iov_uaddr, riovcnt pselect6 ptrace addr, data, pid, request pwrite buf_uaddr, count, fd, offset pwritev count, fd, offset, vector_uaddr quotactl addr_uaddr, cmd, cmd_str, id, special, special_str read buf_uaddr, count, fd readahead count, fd, offset readdir count, dirent, fd readlink buf_uaddr, bufsiz, path readlinkat buf_uaddr, bufsiz, dfd, dfd_str, path readv count, fd, vector_uaddr reboot arg_uaddr, flag, flag_str, magic2, magic2_str, magic, magic_str recv buf_uaddr, flags, flags_str, len, s recvfrom addr_uaddr, addrlen_uaddr, buf_uaddr, flags, flags_str, len, s recvmmsg flags, flags_str, mmsg_uaddr, s, timeout_uaddr, vlen recvmsg flags, flags_str, msg_uaddr, s remap_file_pages flags, pgoff, prot, size, start removexattr name_str, path rename newpath, oldpath renameat newdfd, newdfd_str, newname, newname_str, olddfd, olddfd_str, oldname, oldname_str renameat2 flags, flags_str, newdfd, newdfd_str, newname, newname_str, olddfd, olddfd_str, oldname, oldname_str request_key callout_info_uaddr, description_uaddr, destringid, type_uaddr restart_syscall rmdir pathname rt_sigaction act_uaddr, oact_uaddr, sig, sigsetsize rt_sigaction32 act_uaddr, oact_uaddr, sig, sigsetsize rt_sigpending set_uaddr, sigsetsize rt_sigprocmask how, how_str, oldset_uaddr, set_uaddr rt_sigqueueinfo pid, sig, uinfo_uaddr rt_sigreturn rt_sigsuspend set_uaddr, sigsetsize rt_sigtimedwait sigsetsize, uinfo_uaddr, uthese_uaddr, uts_uaddr rt_tgsigqueueinfo sig, tgid, tid, uinfo_uaddr sched_get_priority_max policy sched_get_priority_min policy sched_getaffinity len, mask_uaddr, pid sched_getattr flags, pid, sched_attr_str, sched_attr_uaddr, size sched_getparam p_uaddr, pid sched_getscheduler pid sched_rr_get_interval pid, tp_uaddr sched_setaffinity len, mask_uaddr, pid sched_setattr flags, pid, sched_attr_str, sched_attr_uaddr sched_setparam p_uaddr, pid sched_setscheduler p_uaddr, pid, policy, policy_str sched_yield seccomp flags, flags_str, op, op_str, uargs, uargs_uaddr select exceptfds_uaddr, n, readfds_uaddr, timeout_uaddr, writefds_uaddr semctl arg, cmd, cmdstr, semid, semnum semget key, key_str, nsems, semflg, semflg_str semop nsops, semid, sops_uaddr semtimedop nsops, semid, sops_uaddr, timeout_uaddr send buf_uaddr, flags, flags_str, len, s sendfile count, in_fd, offset_uaddr, out_fd sendmmsg flags, flags_str, mmsg_uaddr, s, vlen sendmsg flags, flags_str, msg_uaddr, s sendto buf_uaddr, flags, flags_str, len, s, to_uaddr, tolen set_mempolicy maxnode, mode, mode_str, nmask_uaddr set_robust_list len, list_head_uaddr set_thread_area u_info_uaddr set_tid_address tidptr_uaddr setdomainname domainname_str, domainname_uaddr, len setfsgid fsgid setfsuid fsuid setgid gid setgroups list_uaddr, size sethostname hostname_uaddr, len, name_str setitimer ovalue_uaddr, value_uaddr, which setns fd, nstype setpgid pgid, pid setpriority prio, which, which_str, who setregid egid, rgid setregid16 egid, rgid setresgid egid, rgid, sgid setresgid16 egid, rgid, sgid setresuid euid, ruid, suid setresuid16 euid, ruid, suid setreuid euid, ruid setreuid16 euid, ruid setrlimit resource, rlim_uaddr setsid setsockopt fd, level, level_str, optlen, optname, optname_str, optval_uaddr settimeofday tv_uaddr, tz_uaddr settimeofday32 tv_uaddr, tz_uaddr setuid uid setxattr flags, flags_str, name_str, name_uaddr, path, path_uaddr, size, value_str, value_uaddr sgetmask shmat shmaddr_uaddr, shmflg, shmid shmctl buf_uaddr, cmd, cmd_str, shmid shmdt shmaddr_uaddr shmget key, shmflg, shmflg_str, size shutdown how, how_str, s sigaction32 act_uaddr, oact_uaddr, sig sigaltstack uoss_uaddr, uss_uaddr signal handler, sig signalfd flags sigpending sigprocmask how, how_str, oldset_uaddr, set_uaddr sigreturn sigsuspend mask socket family, protocol, type socketpair family, protocol, sv_uaddr, type splice fd_in, fd_out, flags, flags_str, len, off_in, off_out ssetmask newmask, newmask_str stat buf_uaddr, filename, filename_uaddr statfs buf_uaddr, path statfs64 buf_uaddr, path, sz stime t_uaddr swapoff path swapon path, swapflags, swapflags_str symlink newpath, oldpath symlinkat newdfd, newdfd_str, newname, newname_str, oldname, oldname_str sync sync_file_range fd, flags, flags_str, nbytes, offset syncfs fd sysctl sysfs arg1, arg2, option sysinfo info_uaddr syslog bufp_uaddr, len, type tee fdin, fdout, flags, len tgkill pid, sig, tgid time t_uaddr timer_create clockid, clockid_str, evp_uaddr, timerid_uaddr timer_delete timerid timer_getoverrun timerid timer_gettime timerid, value_uaddr timer_settime flags, ovalue_uaddr, timerid, value_uaddr timerfd_create clockid, clockid_str, flags, flags_str timerfd_gettime fd, value_uaddr timerfd_settime fd, flags, flags_str, ovalue_uaddr, value_uaddr times buf_uaddr tkill pid, sig truncate length, path, path_uaddr umask mask umount flags, flags_str, target uname unlink pathname, pathname_uaddr unlinkat dfd, dfd_str, flag, flag_str, pathname, pathname_str unshare unshare_flags ustat dev, ubuf_uaddr ustat32 dev, ubuf_uaddr utime actime, buf_uaddr, filename, filename_uaddr, modtime utimensat dfd, dfd_str, filename, filename_uaddr, flags, flags_str, tsp_uaddr utimes filename, filename_uaddr, tvp_uaddr vfork vhangup vmsplice fd, flags, flags_str, iov, nr_segs wait4 options, options_str, pid, rusage_uaddr, status_uaddr waitid infop_uaddr, options, options_str, pid, rusage_uaddr, which, which_str waitpid options, options_str, pid, status_uaddr write buf_uaddr, count, fd writev count, fd, vector_uaddr
systemtap-2.9/doc/SystemTap_Tapset_Reference/tapcheck.sh000077500000000000000000000035241260561570600235460ustar00rootroot00000000000000#!/bin/sh #check to make sure a tapsets.tmpl file exists if [ ! -f tapsets.tmpl ]; then echo "Error: tapsets.tmpl doesn't exist in the current directory!" exit 1 fi # list the tapsets in the tapsets.tmpl file and properly format the # file names grep "\.stp" tapsets.tmpl | grep ! | sed 's/!Itapset\///g' > checkfile2 # change to the tapset directory and check the tapsets there # check to see if directory is present first if [ ! -d ../../tapset/ ]; then echo "Error: tapsets directory doesn't exist!" exit 1 fi (cd ../../tapset/; find -path "*.stp") | sed 's/\.\///g' > checkfile1 #might as well check for the functions that are documented in #langref now too (cd ../../tapset/; find -path "*.stp" -exec grep -H sfunction {} \; ) \ | sed 's/\.\///g' | cut -d : -f 1 | sort -d | uniq > tap1 # order the tapset names then diff the files to examine the differences sort -d checkfile1 | uniq > checkfile1s sort -d checkfile2 | uniq > checkfile2s comm -23 checkfile1s checkfile2s > missingdoc comm -12 missingdoc tap1 > commondoc comm -23 missingdoc tap1 > missingdoc1 comm -13 checkfile1s checkfile2s > missingtap zero='0' one='1' Missingdoc=`cat missingdoc1 |wc -l ` Missingtap=`cat missingtap | wc -l ` Commondoc=`cat commondoc | wc -l ` if [ "$Missingdoc" -gt "$zero" ] then echo "You have missing documentation from tapsets in use, specifically:" cat missingdoc1 fi if [ "$Missingtap" -gt "$zero" ] then echo "You have documentation for the following tapsets that don't exist!" cat missingtap fi if [ "$Commondoc" -gt "$zero" ] then echo "The following tapsets did not appear in tapset.tmpl, but have references in the langref file." cat commondoc fi rm checkfile2 checkfile2s checkfile1 checkfile1s missingtap missingdoc missingdoc1 commondoc tap1 # at the end we need to make sure we remove any files that we created # change to proper directory first systemtap-2.9/doc/SystemTap_Tapset_Reference/tapsets.tmpl000066400000000000000000000340061260561570600240050ustar00rootroot00000000000000 SystemTap Tapset Reference Manual 2008-2015 Red Hat, Inc. and others SystemTap Hackers This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. For more details see the file COPYING in the source distribution of Linux. Introduction SystemTap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system. This assists diagnosis of a performance or functional problem. SystemTap eliminates the need for the developer to go through the tedious and disruptive instrument, recompile, install, and reboot sequence that may be otherwise required to collect data. SystemTap provides a simple command line interface and scripting language for writing instrumentation for a live running kernel. The instrumentation makes extensive use of the probe points and functions provided in the tapset library. This document describes the various probe points and functions.
Tapset Name Format In this guide, tapset definitions appear in the following format: name:return (parameters) definition The return field specifies what data type the tapset extracts and returns from the kernel during a probe (and thus, returns). Tapsets use 2 data types for return: long (tapset extracts and returns an integer) and string (tapset extracts and returns a string). In some cases, tapsets do not have a return value. This simply means that the tapset does not extract anything from the kernel. This is common among asynchronous events such as timers, exit functions, and print functions.
Context Functions The context functions provide additional information about where an event occurred. These functions can provide information such as a backtrace to where the event occurred and the current register values for the processor. !Itapset/context.stp !Itapset/linux/context.stp !Itapset/linux/context-envvar.stp !Itapset/linux/context-symbols.stp !Itapset/linux/ucontext.stp !Itapset/linux/ucontext-symbols.stp !Itapset/linux/context-unwind.stp !Itapset/linux/context-caller.stp !Itapset/linux/ucontext-unwind.stp !Itapset/linux/task.stp !Itapset/linux/task_ancestry.stp !Itapset/pn.stp !Itapset/linux/pstrace.stp !Itapset/registers.stp Timestamp Functions Each timestamp function returns a value to indicate when a function is executed. These returned values can then be used to indicate when an event occurred, provide an ordering for events, or compute the amount of time elapsed between two time stamps. !Itapset/linux/timestamp.stp !Itapset/linux/timestamp_gtod.stp !Itapset/linux/timestamp_monotonic.stp !Itapset/stopwatch.stp Time utility functions Utility functions to turn seconds since the epoch (as returned by the timestamp function gettimeofday_s()) into a human readable date/time strings. !Itapset/linux/ctime.stp !Itapset/linux/tzinfo.stp !Itapset/tzinfo.stp Shell command functions Utility functions to enqueue shell commands. !Itapset/system.stp Memory Tapset This family of probe points is used to probe memory-related events or query the memory usage of the current process. It contains the following probe points: !Itapset/linux/memory.stp !Itapset/linux/proc_mem.stp Task Time Tapset This tapset defines utility functions to query time related properties of the current tasks, translate those in miliseconds and human readable strings. !Itapset/linux/task_time.stp Scheduler Tapset This family of probe points is used to probe the task scheduler activities. It contains the following probe points: !Itapset/linux/scheduler.stp IO Scheduler and block IO Tapset This family of probe points is used to probe block IO layer and IO scheduler activities. It contains the following probe points: !Itapset/linux/ioscheduler.stp !Itapset/linux/ioblock.stp SCSI Tapset This family of probe points is used to probe SCSI activities. It contains the following probe points: !Itapset/linux/scsi.stp TTY Tapset This family of probe points is used to probe TTY (Teletype) activities. It contains the following probe points: !Itapset/linux/tty.stp Interrupt Request (IRQ) Tapset This family of probe points is used to probe interrupt request (IRQ) activities. It contains the following probe points: !Itapset/linux/irq.stp Networking Tapset This family of probe points is used to probe the activities of the network device and protocol layers. !Itapset/linux/networking.stp !Itapset/linux/tcp.stp !Itapset/linux/udp.stp !Itapset/linux/ip.stp !Itapset/linux/inet.stp !Itapset/linux/rpc.stp !Itapset/linux/netfilter.stp Socket Tapset This family of probe points is used to probe socket activities. It contains the following probe points: !Itapset/linux/socket.stp !Itapset/linux/inet_sock.stp SNMP Information Tapset This family of probe points is used to probe socket activities to provide SNMP type information. It contains the following functions and probe points: !Itapset/linux/ipmib.stp !Itapset/linux/ipmib-filter-default.stp !Itapset/linux/tcpmib.stp !Itapset/linux/tcpmib-filter-default.stp !Itapset/linux/linuxmib.stp !Itapset/linux/linuxmib-filter-default.stp Kernel Process Tapset This family of probe points is used to probe process-related activities. It contains the following probe points: !Itapset/linux/kprocess.stp !Itapset/linux/target_set.stp !Itapset/linux/loadavg.stp Signal Tapset This family of probe points is used to probe signal activities. It contains the following probe points: !Itapset/linux/signal.stp Errno Tapset This set of functions is used to handle errno number values. It contains the following functions: !Itapset/errno.stp RLIMIT Tapset This set of functions is used to handle string which defines resource limits (RLIMIT_*) and returns corresponding number of resource limit. It contains the following functions: !Itapset/linux/rlimit.stp Device Tapset This set of functions is used to handle kernel and userspace device numbers. It contains the following functions: !Itapset/linux/dev.stp Directory-entry (dentry) Tapset This family of functions is used to map kernel VFS directory entry pointers to file or full path names. !Itapset/linux/dentry.stp Logging Tapset This family of functions is used to send simple message strings to various destinations. !Itapset/logging.stp !Itapset/linux/logging.stp Queue Statistics Tapset This family of functions is used to track performance of queuing systems. !Itapset/queue_stats.stp Random functions Tapset These functions deal with random number generation. !Itapset/random.stp String and data retrieving functions Tapset Functions to retrieve strings and other primitive types from the kernel or a user space programs based on addresses. All strings are of a maximum length given by MAXSTRINGLEN. !Itapset/linux/conversions.stp !Itapset/linux/atomic.stp !Itapset/uconversions.stp String and data writing functions Tapset The SystemTap guru mode can be used to test error handling in kernel code by simulating faults. The functions in the this tapset provide standard methods of writing to primitive types in the kernel's memory. All the functions in this tapset require the use of guru mode (-g). !Itapset/linux/conversions-guru.stp Guru tapsets Functions to deliberately interfere with the system's behavior, in order to inject faults or improve observability. All the functions in this tapset require the use of guru mode (-g). !Itapset/linux/guru-delay.stp !Itapset/linux/panic.stp !Itapset/linux/guru-signal.stp A collection of standard string functions Functions to get the length, a substring, getting at individual characters, string seaching, escaping, tokenizing, and converting strings to longs. !Itapset/string.stp !Itapset/tokenize.stp Utility functions for using ansi control chars in logs Utility functions for logging using ansi control characters. This lets you manipulate the cursor position and character color output and attributes of log messages. !Itapset/ansi.stp !Itapset/indent.stp SystemTap Translator Tapset This family of user-space probe points is used to probe the operation of the SystemTap translator (stap) and run command (staprun). The tapset includes probes to watch the various phases of SystemTap and SystemTap's management of instrumentation cache. It contains the following probe points: !Itapset/stap_staticmarkers.stp Network File Storage Tapsets This family of probe points is used to probe network file storage functions and operations. !Itapset/linux/nfs_proc.stp !Itapset/linux/nfs.stp !Itapset/linux/nfsd.stp !Itapset/linux/nfsderrno.stp Speculation This family of functions provides the ability to speculative record information and then at a later point in the SystemTap script either commit the information or discard it. !Itapset/speculative.stp JSON Tapset This family of probe points, functions, and macros is used to output data in JSON format. It contains the following probe points, functions, and macros: !Itapset/linux/json.stp !Itapset/linux/json.stpm Output file switching Tapset Utility function to allow switching of output files. !Itapset/switchfile.stp !Syscalls
systemtap-2.9/doc/Tapset_Reference_Guide/000077500000000000000000000000001260561570600205255ustar00rootroot00000000000000systemtap-2.9/doc/Tapset_Reference_Guide/Makefile000066400000000000000000000006411260561570600221660ustar00rootroot00000000000000#Makefile for Tapset_Reference_Guide XML_LANG = en-US DOCNAME = Tapset_Reference_Guide #PRODUCT = FIX_ME! BRAND = fedora #OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW # Extra Parameters start here # Extra Parameters stop here COMMON_CONFIG = /usr/share/publican include $(COMMON_CONFIG)/make/Makefile.common systemtap-2.9/doc/Tapset_Reference_Guide/README000066400000000000000000000032661260561570600214140ustar00rootroot00000000000000The Publican Tapset Reference Guide is build from files generated during the build of SystemTap when it is configured with "--enable-refdocs". Assuming that SystemTap was built in /home/wcohen/systemtap/build, the file needed to generate the Publican Tapset Reference Guide would be /home/wcohen/systemtap/build/doc/SystemTap_Tapset_Reference/tapsets.xml. To generate the required DocBook XML file of the tapsets.xml file and build the Publican Tapset Reference Guide from this directory: export BUILD=/home/wcohen/systemtap/build ./publicanize.sh -i=$BUILD/doc/SystemTap_Tapset_Reference/tapsets.xml This will copy and clean the XML source of SystemTap_Tapset_Reference created by kernel-doc and place the resulting file in ./en-US/Tapset_Reference_Guide.xml. You can now build it in pdf, html, etc using Publican. To make the Publican pdf file: make pdf-en-US The resulting output file will be ./tmp/en-US/pdf/Tapset_Reference_Guide.pdf The main source of the Language Reference Guide is in the build directory: $BUILD/doc/SystemTap_Tapset_Reference/tapsets.xml This main source is generated by kernel-doc when you run 'make' in the main git tree. The tapset documentation inside is collected from all tapset files defined in the following template file: ../SystemTap_Tapset_Reference/tapsets.tmpl The tapset file definitions appear in tapsets.tmpl as: !Itapset/context.stp !Itapset/context-symbols.stp etc context.stp, context-symbols, and all the other tapset files are located in: ../../tapset All tapset documentation should be done inside their respective tapset files. For more information about this project, refer to: http://sourceware.org/systemtap/wiki/ProjectTapsetReferenceGuide systemtap-2.9/doc/Tapset_Reference_Guide/en-US/000077500000000000000000000000001260561570600214545ustar00rootroot00000000000000systemtap-2.9/doc/Tapset_Reference_Guide/en-US/Author_Group.xml000066400000000000000000000013371260561570600246200ustar00rootroot00000000000000 Red Hat Enterprise Linux Documentation Don Domingo Engineering Services and Operations Content Services ddomingo@redhat.com William Cohen Engineering Services and Operations Performance Tools wcohen@redhat.com systemtap-2.9/doc/Tapset_Reference_Guide/en-US/Book_Info.xml000066400000000000000000000023111260561570600240400ustar00rootroot00000000000000 Tapset Reference Guide For SystemTap in Fedora 10 Fedora 10 1.0 0 The Tapset Reference Guide describes the most common tapset definitions users can apply to SystemTap scripts. All included tapsets documented in this guide are current as of Fedora 10 and the latest upstream version of SystemTap. Logo &YEAR; &HOLDER; systemtap-2.9/doc/Tapset_Reference_Guide/en-US/Introduction.xml000066400000000000000000000046631260561570600246700ustar00rootroot00000000000000 Introduction SystemTap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system. This assists diagnosis of a performance or functional problem. SystemTap eliminates the need for the developer to go through the tedious and disruptive instrument, recompile, install, and reboot sequence that may be otherwise required to collect data. SystemTap provides a simple command line interface and scripting language for writing instrumentation for a live, running kernel. This instrumentation uses probe points and functions provided in the tapset library. Simply put, tapsets are scripts that encapsulate knowledge about a kernel subsystem into pre-written probes and functions that can be used by other scripts. Tapsets are analogous to libraries for C programs. They hide the underlying details of a kernel area while exposing the key information needed to manage and monitor that aspect of the kernel. They are typically developed by kernel subject-matter experts. A tapset exposes the high-level data and state transitions of a subsystem. For the most part, good tapset developers assume that SystemTap users know little to nothing about the kernel subsystem's low-level details. As such, tapset developers write tapsets that help ordinary SystemTap users write meaningful and useful SystemTap scripts.
Documentation Goals This guide aims to document SystemTap's most useful and common tapset entries; it also contains guidelines on proper tapset development and documentation. The tapset definitions contained in this guide are extracted automatically from properly-formatted comments in the code of each tapset file. As such, any revisions to the definitions in this guide should be applied directly to their respective tapset file. add: "while users can read from code, it's easier to read from here!" add: target audience, expected proficiency of readers
systemtap-2.9/doc/Tapset_Reference_Guide/en-US/Legal_Notice.xml000066400000000000000000000017221260561570600245250ustar00rootroot00000000000000 This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. For more details see the file COPYING in the source distribution of Linux. systemtap-2.9/doc/Tapset_Reference_Guide/en-US/Preface.xml000066400000000000000000000011361260561570600235440ustar00rootroot00000000000000 Preface systemtap-2.9/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml000066400000000000000000000220311260561570600253470ustar00rootroot00000000000000 Tapset Development Guidelines This chapter describes the upstream guidelines on proper tapset documentation. It also contains information on how to properly document your tapsets, to ensure that they are properly defined in this guide.
Writing Good Tapsets The first step to writing good tapsets is to create a simple model of your subject area. For example, a model of the process subsystem might include the following: Key Data process ID parent process ID process group ID State Transitions forked exec'd running stopped terminated Note Both lists are examples, and are not meant to represent a complete list. Use your subsystem expertise to find probe points (function entries and exits) that expose the elements of the model, then define probe aliases for those points. Be aware that some state transitions can occur in more than one place. In those cases, an alias can place a probe in multiple locations. For example, process execs can occur in either the do_execve() or the compat_do_execve() functions. The following alias inserts probes at the beginning of those functions: probe kprocess.exec = kernel.function("do_execve"), kernel.function("compat_do_execve") {probe body} Try to place probes on stable interfaces (i.e., functions that are unlikely to change at the interface level) whenever possible. This will make the tapset less likely to break due to kernel changes. Where kernel version or architecture dependencies are unavoidable, use preprocessor conditionals (see the stap(1) man page for details). Fill in the probe bodies with the key data available at the probe points. Function entry probes can access the entry parameters specified to the function, while exit probes can access the entry parameters and the return value. Convert the data into meaningful forms where appropriate (e.g., bytes to kilobytes, state values to strings, etc). You may need to use auxiliary functions to access or convert some of the data. Auxiliary functions often use embedded C to do things that cannot be done in the SystemTap language, like access structure fields in some contexts, follow linked lists, etc. You can use auxiliary functions defined in other tapsets or write your own. In the following example, copy_process() returns a pointer to the task_struct for the new process. Note that the process ID of the new process is retrieved by calling task_pid() and passing it the task_struct pointer. In this case, the auxiliary function is an embedded C function defined in task.stp. probe kprocess.create = kernel.function("copy_process").return { task = $return new_pid = task_pid(task) } It is not advisable to write probes for every function. Most SystemTap users will not need or understand them. Keep your tapsets simple and high-level. info from here:http://sourceware.org/git/?p=systemtap.git;a=blob_plain;f=tapset/DEVGUIDE
Elements of a Tapset The following sections describe the most important aspects of writing a tapset. Most of the content herein is suitable for developers who wish to contribute to SystemTap's upstream library of tapsets.
Tapset Files Tapset files are stored in src/tapset/ of the SystemTap GIT directory. Most tapset files are kept at that level. If you have code that only works with a specific architecture or kernel version, you may choose to put your tapset in the appropriate subdirectory. Installed tapsets are located in /usr/share/systemtap/tapset/ or /usr/local/share/systemtap/tapset. Personal tapsets can be stored anywhere. However, to ensure that SystemTap can use them, use -I tapset_directory to specify their location when invoking stap.
Namespace Probe alias names should take the form tapset_name.probe_name. For example, the probe for sending a signal could be named signal.send. Global symbol names (probes, functions, and variables) should be unique accross all tapsets. This helps avoid namespace collisions in scripts that use multiple tapsets. To ensure this, use tapset-specific prefixes in your global symbols. Internal symbol names should be prefixed with an underscore (_).
Comments and Documentation All probes and functions should include comment blocks that describe their purpose, the data they provide, and the context in which they run (e.g. interrupt, process, etc). Use comments in areas where your intent may not be clear from reading the code. Note that specially-formatted comments are automatically extracted from most tapsets and included in this guide. This helps ensure that tapset contributors can write their tapset and document it in the same place. The specified format for documenting tapsets is as follows: /** * probe tapset.name - Short summary of what the tapset does. * @argument: Explanation of argument. * @argument2: Explanation of argument2. Probes can have multiple arguments. * * Context: * A brief explanation of the tapset context. * Note that the context should only be 1 paragraph short. * * Text that will appear under "Description." * * A new paragraph that will also appear under the heading "Description". * * Header: * A paragraph that will appear under the heading "Header". **/ For example: /** * probe vm.write_shared_copy- Page copy for shared page write. * @address: The address of the shared write. * @zero: Boolean indicating whether it is a zero page * (can do a clear instead of a copy). * * Context: * The process attempting the write. * * Fires when a write to a shared page requires a page copy. This is * always preceded by a vm.write_shared. **/ To override the automatically-generated Synopsis content, use: * Synopsis: * New Synopsis string * For example: /** * probe signal.handle - Fires when the signal handler is invoked * @sig: The signal number that invoked the signal handler * * Synopsis: * <programlisting>static int handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, * sigset_t *oldset, struct pt_regs * regs)</programlisting> */ It is recommended that you use the <programlisting> tag in this instance, since overriding the Synopsis content of an entry does not automatically form the necessary tags. For the purposes of improving the DocBook XML output of your comments, you can also use the following XML tags in your comments: command emphasis programlisting remark (tagged strings will appear in Publican beta builds of the document)
systemtap-2.9/doc/Tapset_Reference_Guide/en-US/Tapset_Reference_Guide.ent000066400000000000000000000002521260561570600265160ustar00rootroot00000000000000 systemtap-2.9/doc/Tapset_Reference_Guide/en-US/images/000077500000000000000000000000001260561570600227215ustar00rootroot00000000000000systemtap-2.9/doc/Tapset_Reference_Guide/en-US/images/icon.svg000066400000000000000000003301271260561570600244000ustar00rootroot00000000000000 image/svg+xml id="path2858" /> systemtap-2.9/doc/Tapset_Reference_Guide/manpager.sh000077500000000000000000000100771260561570600226630ustar00rootroot00000000000000#!/bin/bash # This script builds the man pages from comments in tapsets. As such, the man page content # generated herein should be in sync with Tapset Reference Guide # NOTE: proposed newer version is being developed in doc/Systemtap_Tapset_Reference/manpager.sh # cleanup rm -rf man_pages # create working directory mkdir workingdir ; # create list of man pages to generate cat ../SystemTap_Tapset_Reference/tapsets.tmpl | grep ^\!Itapset > manpageus ; sed -i -e 's/\!Itapset\///g' manpageus ; # copy list of man pages into working directory for i in `cat manpageus` ; do cp ../../tapset/$i workingdir ; done ; # enter workdir cd workingdir ; # copy tapsetdescriptions, then clean for i in `cat ../manpageus`; do sed -n '/\/\/ /,/\/\/ <\/tapsetdescription>/ s/.*/&/w temp' < $i ; mv temp $i.tapsetdescription ; sed -i -e 's/\/\/ //g' $i.tapsetdescription ; sed -i -e 's/\/\/ <\/tapsetdescription>//g' $i.tapsetdescription ; sed -i -e 's/\/\///g' $i.tapsetdescription ; done # strip all tapset files to just comments; but all comments must be exactly 1 space before and after "*" for i in `cat ../manpageus` ; do sed -i -e 's/^ \*/ \*/g' $i; sed -i -e 's/^ \* / \* /g' $i; # mark the start of each probe entry (sub "/**") perl -p -i -e 's|^/\*\*| *probestart|g' $i; sed -i -e '/^ \*/!d' $i; # rename all tapsets (remove .stp filename suffix), create templates echo $i > tempname ; sed -i -e 's/.stp//g' tempname ; mv $i `cat tempname` ; mv tempname $i ; done ; # create man page headers for i in `ls | grep -v .stp | grep -v tapsetdescription` ; do #echo ".\" -*- nroff -*-" >> $i.template ; echo ".TH STAPPROBES."$i" 5 @DATE@ "IBM"" >> $i.template ; echo ".SH NAME" >> $i.template ; echo "stapprobes."`cat $i.stp`" \- systemtap "`cat $i.stp`" probe points" >> $i.template ; echo " " >> $i.template ; echo ".SH DESCRIPTION" >> $i.template ; cat $i.stp.tapsetdescription >> $i.template ; echo " " >> $i.template ; echo ".SH PROBES" >> $i.template ; echo ".br" >> $i.template ; echo ".P" >> $i.template ; echo ".TP" >> $i.template ; done # MOST IMPORTANT: clean man page body! sed -i -e 's/\.stp$//g' ../manpageus ; for i in `cat ../manpageus` ; do mv $i $i.tmp ; perl -p -i -e 's| \* sfunction|.BR|g' $i.tmp ; perl -p -i -e 's| \* probe|.BR|g' $i.tmp ; perl -p -i -e 's| -|\ninitlinehere|g' $i.tmp ; perl -p -i -e 's|^initlinehere([^\n]*)\n|$1\n |g' $i.tmp ; perl -p -i -e 's| \* @([^:]*):|\n.I $1:\n|g' $i.tmp ; perl -p -i -e 's| \* ([^:]*):|\n.BR $1:\n|g' $i.tmp ; perl -p -i -e 's| \* ||g' $i.tmp perl -p -i -e 's|\*probestart|\n.P\n.TP|g' $i.tmp ; perl -p -i -e 's|\.I|\n.I|g' $i.tmp ; # remove empty lines sed -i -e '/^$/d' $i.tmp ; sed -i -e '/^$/d' $i.tmp ; sed -i -e 's/^[ \t]*//g' $i.tmp ; # process Description headers perl -p -i -e 's|^\*[^/]|\n.BR Description:\n|g' $i.tmp ; perl -p -i -e 'undef $/;s|\.BR Description:\n\.BR|.BR|g' $i.tmp ; perl -p -i -e 'undef $/;s|\.BR Description:\n\*\/||g' $i.tmp ; # process Argument headers perl -p -i -e 'undef $/;s|\n\n.I|\n.br\n.BR Arguments:\n.I|g' $i.tmp ; # clean up formatting of arguments perl -p -i -e 's|^.I([^:]*:)|\n.br\n.br\n.IR$1\n.br\n\t|g' $i.tmp ; done # make tags work for i in `cat ../manpageus` ; do perl -p -i -e 's|]*>([^.])|$1\n|g' $i.tmp ; perl -p -i -e 's|<[^>]*>|\n.B |g' $i.tmp ; # the previous two statements create excess empty lines, remove some of them sed -i -e '/^$/d' $i.tmp ; # increase whitespace between some headers perl -p -i -e 's|^\.BR ([^:]*:)|\n.br\n.BR $1\n.br\n|g' $i.tmp done # generate footer template echo ".SH SEE ALSO" >> footer echo ".IR stap (1)," >> footer echo ".IR stapprobes (5)," >> footer for i in `cat ../manpageus`; do echo ".IR stapprobes."$i" (5)," >> footer ; done # assemble parts for i in `cat ../manpageus`; do cat $i.template >> stapprobes.$i.5 ; cat $i.tmp >> stapprobes.$i.5 ; cat footer >> stapprobes.$i.5 ; # final polish sed -i -e 's/\*\/$//g' stapprobes.$i.5 ; done # cleanup for i in `ls | grep -v 'stapprobes.*.5'` ; do rm $i ; done rm ../manpageus ; cd .. mv workingdir man_pages echo " " echo "Finished! man pages generated in ./man_pages." echo " " systemtap-2.9/doc/Tapset_Reference_Guide/publicanize.sh000077500000000000000000000116451260561570600234000ustar00rootroot00000000000000#!/bin/bash INFILE="../SystemTap_Tapset_Reference/tapsets.xml" OUTFILE="en-US/Tapset_Reference_Guide.xml" TMPFILE=`mktemp` || exit 1 TMPFILE2=`mktemp` || exit 1 do_help() { echo "publicanize.sh: usage: -?/--help this message -i/--input=file input file name -o/--output=file output file name " >&2 } #process optional arguments -i -o while [ "$#" -ne 0 ] do arg=`printf %s $1 | awk -F= '{print $1}'` val=`printf %s $1 | awk -F= '{print $2}'` shift if test -z "$val"; then local possibleval=$1 printf %s $1 "$possibleval" | grep ^- >/dev/null 2>&1 if test "$?" != "0"; then val=$possibleval if [ "$#" -ge 1 ]; then shift fi fi fi case "$arg" in -i|--input) INFILE=$val ;; -o|--output) OUTFILE=$val ;; -\?|--help) do_help exit 0 ;; *) echo "Unknown option \"$arg\". See opcontrol --help" >&2 exit 1 ;; esac done #copy the generated tapsets.xml cp $INFILE $TMPFILE || exit 1 #remove all excess whitespace sed -i -e 's/^\s*//g' $TMPFILE #remove marked Intro (starthere to endhere) sed -i -e '/starthere/,/endhere/d' $TMPFILE #re-convert programlisting tags sed -i -e 's/<programlisting>//g' $TMPFILE sed -i -e 's/<\/programlisting>/<\/programlisting>/g' $TMPFILE #replace header cat $TMPFILE | perl -p -e 'undef $/;s|\nSystemTap Tapset Reference Manual|\n|msg' | #perl -p -e 'undef $/;s|\n\nSystemTap\nHackers\n\n||msg' | #perl -p -e 'undef $/;s|\n2008-2009\nRed Hat, Inc. and others\n||msg' | #perl -p -e 'undef $/;s|\n\nThis documentation is free software\; you can redistribute\nit and/or modify it under the terms of the GNU General Public\nLicense version 2 as published by the Free Software Foundation.\n||msg' | #perl -p -e 'undef $/;s|\nThis program is distributed in the hope that it will be\nuseful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\n||msg' | #perl -p -e 'undef $/;s|\nYou should have received a copy of the GNU General Public\nLicense along with this program; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin Street, Fifth Floor,\nBoston, MA 02110-1301 USA.\n||msg' | #perl -p -e 'undef $/;s|\nFor more details see the file COPYING in the source\ndistribution of Linux.\n\n\n||msg' | #perl -p -e 'undef $/;s|||msg' | perl -p -e 'undef $/;s|\n\n\n\n\n\n\n\n\n\n\n\n\n\n||msg' | perl -p -e 'undef $/;s|\n\n\n\n\n\n\n\n\n\n\n||msg' | perl -p -e 'undef $/;s|\n|\nfunction <\/emphasis>|msg' | perl -p -e 'undef $/;s|\n||msg' | perl -p -e 'undef $/;s|\n\n||msg' | perl -p -e 'undef $/;s|\n||msg' | perl -p -e 'undef $/;s|\n||msg' > $TMPFILE2 #replace Intro with my own perl -p -i -e 's||\n|g' $TMPFILE2 #for tapset name format section #perl -p -i -e 'undef $/;s|\nname:return \(parameters\)\ndefinition\n|\nfunction/probe tapset_name:return \(parameters\)\n|msg' $TMPFILE2 #perl -p -i -e 's|In this guide, tapset definitions appear in the following format:|In this guide, the synopsis of each tapset appears in the following format:|g' $TMPFILE2 #perl -p -i -e 's||\n|g' $TMPFILE2 # statements change synopsis tags, as they are still currently unfixed in publican-redhat sed -i -e 's/refsynopsisdiv>/refsect1>/g' $TMPFILE2 sed -i -e 's/refsect1>/refsection>/g' $TMPFILE2 sed -i -e 's/synopsis>/programlisting>\n/g' $TMPFILE2 # re-convert tags sed -i -e 's/<emphasis>//g' $TMPFILE2 sed -i -e 's/<\/emphasis>/<\/emphasis>/g' $TMPFILE2 sed -i -e 's/<remark>//g' $TMPFILE2 sed -i -e 's/<\/remark>/<\/remark>/g' $TMPFILE2 sed -i -e 's/<command>//g' $TMPFILE2 sed -i -e 's/<\/command>/<\/command>/g' $TMPFILE2 #useful marker script; moves content between starthere and endhere to file target #sed -n '/starthere/,/endhere/ s/.*/&/w target' $TMPFILE2 mv $TMPFILE2 $OUTFILE systemtap-2.9/doc/beginners/000077500000000000000000000000001260561570600161465ustar00rootroot00000000000000systemtap-2.9/doc/beginners/Makefile.am000066400000000000000000000047411260561570600202100ustar00rootroot00000000000000# Makefile.am --- automake input file for systemtap tapset reference manual ## process this file with automake to produce Makefile.in DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap SBG = SystemTap_Beginners_Guide BEGIN_INSTALL_DIR = $(DOC_INSTALL_DIR)/$(SBG) if BUILD_DOCS if HAVE_XMLTO all: $(SBG)/index.html # move all the relevant files into the build directory $(SBG).pdf: # since we're not using publican, we'll have copy over the necessary folders mkdir -p build/en-US/xml cp en-US/*.xml build/en-US/xml/ cp en-US/*.ent build/en-US/xml/ cp -R en-US/xsl build/en-US/ cp -R en-US/extras build/en-US/xml/ cp -R en-US/images build/en-US/xml/ cp -R en-US/Common_Content build/en-US/xml # Since we're no longer using publican, workaround due to BZ920216 # is no longer needed (no longer need xvfb) if HAVE_FOP # skip xml validation since testing on rhel5 generated io errors with loading # dtd files from a URL. might have something to do with the issue mentioned # in BZ428168. xmlto --with-fop --skip-validation \ -x build/en-US/xsl/pdf.xsl pdf build/en-US/xml/$(SBG).xml endif # rely on the pdf generation to move all the necessary files into the right dirs $(SBG)/index.html: $(SBG).pdf xmlto --skip-validation \ -x build/en-US/xsl/html.xsl -o $(SBG) html build/en-US/xml/$(SBG).xml cp -R build/en-US/xml/images $(SBG) mkdir -p $(SBG)/Common_Content cp -R build/en-US/xml/Common_Content/images $(SBG)/Common_Content cp -R build/en-US/xml/Common_Content/css $(SBG)/Common_Content clean-local: rm -rf build/en-US/xml rm -rf build/en-US/xsl rm -f $(SBG).pdf rm -rf $(SBG) install-data-hook: $(MKDIR_P) $(DOC_INSTALL_DIR) if HAVE_FOP $(INSTALL_DATA) $(SBG).pdf $(DOC_INSTALL_DIR) endif $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG) $(INSTALL_DATA) $(SBG)/*.html $(DOC_INSTALL_DIR)/$(SBG) $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/images $(INSTALL_DATA) $(SBG)/images/*.png $(SBG)/images/*.svg \ $(DOC_INSTALL_DIR)/$(SBG)/images $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/css $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/images $(INSTALL_DATA) $(SBG)/Common_Content/css/*.css \ $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/css $(INSTALL_DATA) $(SBG)/Common_Content/images/*.png \ $(SBG)/Common_Content/images/*.svg \ $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/images $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/xsl $(INSTALL_DATA) en-US/xsl/*.xsl \ $(DOC_INSTALL_DIR)/$(SBG)/xsl uninstall-local: rm -f $(DOC_INSTALL_DIR)/$(SBG).pdf rm -rf $(DOC_INSTALL_DIR)/$(SBG) endif endif systemtap-2.9/doc/beginners/Makefile.in000066400000000000000000000376441260561570600202310ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am --- automake input file for systemtap tapset reference manual VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = doc/beginners DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DYNINST_CXXFLAGS = @DYNINST_CXXFLAGS@ DYNINST_LDFLAGS = @DYNINST_LDFLAGS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAVADIR = @JAVADIR@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LOCALEDIR = @LOCALEDIR@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIECFLAGS = @PIECFLAGS@ PIECXXFLAGS = @PIECXXFLAGS@ PIELDFLAGS = @PIELDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STAP_EXTRA_VERSION = @STAP_EXTRA_VERSION@ STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ avahi_CFLAGS = @avahi_CFLAGS@ avahi_LIBS = @avahi_LIBS@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxx11 = @cxx11@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dracutstap = @dracutstap@ dvidir = @dvidir@ elfutils_abs_srcdir = @elfutils_abs_srcdir@ exec_prefix = @exec_prefix@ have_dvips = @have_dvips@ have_fop = @have_fop@ have_jar = @have_jar@ have_javac = @have_javac@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_xmlto = @have_xmlto@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libvirt_CFLAGS = @libvirt_CFLAGS@ libvirt_LIBS = @libvirt_LIBS@ libxml2_CFLAGS = @libxml2_CFLAGS@ libxml2_LIBS = @libxml2_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ nss_CFLAGS = @nss_CFLAGS@ nss_LIBS = @nss_LIBS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ python = @python@ sbindir = @sbindir@ selinux_CFLAGS = @selinux_CFLAGS@ selinux_LIBS = @selinux_LIBS@ sharedstatedir = @sharedstatedir@ sqlite3_LIBS = @sqlite3_LIBS@ srcdir = @srcdir@ stap_LIBS = @stap_LIBS@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ staprun_LIBS = @staprun_LIBS@ subdirs = @subdirs@ support_section_question = @support_section_question@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap SBG = SystemTap_Beginners_Guide BEGIN_INSTALL_DIR = $(DOC_INSTALL_DIR)/$(SBG) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/beginners/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/beginners/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @BUILD_DOCS_FALSE@uninstall-local: @HAVE_XMLTO_FALSE@uninstall-local: @BUILD_DOCS_FALSE@clean-local: @HAVE_XMLTO_FALSE@clean-local: @BUILD_DOCS_FALSE@install-data-hook: @HAVE_XMLTO_FALSE@install-data-hook: clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-data-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ cscopelist-am ctags-am distclean distclean-generic dvi dvi-am \ html html-am info info-am install install-am install-data \ install-data-am install-data-hook install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@all: $(SBG)/index.html # move all the relevant files into the build directory @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@$(SBG).pdf: # since we're not using publican, we'll have copy over the necessary folders @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ mkdir -p build/en-US/xml @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp en-US/*.xml build/en-US/xml/ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp en-US/*.ent build/en-US/xml/ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp -R en-US/xsl build/en-US/ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp -R en-US/extras build/en-US/xml/ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp -R en-US/images build/en-US/xml/ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp -R en-US/Common_Content build/en-US/xml # Since we're no longer using publican, workaround due to BZ920216 # is no longer needed (no longer need xvfb) # skip xml validation since testing on rhel5 generated io errors with loading # dtd files from a URL. might have something to do with the issue mentioned # in BZ428168. @BUILD_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ xmlto --with-fop --skip-validation \ @BUILD_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ -x build/en-US/xsl/pdf.xsl pdf build/en-US/xml/$(SBG).xml # rely on the pdf generation to move all the necessary files into the right dirs @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@$(SBG)/index.html: $(SBG).pdf @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ xmlto --skip-validation \ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ -x build/en-US/xsl/html.xsl -o $(SBG) html build/en-US/xml/$(SBG).xml @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp -R build/en-US/xml/images $(SBG) @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ mkdir -p $(SBG)/Common_Content @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp -R build/en-US/xml/Common_Content/images $(SBG)/Common_Content @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ cp -R build/en-US/xml/Common_Content/css $(SBG)/Common_Content @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@clean-local: @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ rm -rf build/en-US/xml @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ rm -rf build/en-US/xsl @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ rm -f $(SBG).pdf @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ rm -rf $(SBG) @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@install-data-hook: @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR) @BUILD_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ $(INSTALL_DATA) $(SBG).pdf $(DOC_INSTALL_DIR) @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG) @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(INSTALL_DATA) $(SBG)/*.html $(DOC_INSTALL_DIR)/$(SBG) @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/images @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(INSTALL_DATA) $(SBG)/images/*.png $(SBG)/images/*.svg \ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(DOC_INSTALL_DIR)/$(SBG)/images @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/css @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/images @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(INSTALL_DATA) $(SBG)/Common_Content/css/*.css \ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/css @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(INSTALL_DATA) $(SBG)/Common_Content/images/*.png \ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(SBG)/Common_Content/images/*.svg \ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/images @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/xsl @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(INSTALL_DATA) en-US/xsl/*.xsl \ @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(DOC_INSTALL_DIR)/$(SBG)/xsl @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@uninstall-local: @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ rm -f $(DOC_INSTALL_DIR)/$(SBG).pdf @BUILD_DOCS_TRUE@@HAVE_XMLTO_TRUE@ rm -rf $(DOC_INSTALL_DIR)/$(SBG) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: systemtap-2.9/doc/langref.tex000066400000000000000000003163111260561570600163370ustar00rootroot00000000000000% SystemTap Language Reference \documentclass[twoside,english]{article} \usepackage{geometry} \geometry{verbose,letterpaper,tmargin=1.5in,bmargin=1.5in,lmargin=1in,rmargin=1in} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{array} \usepackage{varioref} \usepackage{float} \usepackage{makeidx} \usepackage{verbatim} \usepackage{url} \makeindex \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands. \newcommand{\noun}[1]{\textsc{#1}} %% Bold symbol macro for standard LaTeX users %\providecommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}} %% Because html converters don't know tabularnewline \providecommand{\tabularnewline}{\\} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \setlength{\parindent}{0pt} %\setlength{\parskip}{3pt plus 2pt minus 1pt} \setlength{\parskip}{5pt} % % this makes list spacing much better. % \newenvironment{my_itemize}{ \begin{itemize} \setlength{\itemsep}{1pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt}}{\end{itemize} } \newenvironment{vindent} {\begin{list}{}{\setlength{\listparindent}{6pt}} \item[]} {\end{list}} \usepackage[english]{babel} \makeatother \begin{document} \title{SystemTap Language Reference} \maketitle \newpage{} This document was derived from other documents contributed to the SystemTap project by employees of Red Hat, IBM and Intel.\newline Copyright \copyright\space 2007-2013 Red Hat Inc.\newline Copyright \copyright\space 2007-2009 IBM Corp.\newline Copyright \copyright\space 2007 Intel Corporation.\newline Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.\newline The GNU Free Documentation License is available from \url{http://www.gnu.org/licenses/fdl.html} or by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. \newpage{} \tableofcontents{} % \listoftables \newpage{} \section{SystemTap overview\label{sec:SystemTap-Overview}} \subsection{About this guide} This guide is a comprehensive reference of SystemTap's language constructs and syntax. The contents borrow heavily from existing SystemTap documentation found in manual pages and the tutorial. The presentation of information here provides the reader with a single place to find language syntax and recommended usage. In order to successfully use this guide, you should be familiar with the general theory and operation of SystemTap. If you are new to SystemTap, you will find the tutorial to be an excellent place to start learning. For detailed information about tapsets, see the manual pages provided with the distribution. For information about the entire collection of SystemTap reference material, see Section~\ref{sec:For-Further-Reference} \subsection{Reasons to use SystemTap} SystemTap provides infrastructure to simplify the gathering of information about a running Linux kernel so that it may be further analyzed. This analysis assists in identifying the underlying cause of a performance or functional problem. SystemTap was designed to eliminate the need for a developer to go through the tedious instrument, recompile, install, and reboot sequence normally required to collect this kind of data. To do this, it provides a simple command-line interface and scripting language for writing instrumentation for both kernel and user space. With SystemTap, developers, system administrators, and users can easily write scripts that gather and manipulate system data that is otherwise unavailable from standard Linux tools. Users of SystemTap will find it to be a significant improvement over older methods. \subsection{Event-action language} \index{language} SystemTap's language is strictly typed, declaration free, procedural, and inspired by dtrace and awk. Source code points or events in the kernel are associated with handlers, which are subroutines that are executed synchronously. These probes are conceptually similar to \char`\"{}breakpoint command lists\char`\"{} in the GDB debugger. There are two main outermost constructs: probes and functions. Within these, statements and expressions use C-like operator syntax and precedence. \subsection{Sample SystemTap scripts} \index{example scripts} Following are some example scripts that illustrate the basic operation of SystemTap. For more examples, see the examples/small\_demos/ directory in the source directory, the SystemTap wiki at \url{http://sourceware.org/systemtap/wiki/HomePage}, or the SystemTap War Stories at \url{http://sourceware.org/systemtap/wiki/WarStories} page. \subsubsection{Basic SystemTap syntax and control structures} The following code examples demonstrate SystemTap syntax and control structures. \begin{vindent} \begin{verbatim} global odds, evens probe begin { # "no" and "ne" are local integers for (i = 0; i < 10; i++) { if (i % 2) odds [no++] = i else evens [ne++] = i } delete odds[2] delete evens[3] exit() } probe end { foreach (x+ in odds) printf ("odds[%d] = %d", x, odds[x]) foreach (x in evens-) printf ("evens[%d] = %d", x, evens[x]) } \end{verbatim} \end{vindent} This prints: \begin{vindent} \begin{verbatim} odds[0] = 1 odds[1] = 3 odds[3] = 7 odds[4] = 9 evens[4] = 8 evens[2] = 4 evens[1] = 2 evens[0] = 0 \end{verbatim} \end{vindent} Note that all variable types are inferred, and that all locals and globals are initialized. Integers are set to 0 and strings are set to the empty string. \subsubsection{Primes between 0 and 49} \begin{vindent} \begin{verbatim} function isprime (x) { if (x < 2) return 0 for (i = 2; i < x; i++) { if (x % i == 0) return 0 if (i * i > x) break } return 1 } probe begin { for (i = 0; i < 50; i++) if (isprime (i)) printf("%d\n", i) exit() } \end{verbatim} \end{vindent} This prints: \begin{vindent} \begin{verbatim} 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 \end{verbatim} \end{vindent} \subsubsection{Recursive functions} \index{recursion} \begin{vindent} \begin{verbatim} function fibonacci(i) { if (i < 1) error ("bad number") if (i == 1) return 1 if (i == 2) return 2 return fibonacci (i-1) + fibonacci (i-2) } probe begin { printf ("11th fibonacci number: %d", fibonacci (11)) exit () } \end{verbatim} \end{vindent} This prints: \begin{vindent} \begin{verbatim} 11th fibonacci number: 118 \end{verbatim} \end{vindent} Any larger number input to the function may exceed the MAXACTION or MAXNESTING limits, which will be caught at run time and result in an error. For more about limits see Section~\ref{sub:SystemTap-safety}. \newpage{} \subsection{The stap command} \index{stap} The stap program is the front-end to the SystemTap tool. It accepts probing instructions written in its scripting language, translates those instructions into C code, compiles this C code, and loads the resulting kernel module into a running Linux kernel to perform the requested system trace or probe functions. You can supply the script in a named file, from standard input, or from the command line. The SystemTap script runs until one of the following conditions occurs: \begin{itemize} \item The user interrupts the script with a CTRL-C. \item The script executes the exit() function. \item The script encounters a sufficient number of soft errors. \item The monitored command started with the stap program's \texttt{\textbf{-c}} option exits. \end{itemize} The stap command does the following: \begin{itemize} \item Translates the script \item Generates and compiles a kernel module \item Inserts the module; output to stap's stdout \item CTRL-C unloads the module and terminates stap \end{itemize} For a full list of options to the stap command, see the stap(1) manual page. \subsection{Safety and security\label{sub:SystemTap-safety}} \index{limits} SystemTap is an administrative tool. It exposes kernel internal data structures and potentially private user information. It requires root privileges to actually run the kernel objects it builds using the \textbf{sudo} command, applied to the \textbf{staprun} program. staprun is a part of the SystemTap package, dedicated to module loading and unloading and kernel-to-user data transfer. Since staprun does not perform any additional security checks on the kernel objects it is given, do not give elevated privileges via sudo to untrusted users. The translator asserts certain safety constraints. \index{constraints}It ensures that no handler routine can run for too long, allocate memory, perform unsafe operations, or unintentionally interfere with the kernel. Use of script global variables is locked to protect against manipulation by concurrent probe handlers. Use of \emph{guru mode} constructs such as embedded C (see Section~\ref{sub:Embedded-C}) can violate these constraints, leading to a kernel crash or data corruption. The resource use limits are set by macros in the generated C code. These may be overridden with the -D flag. The following list describes a selection of these macros: \textbf{MAXNESTING} -- The maximum number of recursive function call levels. The default is 10. \textbf{MAXSTRINGLEN} -- The maximum length of strings. The default is 256 bytes for 32 bit machines and 512 bytes for all other machines. \textbf{MAXTRYLOCK} -- The maximum number of iterations to wait for locks on global variables before declaring possible deadlock and skipping the probe. The default is 1000. \textbf{MAXACTION} -- The maximum number of statements to execute during any single probe hit. The default is 1000. \textbf{MAXMAPENTRIES} -- The maximum number of rows in an array if the array size is not specified explicitly when declared. The default is 2048. \textbf{MAXERRORS} -- The maximum number of soft errors before an exit is triggered. The default is 0. \textbf{MAXSKIPPED} -- The maximum number of skipped reentrant probes before an exit is triggered. The default is 100. \textbf{MINSTACKSPACE} -- The minimum number of free kernel stack bytes required in order to run a probe handler. This number should be large enough for the probe handler's own needs, plus a safety margin. The default is 1024. If something goes wrong with stap or staprun after a probe has started running, you may safely kill both user processes, and remove the active probe kernel module with the rmmod command. Any pending trace messages may be lost. \section{Types of SystemTap scripts\label{sec:Types-of-SystemTap}} \subsection{Probe scripts} Probe scripts are analogous to programs; these scripts identify probe points and associated handlers. \subsection{Tapset scripts} Tapset scripts are libraries of probe aliases and auxiliary functions. The /usr/share/systemtap/tapset directory contains tapset scripts. While these scripts look like regular SystemTap scripts, they cannot be run directly. \section{Components of a SystemTap script} The main construct in the scripting language identifies probes. Probes associate abstract events with a statement block, or probe handler, that is to be executed when any of those events occur. The following example shows how to trace entry and exit from a function using two probes. \begin{vindent} \begin{verbatim} probe kernel.function("sys_mkdir").call { log ("enter") } probe kernel.function("sys_mkdir").return { log ("exit") } \end{verbatim} \end{vindent} To list the probe-able functions in the kernel, use the listing option (\texttt{\textbf{-l}}). For example: \begin{vindent} \begin{verbatim} $ stap -l 'kernel.function("*")' | sort \end{verbatim} \end{vindent} \subsection{Probe definitions} The general syntax is as follows. \begin{vindent} \begin{verbatim} probe PROBEPOINT [, PROBEPOINT] { [STMT ...] } \end{verbatim} \end{vindent} Events are specified in a special syntax called \emph{probe points}. There are several varieties of probe points defined by the translator, and tapset scripts may define others using aliases. The provided probe points are listed in the \texttt{stapprobes(3)}, \texttt{tapset::*(3stap)}, and \texttt{probe::*(3stap)} man pages. The STMT statement block is executed whenever {\i any} of the named PROBEPOINT events occurs. The probe handler is interpreted relative to the context of each event. For events associated with kernel code, this context may include variables defined in the source code at that location. These \emph{target variables}\index{target variables} (or ``context variables'') are presented to the script as variables whose names are prefixed with a dollar sign (\$). They may be accessed only if the compiler used to compile the kernel preserved them, despite optimization. This is the same constraint imposed by a debugger when working with optimized code. Other events may have very little context. \subsection{Probe aliases\label{sub:Probe-aliases}} \index{probe aliases} The general syntax is as follows. \begin{vindent} \begin{verbatim} probe = { } probe += { } \end{verbatim} \end{vindent} New probe points may be defined using \emph{aliases}. A probe point alias looks similar to probe definitions, but instead of activating a probe at the given point, it defines a new probe point name as an alias to an existing one. New probe aliases may refer to one or more existing probe aliases. Multiple aliases may share the same underlying probe points. The following is an example. \begin{vindent} \begin{verbatim} probe socket.sendmsg = kernel.function ("sock_sendmsg") { ... } probe socket.do_write = kernel.function ("do_sock_write") { ... } probe socket.send = socket.sendmsg, socket.do_write { ... } \end{verbatim} \end{vindent} There are two types of aliases, the prologue style and the epilogue style which are identified by the equal sign (\texttt{\textbf{=}}) and \char`\"{}\texttt{\textbf{+=}}\char`\"{} respectively. A probe that uses a probe point alias will create an actual probe, with the handler of the alias \emph{pre-pended}. This pre-pending behavior serves several purposes. It allows the alias definition to pre-process the context of the probe before passing control to the handler specified by the user. This has several possible uses, demonstrated as follows. \begin{vindent} \begin{verbatim} # Skip probe unless given condition is met: if ($flag1 != $flag2) next # Supply values describing probes: name = "foo" # Extract the target variable to a plain local variable: var = $var \end{verbatim} \end{vindent} \subsubsection{Prologue-style aliases (=)} \index{prologue-style aliases} \index{=} For a prologue style alias, the statement block that follows an alias definition is implicitly added as a prologue to any probe that refers to the alias. The following is an example. \begin{vindent} \begin{verbatim} # Defines a new probe point syscall.read, which expands to # kernel.function("sys_read"), with the given statement as # a prologue. # probe syscall.read = kernel.function("sys_read") { fildes = $fd } \end{verbatim} \end{vindent} \subsubsection{Epilogue-style aliases (+=)} \index{epilogue-style aliases} \index{+=} The statement block that follows an alias definition is implicitly added as an epilogue to any probe that refers to the alias. It is not useful to define new variables there (since no subsequent code will see them), but rather the code can take action based upon variables set by the prologue or by the user code. The following is an example: \begin{vindent} \begin{verbatim} # Defines a new probe point with the given statement as an # epilogue. # probe syscall.read += kernel.function("sys_read") { if (traceme) println ("tracing me") } \end{verbatim} \end{vindent} \subsubsection{Probe alias usage} A probe alias is used the same way as any built-in probe type, by naming it: \begin{vindent} \begin{verbatim} probe syscall.read { printf("reading fd=%d\n", fildes) } \end{verbatim} \end{vindent} \subsubsection{Alias suffixes} It is possible to include a suffix with a probe alias invocation. If only the initial part of a probe point matches an alias, the remainder is treated as a suffix and attached to the underlying probe point(s) when the alias is expanded. For example: \begin{vindent} \begin{verbatim} /* Define an alias: */ probe sendrecv = tcp.sendmsg, tcp.recvmsg { ... } /* Use the alias in its basic form: */ probe sendrecv { ... } /* Use the alias with an additional suffix: */ probe sendrecv.return { ... } \end{verbatim} \end{vindent} Here, the second use of the probe alias is equivalent to writing \verb+probe tcp.sendmsg.return, tcp.recvmsg.return+. As another example, the probe points \verb+tcp.sendmsg.return+ and \verb+tcp.recvmsg.return+ are actually defined as aliases in the tapset \verb+tcp.stp+. They expand to a probe point of the form \verb+kernel.function("...").return+, so they can also be suffixed: \begin{vindent} \begin{verbatim} probe tcp.sendmsg.return.maxactive(10) { printf("returning from sending %d bytes\n", size) } \end{verbatim} \end{vindent} Here, the probe point expands to \verb+kernel.function("tcp_sendmsg").return.maxactive(10)+. \subsubsection{Alias suffixes and wildcards} When expanding wildcards, SystemTap generally avoids considering alias suffixes in the expansion. The exception is when a wildcard element is encountered that does not have any ordinary expansions. Consider the following example: \begin{vindent} \begin{verbatim} probe some_unrelated_probe = ... { ... } probe myprobe = syscall.read { ... } probe myprobe.test = some_unrelated_probe { ... } probe myprobe.* { ... } probe myprobe.ret* { ... } \end{verbatim} \end{vindent} Here, \verb+return+ would be a valid suffix for \verb+myprobe+. The wildcard \verb+myprobe.*+ matches the ordinary alias \verb+myprobe.test+, and hence the suffix expansion \verb+myprobe.return+ is not included. Conversely, \verb+myprobe.ret*+ does not match any ordinary aliases, so the suffix \verb+myprobe.return+ is included as an expansion. \subsection{Variables\label{sub:Variables}} \index{variables} Identifiers for variables and functions are alphanumeric sequences, and may include the underscore (\_) and the dollar sign (\$) characters. They may not start with a plain digit. Each variable is by default local to the probe or function statement block where it is mentioned, and therefore its scope and lifetime is limited to a particular probe or function invocation. Scalar variables are implicitly typed as either string or integer. Associative arrays also have a string or integer value, and a tuple of strings or integers serves as a key. Arrays must be declared as global. Local arrays\index{local arrays} are not allowed. The translator performs \emph{type inference} on all identifiers, including array indexes and function parameters. Inconsistent type-related use of identifiers results in an error. Variables may be declared global. Global variables are shared among all probes and remain instantiated as long as the SystemTap session. There is one namespace for all global variables, regardless of the script file in which they are found. Because of possible concurrency limits, such as multiple probe handlers, each global variable used by a probe is automatically read- or write-locked while the handler is running. A global declaration may be written at the outermost level anywhere in a script file, not just within a block of code. Global variables which are written but never read will be displayed automatically at session shutdown. The following declaration marks \texttt{var1} and \texttt{var2} as global. The translator will infer a value type for each, and if the variable is used as an array, its key types. \begin{vindent} \begin{verbatim} global var1[=], var2[=] \end{verbatim} \end{vindent} \subsubsection{Unused variables} \index{unused variables} The SystemTap translator removes unused variables. Global variable that are never written or read are discarded. Every local variables where the variable is only written but never read are also discarded. This optimization prunes unused variables defined in the probe aliases, but never used in the probe handler. If desired, this optimization can disabled with the \texttt{-u} option. \subsection{Auxiliary functions\label{sub:Auxiliary-functions}} \index{auxiliary functions} General syntax: \begin{vindent} \begin{verbatim} function [:] ( [:], ... ) { } \end{verbatim} \end{vindent} SystemTap scripts may define subroutines to factor out common work. Functions may take any number of scalar arguments, and must return a single scalar value. Scalars in this context are integers or strings. For more information on scalars, see Section~\ref{sub:Variables} and Section~\ref{sub:Data-types}\texttt{.} The following is an example function declaration. \begin{vindent} \begin{verbatim} function thisfn (arg1, arg2) { return arg1 + arg2 } \end{verbatim} \end{vindent} Note the general absence of type declarations, which are inferred by the translator. If desired, a function definition may include explicit type declarations for its return value, its arguments, or both. This is helpful for embedded-C functions. In the following example, the type inference engine need only infer the type of arg2, a string. \begin{vindent} \begin{verbatim} function thatfn:string(arg1:long, arg2) { return sprintf("%d%s", arg1, arg2) } \end{verbatim} \end{vindent} Functions may call others or themselves recursively, up to a fixed nesting limit. See Section~\ref{sub:SystemTap-safety}. \subsection{Embedded C\label{sub:Embedded-C}} \index{embedded C} SystemTap supports a \emph{guru\index{guru mode} mode} where script safety features such as code and data memory reference protection are removed. Guru mode is set by passing the \textbf{-g} option to the stap command. When in guru mode, the translator accepts C code enclosed between {}``\%\{'' and {}``\%\}'' markers in the top level of the script file. The embedded C code is transcribed verbatim, without analysis, in sequence, into the top level of the generated C code. Thus, guru mode may be useful for adding \#include instructions at the top level of the generated module, or providing auxiliary definitions for use by other embedded code. When in guru mode, embedded C code blocks are also allowed as the body of a SystemTap function (as described in Section~\ref{sub:Embedded-C-Functions}), and in place of any SystemTap expression. In the latter case, the code block must contain a valid expression according to C syntax. Here is an example of the various permitted methods of embedded C code inclusion: \begin{vindent} \begin{verbatim} %{ #include #include %} /* <-- top level */ /* Reads the char value stored at a given address: */ function __read_char:long(addr:long) %{ /* pure */ STAP_RETURN(kderef(sizeof(char), STAP_ARG_addr)); CATCH_DEREF_FAULT (); %} /* <-- function body */ /* Determines whether an IP packet is TCP, based on the iphdr: */ function is_tcp_packet:long(iphdr) { protocol = @cast(iphdr, "iphdr")->protocol return (protocol == %{ IPPROTO_TCP %}) /* <-- expression */ } \end{verbatim} \end{vindent} \subsection{Embedded C functions\label{sub:Embedded-C-Functions}} General syntax: \begin{vindent} \begin{verbatim} function : ( :, ... ) %{ %} \end{verbatim} \end{vindent} Embedded C code is permitted in a function body. In that case, the script language body is replaced entirely by a piece of C code enclosed between {}``\%\{'' and {}``\%\}'' markers. The enclosed code may do anything reasonable and safe as allowed by the C parser. There are a number of undocumented but complex safety constraints on concurrency, resource consumption and runtime limits that are applied to code written in the SystemTap language. These constraints are not applied to embedded C code, so use embedded C code with extreme caution. Be especially careful when dereferencing pointers. Use the kread() macro to dereference any pointers that could potentially be invalid or dangerous. If you are unsure, err on the side of caution and use kread(). The kread() macro is one of the safety mechanisms used in code generated by embedded C. It protects against pointer accesses that could crash the system. For example, to access the pointer chain \texttt{name = skb->dev->name} in embedded C, use the following code. \begin{vindent} \begin{verbatim} struct net_device *dev; char *name; dev = kread(&(skb->dev)); name = kread(&(dev->name)); \end{verbatim} \end{vindent} The memory locations reserved for input and output values are provided to a function using macros named \texttt{STAP\_ARG\_foo}\index{STAP_ARG_} (for arguments named \texttt{foo}) and \texttt{STAP\_RETVALUE}\index{STAP_RETVALUE}. Errors may be signalled with \texttt{STAP\_ERROR}. Output may be written with \texttt{STAP\_PRINTF}. The function may return early with \texttt{STAP\_RETURN}. Here are some examples: \begin{vindent} \begin{verbatim} function integer_ops:long (val) %{ STAP_PRINTF("%d\n", STAP_ARG_val); STAP_RETVALUE = STAP_ARG_val + 1; if (STAP_RETVALUE == 4) STAP_ERROR("wrong guess: %d", (int) STAP_RETVALUE); if (STAP_RETVALUE == 3) STAP_RETURN(0); STAP_RETVALUE ++; %} function string_ops:string (val) %{ strlcpy (STAP_RETVALUE, STAP_ARG_val, MAXSTRINGLEN); strlcat (STAP_RETVALUE, "one", MAXSTRINGLEN); if (strcmp (STAP_RETVALUE, "three-two-one")) STAP_RETURN("parameter should be three-two-"); %} function no_ops () %{ STAP_RETURN(); /* function inferred with no return value */ %} \end{verbatim} \end{vindent} The function argument and return value types should be stated if the translator cannot infer them from usage. The translator does not analyze the embedded C code within the function. You should examine C code generated for ordinary script language functions to write compatible embedded-C. Usually, all SystemTap functions and probes run with interrupts disabled, thus you cannot call functions that might sleep within the embedded C. \subsection{Embedded C pragma comments} Embedded C blocks may contain various markers to assert optimization and safety properties. \begin{itemize} \item \verb+/* pure */+ means that the C code has no side effects and may be elided entirely if its value is not used by script code. \item \verb+/* unprivileged */+ means that the C code is so safe that even unprivileged users are permitted to use it. (This is useful, in particular, to define an embedded-C function inside a tapset that may be used by unprivileged code.) \item \verb+/* myproc-unprivileged */+ means that the C code is so safe that even unprivileged users are permitted to use it, provided that the target of the current probe is within the user's own process. \item \verb+/* guru */+ means that the C code is so unsafe that a systemtap user must specify \verb+-g+ (guru mode) to use this, even if the C code is being exported from a tapset. \item \verb+/* unmangled */+, used in an embedded-C function, means that the legacy (pre-1.8) argument access syntax should be made available inside the function. Hence, in addition to \verb+STAP_ARG_foo+ and \verb+STAP_RETVALUE+ one can use \verb+THIS->foo+ and \verb+THIS->__retvalue+ respectively inside the function. This is useful for quickly migrating code written for SystemTap version 1.7 and earlier. \item \verb+/* string */+ in embedded-C expressions only, means that the expression has \verb+const char *+ type and should be treated as a string value, instead of the default long numeric. \end{itemize} \section{Probe points\label{sec:Probe-Points}} \index{probe points} \subsection{General syntax} \index{probe syntax} The general probe point syntax is a dotted-symbol sequence. This divides the event namespace into parts, analogous to the style of the Domain Name System. Each component identifier is parameterized by a string or number literal, with a syntax analogous to a function call. The following are all syntactically valid probe points. \begin{vindent} \begin{verbatim} kernel.function("foo") kernel.function("foo").return module{"ext3"}.function("ext3_*") kernel.function("no_such_function") ? syscall.* end timer.ms(5000) \end{verbatim} \end{vindent} Probes may be broadly classified into \emph{synchronous}\index{synchronous} or \emph{asynchronous}.\index{asynchronous} A synchronous event occurs when any processor executes an instruction matched by the specification. This gives these probes a reference point (instruction address) from which more contextual data may be available. Other families of probe points refer to asynchronous events such as timers, where no fixed reference point is related. Each probe point specification may match multiple locations, such as by using wildcards or aliases, and all are probed. A probe declaration may contain several specifications separated by commas, which are all probed. \subsubsection{Prefixes} \index{prefixes} Prefixes specify the probe target, such as \textbf{kernel}, \textbf{module}, \textbf{timer}, and so on. \subsubsection{Suffixes} \index{suffixes} Suffixes further qualify the point to probe, such as \textbf{.return} for the exit point of a probed function. The absence of a suffix implies the function entry point. \subsubsection{Wildcarded file names, function names} \index{wildcards} A component may include an asterisk ({*}) character, which expands to other matching probe points. An example follows. \begin{vindent} \begin{verbatim} kernel.syscall.* kernel.function("sys_*) \end{verbatim} \end{vindent} \subsubsection{Optional probe points\label{sub:Optional-probe-points}} \index{?} A probe point may be followed by a question mark (?) character, to indicate that it is optional, and that no error should result if it fails to expand. This effect passes down through all levels of alias or wildcard expansion. The following is the general syntax. \begin{vindent} \begin{verbatim} kernel.function("no_such_function") ? \end{verbatim} \end{vindent} \subsection{Built-in probe point types (DWARF probes)} \index{built-in probes} \index{dwarf probes} \label{dwarfprobes} This family of probe points uses symbolic debugging information for the target kernel or module, as may be found in executables that have not been stripped, or in the separate \textbf{debuginfo} packages. They allow logical placement of probes into the execution path of the target by specifying a set of points in the source or object code. When a matching statement executes on any processor, the probe handler is run in that context. Points in a kernel are identified by module, source file, line number, function name or some combination of these. Here is a list of probe point specifications currently supported: \begin{vindent} \begin{verbatim} kernel.function(PATTERN) kernel.function(PATTERN).call kernel.function(PATTERN).return kernel.function(PATTERN).return.maxactive(VALUE) kernel.function(PATTERN).inline kernel.function(PATTERN).label(LPATTERN) module(MPATTERN).function(PATTERN) module(MPATTERN).function(PATTERN).call module(MPATTERN).function(PATTERN).return.maxactive(VALUE) module(MPATTERN).function(PATTERN).inline kernel.statement(PATTERN) kernel.statement(ADDRESS).absolute module(MPATTERN).statement(PATTERN) \end{verbatim} \end{vindent} The \textbf{.function} variant places a probe near the beginning of the named function, so that parameters are available as context variables. The \textbf{.return} variant places a probe at the moment of return from the named function, so the return value is available as the \$return context variable. The entry parameters are also available, though the function may have changed their values. Return probes may be further qualified with \textbf{.maxactive}, which specifies how many instances of the specified function can be probed simultaneously. You can leave off \textbf{.maxactive} in most cases, as the default (\textbf{KRETACTIVE}) should be sufficient. However, if you notice an excessive number of skipped probes, try setting \textbf{.maxactive} to incrementally higher values to see if the number of skipped probes decreases. The \textbf{.inline} modifier for \textbf{.function} filters the results to include only instances of inlined functions. The \textbf{.call} modifier selects the opposite subset. The \textbf{.exported} modifier filters the results to include only exported functions. Inline functions do not have an identifiable return point, so \textbf{.return} is not supported on \textbf{.inline} probes. The \textbf{.statement} variant places a probe at the exact spot, exposing those local variables that are visible there. In the above probe descriptions, MPATTERN stands for a string literal that identifies the loaded kernel module of interest and LPATTERN stands for a source program label. Both MPATTERN and LPATTERN may include asterisk ({*}), square brackets \char`\"{}{[}]\char`\"{}, and question mark (?) wildcards. PATTERN stands for a string literal that identifies a point in the program. It is composed of three parts: \begin{enumerate} \item The first part is the name of a function, as would appear in the nm program's output. This part may use the asterisk and question mark wildcard operators to match multiple names. \item The second part is optional, and begins with the ampersand (@) character. It is followed by the path to the source file containing the function, which may include a wildcard pattern, such as mm/slab{*}. In most cases, the path should be relative to the top of the linux source directory, although an absolute path may be necessary for some kernels. If a relative pathname doesn't work, try absolute. \item The third part is optional if the file name part was given. It identifies the line number in the source file, preceded by a ``:'' or ``+''. The line number is assumed to be an absolute line number if preceded by a ``:'', or relative to the entry of the function if preceded by a ``+''. All the lines in the function can be matched with ``:*''. A range of lines x through y can be matched with ``:x-y''. \end{enumerate} Alternately, specify PATTERN as a numeric constant to indicate a relative module address or an absolute kernel address. Some of the source-level variables, such as function parameters, locals, or globals visible in the compilation unit, are visible to probe handlers. Refer to these variables by prefixing their name with a dollar sign within the scripts. In addition, a special syntax allows limited traversal of structures, pointers, arrays, taking the address of a variable or pretty printing a whole structure. \texttt{\$var} refers to an in-scope variable var. If it is a type similar to an integer, it will be cast to a 64-bit integer for script use. Pointers similar to a string (char {*}) are copied to SystemTap string values by the \texttt{kernel\_string()} or \texttt{user\_string()} functions. \texttt{@var("varname")} is an alternative syntax for \texttt{\$varname}. It can also be used to access global variables in a particular compile unit (CU). \texttt{@var("varname@src/file.c")} refers to the global (either file local or external) variable varname defined when the file src/file.c was compiled. The CU in which the variable is resolved is the first CU in the module of the probe point which matches the given file name at the end and has the shortest file name path (e.g. given \texttt{@var("foo@bar/baz.c")} and CUs with file name paths \texttt{src/sub/module/bar/baz.c} and \texttt{src/bar/baz.c} the second CU will be chosen to resolve \texttt{foo}). \texttt{\$var->field} or \texttt{@var("var@file.c")->field} traverses a structure's field. The indirection operator may be repeated to follow additional levels of pointers. \texttt{\$var{[}N]} or \texttt{@var("var@file.c"){[}N]} indexes into an array. The index is given with a literal number. \texttt{\&\$var} or \texttt{\&@var("var@file.c")} provides the address of a variable as a long. It can also be used in combination with field access or array indexing to provide the address of a particular field or an element in an array with \texttt{\&var->field}, \texttt{\&@var("var@file.c"){[}N]} or a combination of those accessors. Using a single \texttt{\$} or a double \texttt{\$\$} suffix provides a swallow or deep string representation of the variable data type. Using a single \texttt{\$}, as in \texttt{\$var\$}, will provide a string that only includes the values of all basic type values of fields of the variable structure type but not any nested complex type values (which will be represented with \texttt{\{...\}}). Using a double \texttt{\$\$}, as in \texttt{@var("var")\$\$} will provide a string that also includes all values of nested data types. \texttt{\$\$vars} expands to a character string that is equivalent to \texttt{sprintf("parm1=\%x ... parmN=\%x var1=\%x ... varN=\%x", \$parm1, ..., \$parmN, \$var1, ..., \$varN)} \texttt{\$\$locals} expands to a character string that is equivalent to \texttt{sprintf("var1=\%x ... varN=\%x", \$var1, ..., \$varN)} \texttt{\$\$parms} expands to a character string that is equivalent to \texttt{sprintf("parm1=\%x ... parmN=\%x", \$parm1, ..., \$parmN)} \subsubsection{kernel.function, module().function} \index{kernel.function} \index{module().function} The \textbf{.function} variant places a probe near the beginning of the named function, so that parameters are available as context variables. General syntax: \begin{vindent} \begin{verbatim} kernel.function("func[@file]") module("modname").function("func[@file]") \end{verbatim} \end{vindent} Examples: \begin{vindent} \begin{verbatim} # Refers to all kernel functions with "init" or "exit" # in the name: kernel.function("*init*"), kernel.function("*exit*") # Refers to any functions within the "kernel/time.c" # file that span line 240: kernel.function("*@kernel/time.c:240") # Refers to all functions in the ext3 module: module("ext3").function("*") \end{verbatim} \end{vindent} \subsubsection{kernel.statement, module().statement} \index{kernel.statement} \index{module().statement} The \textbf{.statement} variant places a probe at the exact spot, exposing those local variables that are visible there. General syntax: \begin{vindent} \begin{verbatim} kernel.statement("func@file:linenumber") module("modname").statement("func@file:linenumber") \end{verbatim} \end{vindent} Example: \begin{vindent} \begin{verbatim} # Refers to the statement at line 296 within the # kernel/time.c file: kernel.statement("*@kernel/time.c:296") # Refers to the statement at line bio_init+3 within the fs/bio.c file: kernel.statement("bio_init@fs/bio.c+3") \end{verbatim} \end{vindent} \subsection{Function return probes} \index{return probes} The \texttt{.return} variant places a probe at the moment of return from the named function, so that the return value is available as the \$return context variable. The entry parameters are also accessible in the context of the return probe, though their values may have been changed by the function. Inline functions do not have an identifiable return point, so \texttt{.return} is not supported on \texttt{.inline} probes. \subsection{DWARF-less probing} \index{DWARF-less probing} In the absence of debugging information, you can still use the \emph{kprobe} family of probes to examine the entry and exit points of kernel and module functions. You cannot look up the arguments or local variables of a function using these probes. However, you can access the parameters by following this procedure: When you're stopped at the entry to a function, you can refer to the function's arguments by number. For example, when probing the function declared: \begin{vindent} \begin{verbatim} asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count) \end{verbatim} \end{vindent} You can obtain the values of \texttt{fd}, \texttt{buf}, and \texttt{count}, respectively, as \texttt{uint\_arg(1)}, \texttt{pointer\_arg(2)}, and \texttt{ulong\_arg(3)}. In this case, your probe code must first call \texttt{asmlinkage()}, because on some architectures the asmlinkage attribute affects how the function's arguments are passed. When you're in a return probe, \texttt{\$return} isn't supported without DWARF, but you can call \texttt{returnval()} to get the value of the register in which the function value is typically returned, or call \texttt{returnstr()} to get a string version of that value. And at any code probepoint, you can call \texttt{{register("regname")}} to get the value of the specified CPU register when the probe point was hit. \texttt{u\_register("regname")} is like \texttt{register("regname")}, but interprets the value as an unsigned integer. SystemTap supports the following constructs: \begin{vindent} \begin{verbatim} kprobe.function(FUNCTION) kprobe.function(FUNCTION).return kprobe.module(NAME).function(FUNCTION) kprobe.module(NAME).function(FUNCTION).return kprobe.statement(ADDRESS).absolute \end{verbatim} \end{vindent} Use \textbf{.function} probes for kernel functions and \textbf{.module} probes for probing functions of a specified module. If you do not know the absolute address of a kernel or module function, use \textbf{.statement} probes. Do not use wildcards in \textit{FUNCTION} and \textit{MODULE} names. Wildcards cause the probe to not register. Also, statement probes are available only in guru mode. \subsection{Userspace probing} \index{userspace probing} \index{process} Support for userspace probing is supported on kernels that are configured to include the utrace or uprobes extensions. \subsubsection{Begin/end variants} \label{sec:beginendvariants} Constructs: \begin{vindent} \begin{verbatim} process.begin process("PATH").begin process(PID).begin process.thread.begin process("PATH").thread.begin process(PID).thread.begin process.end process("PATH").end process(PID).end process.thread.end process("PATH").thread.end process(PID).thread.end \end{verbatim} \end{vindent} The \texttt{.begin} variant is called when a new process described by \texttt{PID} or \texttt{PATH} is created. If no \texttt{PID} or \texttt{PATH} argument is specified (for example \texttt{process.begin}), the probe flags any new process being spawned. The \texttt{.thread.begin} variant is called when a new thread described by \texttt{PID} or \texttt{PATH} is created. The \texttt{.end} variant is called when a process described by \texttt{PID} or \texttt{PATH} dies. The \texttt{.thread.end} variant is called when a thread described by \texttt{PID} or \texttt{PATH} dies. \subsubsection{Syscall variants} \label{sec:syscallvariants} Constructs: \begin{vindent} \begin{verbatim} process.syscall process("PATH").syscall process(PID).syscall process.syscall.return process("PATH").syscall.return process(PID).syscall.return \end{verbatim} \end{vindent} The \texttt{.syscall} variant is called when a thread described by \texttt{PID} or \texttt{PATH} makes a system call. The system call number is available in the \texttt{\$syscall} context variable. The first six arguments of the system call are available in the \texttt{\$argN} parameter, for example \texttt{\$arg1}, \texttt{\$arg2}, and so on. The \texttt{.syscall.return} variant is called when a thread described by \texttt{PID} or \texttt{PATH} returns from a system call. The system call number is available in the \texttt{\$syscall} context variable. The return value of the system call is available in the \texttt{\$return} context variable. \subsubsection{Function/statement variants} \label{sec:function-statement} Constructs: \begin{vindent} \begin{verbatim} process("PATH").function("NAME") process("PATH").statement("*@FILE.c:123") process("PATH").function("*").return process("PATH").function("myfun").label("foo") \end{verbatim} \end{vindent} Full symbolic source-level probes in userspace programs and shared libraries are supported. These are exactly analogous to the symbolic DWARF-based kernel or module probes described previously and expose similar contextual \texttt{\$-variables}. See Section~\ref{dwarfprobes} for more information Here is an example of prototype symbolic userspace probing support: \begin{vindent} \begin{verbatim} # stap -e 'probe process("ls").function("*").call { log (probefunc()." ".$$parms) }' \ -c 'ls -l' \end{verbatim} \end{vindent} To run, this script requires debugging information for the named program and utrace support in the kernel. If you see a "pass 4a-time" build failure, check that your kernel supports utrace. \subsubsection{Absolute variant} \label{sec:absolutevariant} A non-symbolic probe point such as \texttt{process(PID).statement(ADDRESS).absolute} is analogous to \newline\texttt{kernel.statement(ADDRESS).absolute} in that both use raw, unverified virtual addresses and provide no \texttt{\$variables}. The target \texttt{PID} parameter must identify a running process and \texttt{ADDRESS} must identify a valid instruction address. All threads of the listed process will be probed. This is a guru mode probe. \subsubsection{Process probe paths} \label{sec:paths} For all process probes, \texttt{PATH} names refer to executables that are searched the same way that shells do: the explicit path specified if the path name begins with a slash (/) character sequence; otherwise \texttt{\$PATH} is searched. For example, the following probe syntax: \begin{vindent} \begin{verbatim} probe process("ls").syscall {} probe process("./a.out").syscall {} \end{verbatim} \end{vindent} works the same as: \begin{vindent} \begin{verbatim} probe process("/bin/ls").syscall {} probe process("/my/directory/a.out").syscall {} \end{verbatim} \end{vindent} If a process probe is specified without a \texttt{PID} or \texttt{PATH} parameter, all user threads are probed. However, if systemtap is invoked in target process mode, process probes are restricted to the process hierarchy associated with the target process. If stap is running in \texttt{--unprivileged} mode, only processes owned by the current user are selected. \subsubsection{Target process mode} \label{sec:targetprocessmode} Target process mode (invoked with \texttt{stap -c CMD} or \texttt{-x PID}) implicitly restricts all \texttt{process.*} probes to the given child process. It does not affect \texttt{kernel.*} or other probe types. The \texttt{CMD} string is normally run directly, rather than from a ``\texttt{/bin/sh -c}'' sub-shell, since utrace and uprobe probes receive a fairly "clean" event stream. If meta-characters such as redirection operators are present in \texttt{CMD}, ``\texttt{/bin/sh -c CMD}'' is still used, and utrace and uprobe probes will receive events from the shell. For example: \begin{vindent} \begin{verbatim} % stap -e 'probe process.syscall, process.end { printf("%s %d %s\n", execname(), pid(), pp())}' \ -c ls \end{verbatim} \end{vindent} Here is the output from this command: \begin{vindent} \begin{verbatim} ls 2323 process.syscall ls 2323 process.syscall ls 2323 process.end \end{verbatim} \end{vindent} If \texttt{PATH} names a shared library, all processes that map that shared library can be probed. If dwarf debugging information is installed, try using a command with this syntax: \begin{vindent} \begin{verbatim} probe process("/lib64/libc-2.8.so").function("....") { ... } \end{verbatim} \end{vindent} This command probes all threads that call into that library. Typing ``\texttt{stap -c CMD}'' or ``\texttt{stap -x PID}'' restricts this to the target command and descendants only. You can use \texttt{\$\$vars} and others. You can provide the location of debug information to the stap command with the \texttt{-d DIRECTORY} option. To qualify a probe point to a location in a library required by a particular process try using a command with this syntax: \begin{vindent} \begin{verbatim} probe process("...").library("...").function("....") { ... } \end{verbatim} \end{vindent} The library name may use wildcards. The first syntax in the following will probe the functions in the program linkage table of a particular process. The second syntax will also add the program linkage tables of libraries required by that process. .plt("...") can be specified to match particular plt entries. \begin{vindent} \begin{verbatim} probe process("...").plt { ... } probe process("...").plt process("...").library("...").plt { ... } \end{verbatim} \end{vindent} \subsubsection{Instruction probes} \label{sec:insnprobes} Constructs: \begin{vindent} \begin{verbatim} process("PATH").insn process(PID).insn process("PATH").insn.block process(PID).insn.block \end{verbatim} \end{vindent} The \texttt{process().insn} and \texttt{process().insn.block} probes inspect the process after each instruction or block of instructions is executed. These probes are not implemented on all architectures. If they are not implemented on your system, you will receive an error message when the script starts. The \texttt{.insn} probe is called for every single-stepped instruction of the process described by \texttt{PID} or \texttt{PATH}. The \texttt{.insn.block} probe is called for every block-stepped instruction of the process described by \texttt{PID} or \texttt{PATH}. To count the total number of instructions that a process executes, type a command similar to: \begin{vindent} \begin{verbatim} $ stap -e 'global steps; probe process("/bin/ls").insn {steps++} probe end {printf("Total instructions: %d\n", steps);}' \ -c /bin/ls \end{verbatim} \end{vindent} Using this feature will significantly slow process execution. \subsubsection{Static userspace probing} \label{sec:staticuserspace} You can probe symbolic static instrumentation compiled into programs and shared libraries with the following syntax: \begin{vindent} \begin{verbatim} process("PATH").mark("LABEL") \end{verbatim} \end{vindent} The \texttt{.mark} variant is called from a static probe defined in the application by \texttt{STAP\_PROBE1(handle,LABEL,arg1)}. \texttt{STAP\_PROBE1} is defined in the sdt.h file. The parameters are: \begin{tabular}{|l|r|c|} Parameter & Definition \\ \hline \texttt{handle} & the application handle \\ \hline \texttt{LABEL} & corresponds to the \texttt{.mark} argument \\ \hline \texttt{arg1} & the argument \\ \hline \end{tabular} Use \texttt{STAP\_PROBE1} for probes with one argument. Use \texttt{STAP\_PROBE2} for probes with 2 arguments, and so on. The arguments of the probe are available in the context variables \texttt{\$arg1}, \texttt{\$arg2}, and so on. As an alternative to the \texttt{STAP\_PROBE} macros, you can use the dtrace script to create custom macros. The sdt.h file also provides dtrace compatible markers through \texttt{DTRACE\_PROBE} and an associated python \texttt{dtrace} script. You can use these in builds based on dtrace that need dtrace -h or -G functionality. \subsection{Java probes} \index{Java probes} Support for probing Java methods is available using Byteman as a backend. Byteman is an instrumentation tool from the JBoss project which systemtap can use to monitor invocations for a specific method or line in a Java program. Systemtap does so by generating a Byteman script listing the probes to instrument and then invoking the Byteman \texttt{bminstall} utility. A custom option \texttt{-D OPTION} (see the Byteman documentation for more details) can be passed to bminstall by invoking systemtap with option \texttt{-J OPTION}. The systemtap option \texttt{-j} is also provided as a shorthand for \texttt{-J org.jboss.byteman.compile.to.bytecode}. This Java instrumentation support is currently a prototype feature with major limitations: Java probes attach only to one Java process at a time; other Java processes beyond the first one to be observed are ignored. Moreover, Java probing currently does not work across users; the stap script must run (with appropriate permissions) under the same user as the Java process being probed. (Thus a stap script under root currently cannot probe Java methods in a non-root-user Java process.) There are four probe point variants supported by the translator: \begin{vindent} \begin{verbatim} java("PNAME").class("CLASSNAME").method("PATTERN") java("PNAME").class("CLASSNAME").method("PATTERN").return java(PID).class("CLASSNAME").method("PATTERN") java(PID).class("CLASSNAME").method("PATTERN").return \end{verbatim} \end{vindent} The first two probe points refer to Java processes by the name of the Java process. The PATTERN parameter specifies the signature of the Java method to probe. The signature must consist of the exact name of the method, followed by a bracketed list of the types of the arguments, for instance \texttt{myMethod(int,double,Foo)}. Wildcards are not supported. The probe can be set to trigger at a specific line within the method by appending a line number with colon, just as in other types of probes: \texttt{myMethod(int,double,Foo):245}. The CLASSNAME parameter identifies the Java class the method belongs to, either with or without the package qualification. By default, the probe only triggers on descendants of the class that do not override the method definition of the original class. However, CLASSNAME can take an optional caret prefix, as in \verb+class("^org.my.MyClass")+, which specifies that the probe should also trigger on all descendants of MyClass that override the original method. For instance, every method with signature foo(int) in program org.my.MyApp can be probed at once using \begin{vindent} \begin{verbatim} java("org.my.MyApp").class("^java.lang.Object").method("foo(int)") \end{verbatim} \end{vindent} The last two probe points work analogously, but refer to Java processes by PID. (PIDs for already running processes can be obtained using the \texttt{jps} utility.) Context variables defined within java probes include \verb+$provider+ (which identifies the class providing the definition of the triggered method) and \verb+$name+ (which gives the signature of the method). Arguments to the method can be accessed using context variables \verb+$arg1$+ through \verb+$arg10+, for up to the first 10 arguments of a method. \subsection{PROCFS probes} \index{PROCFS probes} These probe points allow procfs pseudo-files in \texttt{/proc/systemtap/\textit{MODNAME}} to be created, read and written. Specify the name of the systemtap module as \texttt{\textit{MODNAME}}. There are four probe point variants supported by the translator: \begin{vindent} \begin{verbatim} procfs("PATH").read procfs("PATH").write procfs.read procfs.write \end{verbatim} \end{vindent} \texttt{PATH} is the file name to be created, relative to \texttt{/proc/systemtap/MODNAME}. If no \texttt{PATH} is specified (as in the last two variants in the previous list), \texttt{PATH} defaults to "command". When a user reads \texttt{/proc/systemtap/MODNAME/PATH}, the corresponding procfs read probe is triggered. Assign the string data to be read to a variable named \texttt{\$value}, as follows: \begin{vindent} \begin{verbatim} procfs("PATH").read { $value = "100\n" } \end{verbatim} \end{vindent} When a user writes into \texttt{/proc/systemtap/MODNAME/PATH}, the corresponding procfs write probe is triggered. The data the user wrote is available in the string variable named \texttt{\$value}, as follows: \begin{vindent} \begin{verbatim} procfs("PATH").write { printf("User wrote: %s", $value) } \end{verbatim} \end{vindent} \subsection{Marker probes} \index{marker probes} This family of probe points connects to static probe markers inserted into the kernel or a module. These markers are special macro calls in the kernel that make probing faster and more reliable than with DWARF-based probes. DWARF debugging information is not required to use probe markers. Marker probe points begin with a \texttt{kernel} prefix which identifies the source of the symbol table used for finding markers. The suffix names the marker itself: \texttt{mark.("MARK")}. The marker name string, which can contain wildcard characters, is matched against the names given to the marker macros when the kernel or module is compiled. Optionally, you can specify \texttt{format("FORMAT")}. Specifying the marker format string allows differentiation between two markers with the same name but different marker format strings. The handler associated with a marker probe reads any optional parameters specified at the macro call site named \texttt{\$arg1} through \texttt{\$argNN}, where \texttt{NN} is the number of parameters supplied by the macro. Number and string parameters are passed in a type-safe manner. The marker format string associated with a marker is available in \texttt{\$format}. The marker name string is available in \texttt{\$name}. Here are the marker probe constructs: \begin{vindent} \begin{verbatim} kernel.mark("MARK") kernel.mark("MARK").format("FORMAT") \end{verbatim} \end{vindent} For more information about marker probes, see \url{http://sourceware.org/systemtap/wiki/UsingMarkers}. \subsection{Tracepoints} \label{sec:tracepoints} \index{tracepoints} This family of probe points hooks to static probing tracepoints inserted into the kernel or kernel modules. As with marker probes, these tracepoints are special macro calls inserted by kernel developers to make probing faster and more reliable than with DWARF-based probes. DWARF debugging information is not required to probe tracepoints. Tracepoints have more strongly-typed parameters than marker probes. Tracepoint probes begin with \texttt{kernel}. The next part names the tracepoint itself: \texttt{trace("name")}. The tracepoint \texttt{name} string, which can contain wildcard characters, is matched against the names defined by the kernel developers in the tracepoint header files. The handler associated with a tracepoint-based probe can read the optional parameters specified at the macro call site. These parameters are named according to the declaration by the tracepoint author. For example, the tracepoint probe \texttt{kernel.trace("sched\_switch")} provides the parameters \texttt{\$rq}, \texttt{\$prev}, and \texttt{\$next}. If the parameter is a complex type such as a struct pointer, then a script can access fields with the same syntax as DWARF \texttt{\$target} variables. Tracepoint parameters cannot be modified; however, in guru mode a script can modify fields of parameters. The name of the tracepoint is available in \texttt{\$\$name}, and a string of \texttt{name=value} pairs for all parameters of the tracepoint is available in \texttt{\$\$vars} or \texttt{\$\$parms}. \subsection{Syscall probes} \label{sec:syscall} \index{syscall probes} The \texttt{syscall.*} aliases define several hundred probes. They use the following syntax: \begin{vindent} \begin{verbatim} syscall.NAME syscall.NAME.return \end{verbatim} \end{vindent} Generally, two probes are defined for each normal system call as listed in the syscalls(2) manual page: one for entry and one for return. System calls that never return do not have a corresponding \texttt{.return} probe. Each probe alias defines a variety of variables. Look at the tapset source code to find the most reliable source of variable definitions. Generally, each variable listed in the standard manual page is available as a script-level variable. For example, \texttt{syscall.open} exposes file name, flags, and mode. In addition, a standard suite of variables is available at most aliases, as follows: \begin{itemize} \item \texttt{argstr}: A pretty-printed form of the entire argument list, without parentheses. \item \texttt{name}: The name of the system call. \item \texttt{retstr}: For return probes, a pretty-printed form of the system call result. \end{itemize} Not all probe aliases obey all of these general guidelines. Please report exceptions that you encounter as a bug. \subsection{Timer probes} \index{timer probes} You can use intervals defined by the standard kernel jiffies\index{jiffies} timer to trigger probe handlers asynchronously. A \emph{jiffy} is a kernel-defined unit of time typically between 1 and 60 msec. Two probe point variants are supported by the translator: \begin{vindent} \begin{verbatim} timer.jiffies(N) timer.jiffies(N).randomize(M) \end{verbatim} \end{vindent} The probe handler runs every N jiffies. If the \texttt{randomize}\index{randomize} component is given, a linearly distributed random value in the range {[}-M \ldots{} +M] is added to N every time the handler executes. N is restricted to a reasonable range (1 to approximately 1,000,000), and M is restricted to be less than N. There are no target variables provided in either context. Probes can be run concurrently on multiple processors. Intervals may be specified in units of time. There are two probe point variants similar to the jiffies timer: \begin{vindent} \begin{verbatim} timer.ms(N) timer.ms(N).randomize(M) \end{verbatim} \end{vindent} Here, N and M are specified in milliseconds\index{milliseconds}, but the full options for units are seconds (s or sec), milliseconds (ms or msec), microseconds (us or usec), nanoseconds (ns or nsec), and hertz (hz). Randomization is not supported for hertz timers. The resolution of the timers depends on the target kernel. For kernels prior to 2.6.17, timers are limited to jiffies resolution, so intervals are rounded up to the nearest jiffies interval. After 2.6.17, the implementation uses hrtimers for greater precision, though the resulting resolution will be dependent upon architecture. In either case, if the randomize component is given, then the random value will be added to the interval before any rounding occurs. Profiling timers are available to provide probes that execute on all CPUs at each system tick. This probe takes no parameters, as follows. \begin{vindent} \begin{verbatim} timer.profile.tick \end{verbatim} \end{vindent} Full context information of the interrupted process is available, making this probe suitable for implementing a time-based sampling profiler. It is recommended to use the tapset probe \verb+timer.profile+ rather than \verb+timer.profile.tick+. This probe point behaves identically to \verb+timer.profile.tick+ when the underlying functionality is available, and falls back to using \verb+perf.sw.cpu_clock+ on some recent kernels which lack the corresponding profile timer facility. The following is an example of timer usage. \begin{vindent} \begin{verbatim} # Refers to a periodic interrupt, every 1000 jiffies: timer.jiffies(1000) # Fires every 5 seconds: timer.sec(5) # Refers to a periodic interrupt, every 1000 +/- 200 jiffies: timer.jiffies(1000).randomize(200) \end{verbatim} \end{vindent} \subsection{Special probe points} The probe points \texttt{begin} and \texttt{end} are defined by the translator to refer to the time of session startup and shutdown. There are no target variables available in either context. \subsubsection{begin} \index{begin} The \texttt{begin} probe is the start of the SystemTap session. All \texttt{begin} probe handlers are run during the startup of the session. \subsubsection{end} \index{end} The \texttt{end} probe is the end of the SystemTap session. All \texttt{end} probes are run during the normal shutdown of a session, such as in the aftermath of a SystemTap \texttt{exit} function call, or an interruption from the user. In the case of an shutdown triggered by error, \texttt{end} probes are not run. \subsubsection{error} \index{error} The \emph{error} probe point is similar to the end probe, except the probe handler runs when the session ends if an error occurred. In this case, an \texttt{end} probe is skipped, but each \texttt{error} probe is still attempted. You can use an \texttt{error} probe to clean up or perform a final action on script termination. Here is a simple example: \begin{vindent} \begin{verbatim} probe error { println ("Oops, errors occurred. Here's a report anyway.") foreach (coin in mint) { println (coin) } } \end{verbatim} \end{vindent} \subsubsection{begin, end, and error probe sequence} \index{probe sequence} \texttt{begin}, \texttt{end}, and \texttt{error} probes can be specified with an optional sequence number that controls the order in which they are run. If no sequence number is provided, the sequence number defaults to zero and probes are run in the order that they occur in the script file. Sequence numbers may be either positive or negative, and are especially useful for tapset writers who want to do initialization in a \texttt{begin} probe. The following are examples. \begin{vindent} \begin{verbatim} # In a tapset file: probe begin(-1000) { ... } # In a user script: probe begin { ... } \end{verbatim} \end{vindent} The user script \texttt{begin} probe defaults to sequence number zero, so the tapset \texttt{begin} probe will run first. \subsubsection{never} \index{never} The \texttt{never} probe point is defined by the translator to mean \emph{never}. Its statements are analyzed for symbol and type correctness, but its probe handler is never run. This probe point may be useful in conjunction with optional probes. See Section~\ref{sub:Optional-probe-points}. \section{Language elements\label{sec:Language-Elements}} \subsection{Identifiers} \index{identifiers} \emph{Identifiers} are used to name variables and functions. They are an alphanumeric sequence that may include the underscore (\_) and dollar sign (\$) characters. They have the same syntax as C identifiers, except that the dollar sign is also a legal character. Identifiers that begin with a dollar sign are interpreted as references to variables in the target software, rather than to SystemTap script variables. Identifiers may not start with a plain digit. \subsection{Data types\label{sub:Data-types}} \index{data types} The SystemTap language includes a small number of data types, but no type declarations. A variable's type is inferred\index{inference} from its use. To support this inference, the translator enforces consistent typing of function arguments and return values, array indices and values. There are no implicit type conversions between strings and numbers. Inconsistent type-related use of an identifier signals an error. \subsubsection{Literals} \index{literals} Literals are either strings or integers. Literal integers can be expressed as decimal, octal, or hexadecimal, using C notation. Type suffixes (e.g., \emph{L} or \emph{U}) are not used. \subsubsection{Integers\label{sub:Integers}} \index{integers} \index{numbers} Integers are decimal, hexadecimal, or octal, and use the same notation as in C. Integers are 64-bit signed quantities, although the parser also accepts (and wraps around) values above positive $2^{63}$ but below $2^{64}$. \subsubsection{Strings\label{sub:Strings}} \index{strings} Strings are enclosed in quotation marks ({}``string''), and pass through standard C escape codes with backslashes. A string literal may be split into several pieces, which are glued together, as follows. \begin{vindent} \begin{verbatim} str1 = "foo" "bar" /* --> becomes "foobar" */ str2 = "a good way to do a multi-line\n" "string literal" /* --> becomes "a good way to do a multi-line\nstring literal" */ str3 = "also a good way to " @1 " splice command line args" /* --> becomes "also a good way to foo splice command line args", assuming @1 is given as foo on the command line */ \end{verbatim} \end{vindent} Observe that script arguments can also be glued into a string literal. Strings are limited in length to MAXSTRINGLEN. For more information about this and other limits, see Section~\ref{sub:SystemTap-safety}. \subsubsection{Associative arrays} See Section~\ref{sec:Associative-Arrays} \subsubsection{Statistics} See Section~\ref{sec:Statistics} \subsection{Semicolons} \index{;} The semicolon is the null statement, or do nothing statement. It is optional, and useful as a separator between statements to improve detection of syntax errors and to reduce ambiguities in grammar. \subsection{Comments} \index{comments} Three forms of comments are supported, as follows. \begin{vindent} \begin{verbatim} # ... shell style, to the end of line // ... C++ style, to the end of line /* ... C style ... */ \end{verbatim} \end{vindent} \subsection{Whitespace} \index{whitespace} As in C, spaces, tabs, returns, newlines, and comments are treated as whitespace. Whitespace is ignored by the parser. \subsection{Expressions} \index{expressions} SystemTap supports a number of operators that use the same general syntax, semantics, and precedence as in C and awk. Arithmetic is performed per C rules for signed integers. If the parser detects division by zero or an overflow, it generates an error. The following subsections list these operators. \subsubsection{Binary numeric operators} \index{binary} \texttt{{*} / \% + - >\,{}> <\,{}< \& \textasciicircum{} | \&\& ||} \subsubsection{Binary string operators} \index{binary} \texttt{\textbf{.}} (string concatenation) \subsubsection{Numeric assignment operators} \index{numeric} \texttt{= {*}= /= \%= += -= >\,{}>= <\,{}<= \&= \textasciicircum{}= |=} \subsubsection{String assignment operators} \texttt{= .=} \subsubsection{Unary numeric operators} \index{unary} \texttt{+ - ! \textasciitilde{} ++ -{}-} \subsubsection{Numeric \& string comparison, regular expression matching operators} \index{comparison} \texttt{< > <= >= == !=} \verb+=~+ \verb+!~+ The regular expression matching (\verb+=~+ and \verb+!~+) is a recent feature. The second operand must be a string literal containing a syntactically valid regular expression. The regular expression syntax supports most of the features of POSIX Extended Regular Expressions, except for subexpression reuse (\verb+\1+) functionality. The ability to capture and extract the contents of the matched string and subexpressions has not yet been implemented. \subsubsection{Ternary operator\label{sub:Ternary-operator}} \index{?} \texttt{cond ? exp1 : exp2} \subsubsection{Grouping operator} \index{grouping} \texttt{( exp )} \subsubsection{Function call} \index{fn} General syntax: \texttt{fn ({[} arg1, arg2, ... ])} \subsubsection{\$ptr-\textgreater member} \index{pointer} \texttt{ptr} is a kernel pointer available in a probed context. \subsubsection{Pointer typecasting} \index{Pointer typecasting} \emph{Typecasting} is supported using the \texttt{@cast()} operator. A script can define a pointer type for a \emph{long} value, then access type members using the same syntax as with \texttt{\$target} variables. After a pointer is saved into a script integer variable, the translator loses the necessary type information to access members from that pointer. The \texttt{@cast()} operator tells the translator how to read a pointer. The following statement interprets \texttt{p} as a pointer to a struct or union named \texttt{type\_name} and dereferences the \texttt{member} value: \begin{vindent} \begin{verbatim} @cast(p, "type_name"[, "module"])->member \end{verbatim} \end{vindent} The optional \texttt{module} parameter tells the translator where to look for information about that type. You can specify multiple modules as a list with colon (\texttt{:}) separators. If you do not specify the module parameter, the translator defaults to either the probe module for dwarf probes or to \textit{kernel} for functions and all other probe types. The following statement retrieves the parent PID from a kernel task\_struct: \begin{vindent} \begin{verbatim} @cast(pointer, "task_struct", "kernel")->parent->tgid \end{verbatim} \end{vindent} The translator can create its own module with type information from a header surrounded by angle brackets (\texttt{< >}) if normal debugging information is not available. For kernel headers, prefix it with \texttt{kernel} to use the appropriate build system. All other headers are built with default GCC parameters into a user module. The following statements are examples. \begin{vindent} \begin{verbatim} @cast(tv, "timeval", "")->tv_sec @cast(task, "task_struct", "kernel")->tgid \end{verbatim} \end{vindent} In guru mode, the translator allows scripts to assign new values to members of typecasted pointers. Typecasting is also useful in the case of \texttt{void*} members whose type might be determinable at run time. \begin{vindent} \begin{verbatim} probe foo { if ($var->type == 1) { value = @cast($var->data, "type1")->bar } else { value = @cast($var->data, "type2")->baz } print(value) } \end{verbatim} \end{vindent} \subsubsection{\textless value\textgreater\ in \textless array\_name\textgreater} \index{index} This expression evaluates to true if the array contains an element with the specified index. \subsubsection{{[} \textless value\textgreater, ... ] in \textless array\_name\textgreater} The number of index values must match the number of indexes previously specified. \subsection{Literals passed in from the stap command line\label{sub:Literals-passed-in}} \index{literals} \emph{Literals} are either strings enclosed in double quotes ('' '') or integers. For information about integers, see Section~\ref{sub:Integers}. For information about strings, see Section~\ref{sub:Strings}. Script arguments at the end of a command line are expanded as literals. You can use these in all contexts where literals are accepted. A reference to a nonexistent argument number is an error. \subsubsection{\$1 \ldots{} \$\textless NN\textgreater\ for literal pasting} \index{\$} Use \texttt{\$1 \ldots{} \$} for pasting the entire argument string into the input stream, which will be further lexically tokenized. \subsubsection{@1 \ldots{} @\textless NN\textgreater\ for strings} Use \texttt{@1 \ldots{} @} for casting an entire argument as a string literal. \subsubsection{Examples} For example, if the following script named example.stp \begin{vindent} \begin{verbatim} probe begin { printf("%d, %s\n", $1, @2) } \end{verbatim} \end{vindent} is invoked as follows \begin{vindent} \begin{verbatim} # stap example.stp '5+5' mystring \end{verbatim} \end{vindent} then 5+5 is substituted for \$1 and \char`\"{}mystring\char`\"{} for @2. The output will be \begin{vindent} \begin{verbatim} 10, mystring \end{verbatim} \end{vindent} \subsection{Conditional compilation} \subsubsection{Conditions} \index{conditions} One of the steps of parsing is a simple preprocessing stage. The preprocessor supports conditionals with a general form similar to the ternary operator (Section~\ref{sub:Ternary-operator}). \begin{vindent} \begin{verbatim} %( CONDITION %? TRUE-TOKENS %) %( CONDITION %? TRUE-TOKENS %: FALSE-TOKENS %) \end{verbatim} \end{vindent} The CONDITION is a limited expression whose format is determined by its first keyword. The following is the general syntax. \begin{vindent} \begin{verbatim} %( %? [ %: ] %) \end{verbatim} \end{vindent} \subsubsection{Conditions based on available target variables} \index{defined target variable} The predicate @defined() is available for testing whether a particular \$variable/expression is resolvable at translation time. The following is an example of its use: \begin{vindent} \begin{verbatim} probe foo { if (@defined($bar)) log ("$bar is available here") } \end{verbatim} \end{vindent} \subsubsection{Conditions based on kernel version: kernel\_v, kernel\_vr} \index{kernel version} \index{kernel\_vr} \index{kernel\_v} If the first part of a conditional expression is the identifier \texttt{kernel\_v} or \texttt{kernel\_vr}, the second part must be one of six standard numeric comparison operators {}``\textless'', {}``\textless ='', {}``=='', {}``!='', {}``\textgreater'', or {}``\textgreater ='', and the third part must be a string literal that contains an RPM-style version-release value. The condition returns true if the version of the target kernel (as optionally overridden by the \textbf{-r} option) matches the given version string. The comparison is performed by the glibc function strverscmp. \texttt{kernel\_v} refers to the kernel version number only, such as {}``2.6.13\char`\"{}. \texttt{kernel\_vr} refers to the kernel version number including the release code suffix, such as {}``2.6.13-1.322FC3smp''. \subsubsection{Conditions based on architecture: arch} \index{arch} If the first part of the conditional expression is the identifier \texttt{arch} which refers to the processor architecture, then the second part is a string comparison operator ''=='' or ''!='', and the third part is a string literal for matching it. This comparison is a simple string equality or inequality. The currently supported architecture strings are i386, i686, x86\_64, ia64, s390, and powerpc. \subsubsection{Conditions based on privilege level: systemtap\_privilege} \index{systemtap\_privilege} If the first part of the conditional expression is the identifier \texttt{systemtap\_privilege} which refers to the privilege level the systemtap script is being compiled with, then the second part is a string comparison operator ''=='' or ''!='', and the third part is a string literal for matching it. This comparison is a simple string equality or inequality. The possible privilege strings to consider are \verb+"stapusr"+ for unprivileged scripts, and \verb+"stapsys"+ or \verb+"stapdev"+ for privileged scripts. (In general, to test for a privileged script it is best to use \verb+!= "stapusr"+.) This condition can be used to write scripts that can be run in both privileged and unprivileged modes, with additional functionality made available in the privileged case. \subsubsection{True and False Tokens} \index{tokens} TRUE-TOKENS and FALSE-TOKENS are zero or more general parser tokens, possibly including nested preprocessor conditionals, that are pasted into the input stream if the condition is true or false. For example, the following code induces a parse error unless the target kernel version is newer than 2.6.5. \begin{vindent} \begin{verbatim} %( kernel_v <= "2.6.5" %? **ERROR** %) # invalid token sequence \end{verbatim} \end{vindent} The following code adapts to hypothetical kernel version drift. \begin{vindent} \begin{verbatim} probe kernel.function ( %( kernel_v <= "2.6.12" %? "__mm_do_fault" %: %( kernel_vr == "2.6.13-1.8273FC3smp" %? "do_page_fault" %: UNSUPPORTED %) %)) { /* ... */ } %( arch == "ia64" %? probe syscall.vliw = kernel.function("vliw_widget") {} %) \end{verbatim} \end{vindent} The following code adapts to the presence of a kernel CONFIG option. \begin{vindent} \begin{verbatim} %( CONFIG_UTRACE == "y" %? probe process.syscall {} %) \end{verbatim} \end{vindent} \subsection{Preprocessor macros} This feature lets scripts eliminate some types of repetition. \subsubsection{Local macros} The preprocessor also supports a simple macro facility. Macros taking zero or more arguments are defined using the following construct: \begin{vindent} \begin{verbatim} @define NAME %( BODY %) @define NAME(PARAM_1, PARAM_2, ...) %( BODY %) \end{verbatim} \end{vindent} Macro arguments are referred to in the body by prefixing the argument name with an \texttt{@} symbol. Likewise, once defined, macros are invoked by prefixing the macro name with an \texttt{@} symbol: \begin{vindent} \begin{verbatim} @define foo %( x %) @define add(a,b) %( ((@a)+(@b)) %) @foo = @add(2,2) \end{verbatim} \end{vindent} Macro expansion is currently performed in a separate pass before conditional compilation. Therefore, both TRUE- and FALSE-tokens in conditional expressions will be macroexpanded regardless of how the condition is evaluated. This can sometimes lead to errors: \begin{vindent} \begin{verbatim} // The following results in a conflict: %( CONFIG_UTRACE == "y" %? @define foo %( process.syscall %) %: @define foo %( **ERROR** %) %) // The following works properly as expected: @define foo %( %( CONFIG_UTRACE == "y" %? process.syscall %: **ERROR** %) %) \end{verbatim} \end{vindent} The first example is incorrect because both \texttt{@define}s are evaluated in a pass prior to the conditional being evaluated. \subsubsection{Library macros} Normally, a macro definition is local to the file it occurs in. Thus, defining a macro in a tapset does not make it available to the user of the tapset. Publically available library macros can be defined by including \texttt{.stpm} files on the tapset search path. These files may only contain \texttt{@define} constructs, which become visible across all tapsets and user scripts. \section{Statement types\label{sec:Statement-Types}} Statements enable procedural control flow within functions and probe handlers. The total number of statements executed in response to any single probe event is limited to MAXACTION, which defaults to 1000. See Section~\ref{sub:SystemTap-safety}. \subsection{break and continue} \index{break} \index{continue} Use \texttt{break} or \texttt{continue} to exit or iterate the innermost nesting loop statement, such as within a \texttt{while, for,} or \texttt{foreach} statement. The syntax and semantics are the same as those used in C. \subsection{try/catch} \index{try} \index{catch} Use \texttt{try}/\texttt{catch} to handle most kinds of run-time errors within the script instead of aborting the probe handler in progress. The semantics are similar to C++ in that try/catch blocks may be nested. The error string may be captured by optionally naming a variable which is to receive it. \begin{vindent} \begin{verbatim} try { /* do something */ /* trigger error like kread(0), or divide by zero, or error("foo") */ } catch (msg) { /* omit (msg) entirely if not interested */ /* println("caught error ", msg) */ /* handle error */ } /* execution continues */ \end{verbatim} \end{vindent} \subsection{delete\label{sub:delete}} \index{delete} \texttt{delete} removes an element. The following statement removes from ARRAY the element specified by the index tuple. The value will no longer be available, and subsequent iterations will not report the element. It is not an error to delete an element that does not exist. \begin{vindent} \begin{verbatim} delete ARRAY[INDEX1, INDEX2, ...] \end{verbatim} \end{vindent} The following syntax removes all elements from ARRAY: \begin{vindent} \begin{verbatim} delete ARRAY \end{verbatim} \end{vindent} The following statement removes the value of SCALAR. Integers and strings are cleared to zero and null (\char`\"{}\char`\"{}) respectively, while statistics are reset to their initial empty state. \begin{vindent} \begin{verbatim} delete SCALAR \end{verbatim} \end{vindent} \subsection{EXP (expression)} \index{expression} An \texttt{expression} executes a string- or integer-valued expression and discards the value. \subsection{for} \index{for} General syntax: \begin{vindent} \begin{verbatim} for (EXP1; EXP2; EXP3) STMT \end{verbatim} \end{vindent} The \texttt{for} statement is similar to the \texttt{for} statement in C. The \texttt{for} expression executes EXP1 as initialization. While EXP2 is non-zero, it executes STMT, then the iteration expression EXP3. \subsection{foreach\label{sub:foreach}} \index{foreach} General syntax: \begin{vindent} \begin{verbatim} foreach (VAR in ARRAY) STMT \end{verbatim} \end{vindent} The \texttt{foreach} statement loops over each element of a named global array, assigning the current key to VAR. The array must not be modified within the statement. If you add a single plus (+) or minus (-) operator after the VAR or the ARRAY identifier, the iteration order will be sorted by the ascending or descending index or value. The following statement behaves the same as the first example, except it is used when an array is indexed with a tuple of keys. Use a sorting suffix on at most one VAR or ARRAY identifier. \begin{vindent} \begin{verbatim} foreach ([VAR1, VAR2, ...] in ARRAY) STMT \end{verbatim} \end{vindent} You can combine the first and second syntax to capture both the full tuple and the keys at the same time as follows. \begin{vindent} \begin{verbatim} foreach (VAR = [VAR1, VAR2, ...] in ARRAY) STMT \end{verbatim} \end{vindent} The following statement is the same as the first example, except that the \texttt{limit} keyword limits the number of loop iterations to EXP times. EXP is evaluated once at the beginning of the loop. \begin{vindent} \begin{verbatim} foreach (VAR in ARRAY limit EXP) STMT \end{verbatim} \end{vindent} \subsection{if} \index{if} General syntax: \begin{vindent} \begin{verbatim} if (EXP) STMT1 [ else STMT2 ] \end{verbatim} \end{vindent} The \texttt{if} statement compares an integer-valued EXP to zero. It executes the first STMT if non-zero, or the second STMT if zero. The \texttt{if} command has the same syntax and semantics as used in C. \subsection{next} \index{next} The \texttt{next} statement returns immediately from the enclosing probe handler. \subsection{; (null statement)} \index{;} \index{null statement} General syntax: \begin{vindent} \begin{verbatim} statement1 ; statement2 \end{verbatim} \end{vindent} The semicolon represents the null statement, or do nothing. It is useful as an optional separator between statements to improve syntax error detection and to handle certain grammar ambiguities. \subsection{return} \index{return} General syntax: \begin{vindent} \begin{verbatim} return EXP \end{verbatim} \end{vindent} The \texttt{return} statement returns the EXP value from the enclosing function. If the value of the function is not returned, then a return statement is not needed, and the function will have a special \emph{unknown} type with no return value. \subsection{\{ \} (statement block)} \index{\{ \}} \index{statement block} This is the statement block with zero or more statements enclosed within brackets. The following is the general syntax: \begin{vindent} \begin{verbatim} { STMT1 STMT2 ... } \end{verbatim} \end{vindent} The statement block executes each statement in sequence in the block. Separators or terminators are generally not necessary between statements. The statement block uses the same syntax and semantics as in C. \subsection{while} \index{while} General syntax: \begin{vindent} \begin{verbatim} while (EXP) STMT \end{verbatim} \end{vindent} The \texttt{while} statement uses the same syntax and semantics as in C. In the statement above, while the integer-valued EXP evaluates to non-zero, the parser will execute STMT. \section{Associative arrays\label{sec:Associative-Arrays}} \index{associative arrays} Associative arrays are implemented as hash tables with a maximum size set at startup. Associative arrays are too large to be created dynamically for individual probe handler runs, so they must be declared as global. The basic operations for arrays are setting and looking up elements. These operations are expressed in awk syntax: the array name followed by an opening bracket ({[}), a comma-separated list of up to nine index index expressions, and a closing bracket (]). Each index expression may be a string or a number, as long as it is consistently typed throughout the script. \subsection{Examples} \begin{vindent} \begin{verbatim} # Increment the named array slot: foo [4,"hello"] ++ # Update a statistic: processusage [uid(),execname()] ++ # Set a timestamp reference point: times [tid()] = get_cycles() # Compute a timestamp delta: delta = get_cycles() - times [tid()] \end{verbatim} \end{vindent} \subsection{Types of values} Array elements may be set to a number, a string, or an aggregate. The type must be consistent throughout the use of the array. The first assignment to the array defines the type of the elements. Unset array elements may be fetched and return a null value (zero or empty string) as appropriate, but they are not seen by a membership test. \subsection{Array capacity} Array sizes can be specified explicitly or allowed to default to the maximum size as defined by MAXMAPENTRIES. See Section~\ref{sub:SystemTap-safety} for details on changing MAXMAPENTRIES. You can explicitly specify the size of an array as follows: \begin{vindent} \begin{verbatim} global ARRAY[] \end{verbatim} \end{vindent} If you do not specify the size parameter, then the array is created to hold MAXMAPENTRIES number of elements. \subsection{Array wrapping\label{sub:Array-Wrapping}} Arrays may be wrapped using the percentage symbol (\%) causing previously entered elements to be overwritten if more elements are inserted than the array can hold. This works for both regular and statistics typed arrays. You can mark arrays for wrapping as follows: \begin{vindent} \begin{verbatim} global ARRAY1%[], ARRAY2% \end{verbatim} \end{vindent} \subsection{Iteration, foreach} \index{foreach} Like awk, SystemTap's foreach creates a loop that iterates over key tuples of an array, not only values. The iteration may be sorted by any single key or a value by adding an extra plus symbol (+) or minus symbol (-) to the code or limited to only a few elements with the limit keyword. The following are examples. \begin{vindent} \begin{verbatim} # Simple loop in arbitrary sequence: foreach ([a,b] in foo) fuss_with(foo[a,b]) # Loop in increasing sequence of value: foreach ([a,b] in foo+) { ... } # Loop in decreasing sequence of first key: foreach ([a-,b] in foo) { ... } # Print the first 10 tuples and values in the array in decreasing sequence foreach (v = [i,j] in foo- limit 10) printf("foo[%d,%s] = %d\n", i, j, v) \end{verbatim} \end{vindent} The \texttt{break} and \texttt{continue} statements also work inside foreach loops. Since arrays can be large but probe handlers must execute quickly, you should write scripts that exit iteration early, if possible. For simplicity, SystemTap forbids any modification of an array during iteration with a foreach. For a full description of \texttt{foreach} see subsection \ref{sub:foreach}. \subsection{Deletion} \index{delete} The \texttt{delete} statement can either remove a single element by index from an array or clear an entire array at once. See subsection \ref{sub:delete} for details and examples. \section{Statistics (aggregates)\label{sec:Statistics}} \index{aggregates} Aggregate instances are used to collect statistics on numerical values, when it is important to accumulate new data quickly and in large volume. These instances operate without exclusive locks, and store only aggregated stream statistics. Aggregates make sense only for global variables. They are stored individually or as elements of an associative array. For information about wrapping associative arrays with statistics elements, see section~\ref{sub:Array-Wrapping} \subsection{The aggregation (\textless\hspace{1 sp}\textless\hspace{1 sp}\textless) operator} \index{\textless\hspace{1 sp}\textless\hspace{1 sp}\textless} The aggregation operator is {}``\textless\hspace{1 sp}\textless\hspace{1 sp}\textless'', and its effect is similar to an assignment or a C++ output streaming operation. The left operand specifies a scalar or array-index \emph{l-value}, which must be declared global. The right operand is a numeric expression. The meaning is intuitive: add the given number as a sample to the set of numbers to compute their statistics. The specific list of statistics to gather is given separately by the extraction functions. The following is an example. \begin{vindent} \begin{verbatim} a <<< delta_timestamp writes[execname()] <<< count \end{verbatim} \end{vindent} \subsection{Extraction functions} \index{extraction} For each instance of a distinct extraction function operating on a given identifier, the translator computes a set of statistics. With each execution of an extraction function, the aggregation is computed for that moment across all processors. The first argument of each function is the same style of l-value as used on the left side of the aggregation operation. \subsection{Integer extractors} The following functions provide methods to extract information about aggregate. \subsubsection{@count(s)} \index{count} This statement returns the number of samples accumulated in aggregate s. \subsubsection{@sum(s)} \index{sum} This statement returns the total sum of all samples in aggregate s. \subsubsection{@min(s)} \index{min} This statement returns the minimum of all samples in aggregate s. \subsubsection{@max(s)} \index{max} This statement returns the maximum of all samples in aggregate s. \subsubsection{@avg(s)} \index{avg} This statement returns the average value of all samples in aggregate s. \subsection{Histogram extractors} \index{histograms} The following functions provide methods to extract histogram information. Printing a histogram with the print family of functions renders a histogram object as a tabular "ASCII art" bar chart. \subsubsection{@hist\_linear} \index{hist\_linear} The statement \texttt{@hist\_linear(v,L,H,W)} represents a linear histogram of aggregate \texttt{v}, where \emph{L} and \emph{H} represent the lower and upper end of a range of values and \emph{W} represents the width (or size) of each bucket within the range. The low and high values can be negative, but the overall difference (high minus low) must be positive. The width parameter must also be positive. In the output, a range of consecutive empty buckets may be replaced with a tilde (\textasciitilde{}) character. This can be controlled on the command line with -DHIST\_ELISION=\textless\hspace{1 sp}num\textgreater\hspace{1 sp}, where \textless\hspace{1 sp}num\textgreater\hspace{1 sp} specifies how many empty buckets at the top and bottom of the range to print. The default is 2. A \textless\hspace{1 sp}num\textgreater\hspace{1 sp} of 0 removes all empty buckets. A negative \textless\hspace{1 sp}num\textgreater\hspace{1 sp} disables removal. For example, if you specify -DHIST\_ELISION=3 and the histogram has 10 consecutive empty buckets, the first 3 and last 3 empty buckets will be printed and the middle 4 empty buckets will be represented by a tilde (\textasciitilde{}). The following is an example. \begin{vindent} \begin{verbatim} global reads probe netdev.receive { reads <<< length } probe end { print(@hist_linear(reads, 0, 10240, 200)) } \end{verbatim} \end{vindent} This generates the following output. \begin{samepage} \begin{vindent} \begin{verbatim} value |-------------------------------------------------- count 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1650 200 | 8 400 | 0 600 | 0 ~ 1000 | 0 1200 | 0 1400 | 1 1600 | 0 1800 | 0 \end{verbatim} \end{vindent} \end{samepage} This shows that 1650 network reads were of a size between 0 and 199 bytes, 8 reads were between 200 and 399 bytes, and 1 read was between 1200 and 1399 bytes. The tilde (\textasciitilde{}) character indicates the bucket for 800 to 999 bytes was removed because it was empty. Empty buckets for 2000 bytes and larger were also removed because they were empty. \subsubsection{@hist\_log} \index{hist\_log} The statement \texttt{@hist\_log(v)} represents a base-2 logarithmic histogram. Empty buckets are replaced with a tilde (\textasciitilde{}) character in the same way as \texttt{@hist\_linear()} (see above). The following is an example. \begin{vindent} \begin{verbatim} global reads probe netdev.receive { reads <<< length } probe end { print(@hist_log(reads)) } \end{verbatim} \end{vindent} This generates the following output. \begin{samepage} \begin{vindent} \begin{verbatim} value |-------------------------------------------------- count 8 | 0 16 | 0 32 | 254 64 | 3 128 | 2 256 | 2 512 | 4 1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 16689 2048 | 0 4096 | 0 \end{verbatim} \end{vindent} \end{samepage} \subsection{Deletion} \index{delete} The \texttt{delete} statement (subsection \ref{sub:delete}) applied to an aggregate variable will reset it to the initial empty state. \section{Formatted output} \subsection{print} \index{print} General syntax: \begin{vindent} \begin{verbatim} print () \end{verbatim} \end{vindent} This function prints a single value of any type. \subsection{printf} \index{printf} General syntax: \begin{vindent} \begin{verbatim} printf (fmt:string, ...) \end{verbatim} \end{vindent} The printf function takes a formatting string as an argument, and a number of values of corresponding types, and prints them all. The format must be a literal string constant. The printf formatting directives are similar to those of C, except that they are fully checked for type by the translator. The formatting string can contain tags that are defined as follows: \begin{vindent} \begin{verbatim} %[flags][width][.precision][length]specifier \end{verbatim} \end{vindent} Where \texttt{specifier} is required and defines the type and the interpretation of the value of the corresponding argument. The following table shows the details of the specifier parameter: \begin{table}[H] \caption{printf specifier values} \begin{tabular}{|>{\raggedright}p{1in}|>{\raggedright}p{3.5in}|>{\raggedright}p{1.25in}|} \hline \textbf{Specifier}& \textbf{Output}& \textbf{Example}\tabularnewline \hline \hline d or i& Signed decimal& 392\tabularnewline \hline o& Unsigned octal& 610\tabularnewline \hline s& String& sample\tabularnewline \hline u& Unsigned decimal& 7235\tabularnewline \hline x& Unsigned hexadecimal (lowercase letters)& 7fa\tabularnewline \hline X& Unsigned hexadecimal (uppercase letters)& 7FA\tabularnewline \hline p& Pointer address& 0x0000000000bc614e\tabularnewline \hline b& Writes a binary value as text using the computer's native byte order. The field width specifies the number of bytes to write. Valid specifications are \%b, \%1b, \%2b, \%4b and \%8b. The default width is 8 (64-bits).& See below\tabularnewline \hline \%& A \% followed by another \% character will write \% to stdout.& \%\tabularnewline \hline \end{tabular} \end{table} The tag can also contain \texttt{flags}, \texttt{width}, \texttt{.precision} and \texttt{modifiers} sub-specifiers, which are optional and follow these specifications: \begin{table}[H] \caption{printf flag values} \begin{tabular}{|>{\raggedright}p{1.5in}|>{\raggedright}p{4.5in}|} \hline \textbf{Flags}& \textbf{Description}\tabularnewline \hline \hline - (minus sign)& Left-justify within the given field width. Right justification is the default (see \texttt{width} sub-specifier).\tabularnewline \hline + (plus sign)& Precede the result with a plus or minus sign even for positive numbers. By default, only negative numbers are preceded with a minus sign.\tabularnewline \hline (space)& If no sign is going to be written, a blank space is inserted before the value.\tabularnewline \hline \#& Used with \texttt{o}, \texttt{x} or \texttt{X} specifiers the value is preceded with \texttt{0}, \texttt{0x} or \texttt{0X} respectively for non-zero values.\tabularnewline \hline 0& Left-pads the number with zeroes instead of spaces, where padding is specified (see \texttt{width} sub-specifier).\tabularnewline \hline \end{tabular} \end{table} \begin{table}[H] \caption{printf width values} \begin{tabular}{|>{\raggedright}p{1.5in}|>{\raggedright}p{4.5in}|} \hline \textbf{Width}& \textbf{Description}\tabularnewline \hline \hline (number)& Minimum number of characters to be printed. If the value to be printed is shorter than this number, the result is padded with blank spaces. The value is not truncated even if the result is larger.\tabularnewline \hline \end{tabular} \end{table} % \begin{table}[H] \caption{printf precision values} \begin{tabular}{|>{\raggedright}p{1.5in}|>{\raggedright}p{4.5in}|} \hline \textbf{Precision}& \textbf{Description}\tabularnewline \hline \hline .number& For integer specifiers (\texttt{d, i, o, u, x, X}): \texttt{precision} specifies the minimum number of digits to be written. If the value to be written is shorter than this number, the result is padded with leading zeros. The value is not truncated even if the result is longer. A precision of 0 means that no character is written for the value 0. For s: this is the maximum number of characters to be printed. By default all characters are printed until the ending null character is encountered. When no \texttt{precision} is specified, the default is 1. If the period is specified without an explicit value for \texttt{precision}, 0 is assumed.\tabularnewline \hline \end{tabular} \end{table} \textbf{Binary Write Examples} The following is an example of using the binary write functions: \begin{vindent} \begin{verbatim} probe begin { for (i = 97; i < 110; i++) printf("%3d: %1b%1b%1b\n", i, i, i-32, i-64) exit() } \end{verbatim} \end{vindent} This prints: \begin{vindent} \begin{verbatim} 97: aA! 98: bB" 99: cC# 100: dD$ 101: eE% 102: fF& 103: gG' 104: hH( 105: iI) 106: jJ* 107: kK+ 108: lL, 109: mM- \end{verbatim} \end{vindent} Another example: \begin{vindent} \begin{verbatim} stap -e 'probe begin{printf("%b%b", 0xc0dedbad, \ 0x12345678);exit()}' | hexdump -C \end{verbatim} \end{vindent} This prints: \begin{vindent} \begin{verbatim} 00000000 ad db de c0 00 00 00 00 78 56 34 12 00 00 00 00 |........xV4.....| 00000010 \end{verbatim} \end{vindent} Another example: \begin{vindent} \begin{verbatim} probe begin{ printf("%1b%1b%1blo %1b%1brld\n", 72,101,108,87,111) exit() } \end{verbatim} \end{vindent} This prints: \begin{vindent} \begin{verbatim} Hello World \end{verbatim} \end{vindent} \subsection{printd} \index{printd} General syntax: \begin{vindent} \begin{verbatim} printd (delimiter:string, ...) \end{verbatim} \end{vindent} This function takes a string delimiter and two or more values of any type, then prints the values with the delimiter interposed. The delimiter must be a literal string constant. For example: \begin{vindent} \begin{verbatim} printd("/", "one", "two", "three", 4, 5, 6) \end{verbatim} \end{vindent} prints: \begin{vindent} \begin{verbatim} one/two/three/4/5/6 \end{verbatim} \end{vindent} \subsection{printdln} \index{printdln} General syntax: \begin{vindent} \begin{verbatim} printdln (delimiter:string, ...) \end{verbatim} \end{vindent} This function operates like \texttt{printd}, but also appends a newline. \subsection{println} \index{println} General syntax: \begin{vindent} \begin{verbatim} println () \end{verbatim} \end{vindent} This function prints a single value like \texttt{print}, but also appends a newline. \subsection{sprint} \index{sprint} General syntax: \begin{vindent} \begin{verbatim} sprint:string () \end{verbatim} \end{vindent} This function operates like \texttt{print}, but returns the string rather than printing it. \subsection{sprintf} \index{sprintf} General syntax: \begin{vindent} \begin{verbatim} sprintf:string (fmt:string, ...) \end{verbatim} \end{vindent} This function operates like \texttt{printf}, but returns the formatted string rather than printing it. \section{Tapset-defined functions\label{sec:Predefined-Functions}} Unlike built-in functions, tapset-defined functions are implemented in tapset scripts. These are individually documented in the in \texttt{tapset::*(3stap)}, \texttt{function::*(3stap)}, and \texttt{probe::*(3stap)} man pages, and implemented under \texttt{/usr/share/systemtap/tapset}. \section{For Further Reference\label{sec:For-Further-Reference}} For more information, see: \begin{itemize} \item The SystemTap tutorial at \url{http://sourceware.org/systemtap/tutorial/} \item The SystemTap wiki at \url{http://sourceware.org/systemtap/wiki} \item The SystemTap documentation page at \url{http://sourceware.org/systemtap/documentation.html} \item From an unpacked source tarball or GIT directory, the examples in in the src/examples directory, the tapsets in the src/tapset directory, and the test scripts in the src/testsuite directory. \item The man pages for tapsets. For a list, run the command \texttt{{}``man -k tapset::}''. \item The man pages for individual probe points. For a list, run the command \texttt{{}``man -k probe::}''. \item The man pages for individual systemtap functions. For a list, run the command \texttt{{}``man -k function::}''. \end {itemize} \setcounter{secnumdepth}{0} \newpage{} \addcontentsline{toc}{section}{Index} \printindex{} \end{document} systemtap-2.9/doc/nomencl.sty000066400000000000000000000154751260561570600164020ustar00rootroot00000000000000%% %% This is file `nomencl.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% nomencl.dtx (with options: `package') %% %% Copyright 1996 Boris Veytsman %% Copyright 1999-2001 Bernd Schandl %% www http://sarovar.org/projects/nomencl %% %% This file can be redistributed and/or modified under the terms %% of the LaTeX Project Public License distributed from CTAN %% archives in the directory macros/latex/base/lppl.txt; either %% version 1.2 of the license, or (at your option) any later version. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% \ProvidesPackage{nomencl}% [2005/09/22 v4.2 Nomenclature package (LN)] \NeedsTeXFormat{LaTeX2e} \newif\if@printeqref \newif\if@printpageref \newif\if@intoc \newif\if@compatibilitymode \DeclareOption{refeq}{\@printeqreftrue} \DeclareOption{norefeq}{\@printeqreffalse} \DeclareOption{refpage}{\@printpagereftrue} \DeclareOption{norefpage}{\@printpagereffalse} \DeclareOption{intoc}{\@intoctrue} \DeclareOption{notintoc}{\@intocfalse} \DeclareOption{compatible}{\@compatibilitymodetrue} \DeclareOption{noncompatible}{\@compatibilitymodefalse} \DeclareOption{prefix}{\def\nomprefix{a}} \DeclareOption{noprefix}{\def\nomprefix{}} \newif\if@loadcfg \DeclareOption{cfg}{\@loadcfgtrue} \DeclareOption{nocfg}{\@loadcfgfalse} \DeclareOption{croatian}{% \def\eqdeclaration#1{, vidi jednad\v{z}bu\nobreakspace(#1)}% \def\pagedeclaration#1{, stranica\nobreakspace#1}% \def\nomname{Popis simbola}} \DeclareOption{danish}{% \def\eqdeclaration#1{, se ligning\nobreakspace(#1)}% \def\pagedeclaration#1{, side\nobreakspace#1}% \def\nomname{Symbolliste}} \DeclareOption{english}{% \def\eqdeclaration#1{, see equation\nobreakspace(#1)}% \def\pagedeclaration#1{, page\nobreakspace#1}% \def\nomname{Nomenclature}} \DeclareOption{french}{% \def\eqdeclaration#1{, voir \'equation\nobreakspace(#1)}% \def\pagedeclaration#1{, page\nobreakspace#1}% \def\nomname{Liste des symboles}} \DeclareOption{german}{% \def\eqdeclaration#1{, siehe Gleichung\nobreakspace(#1)}% \def\pagedeclaration#1{, Seite\nobreakspace#1}% \def\nomname{Symbolverzeichnis}} \DeclareOption{italian}{% \def\eqdeclaration#1{, vedi equazione\nobreakspace(#1)}% \def\pagedeclaration#1{, pagina\nobreakspace#1}% \def\nomname{Elenco dei simboli}} \DeclareOption{polish}{% \def\eqdeclaration#1{, porownaj rownanie\nobreakspace(#1)}% \def\pagedeclaration#1{, strona\nobreakspace#1}% \def\nomname{Lista symboli}} \DeclareOption{portuguese}{% \def\eqdeclaration#1{, veja equa\c{c}\~ao\nobreakspace(#1)}% \def\pagedeclaration#1{, p\'agina\nobreakspace#1}% \def\nomname{Nomenclatura}} \DeclareOption{russian}{% \def\eqdeclaration#1{, \cyrs\cyrm.\nobreakspace(#1)}% \def\pagedeclaration#1{, \cyrs\cyrt\cyrr.\nobreakspace#1}% \def\nomname{\CYRS\cyrp\cyri\cyrs\cyro\cyrk% \ \cyro\cyrb\cyro\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyri% \cyrishrt}} \DeclareOption{spanish}{% \def\eqdeclaration#1{, v\'ease la ecuaci\'on\nobreakspace(#1)}% \def\pagedeclaration#1{, p\'agina\nobreakspace#1}% \def\nomname{Nomenclatura}} \DeclareOption{ukrainian}{% \def\eqdeclaration#1{, \cyrd\cyri\cyrv.\nobreakspace(#1)}% \def\pagedeclaration#1{, \cyrs\cyrt\cyro\cyrr.\nobreakspace#1}% \def\nomname{\CYRP\cyre\cyrr\cyre\cyrl\cyrii\cyrk% \ \cyrp\cyro\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrsftsn}} \ExecuteOptions{noncompatible,notintoc,norefeq,norefpage,prefix,cfg,english} \ProcessOptions\relax \if@compatibilitymode% \def\@outputfileextension{.glo}% \def\@inputfileextension{.gls}% \else% \def\@outputfileextension{.nlo}% \def\@inputfileextension{.nls}% \fi% \def\makenomenclature{% \newwrite\@nomenclaturefile \immediate\openout\@nomenclaturefile=\jobname\@outputfileextension \def\@nomenclature{% \@bsphack \begingroup \@sanitize \@ifnextchar[% {\@@@nomenclature}{\@@@nomenclature[\nomprefix]}}% \typeout{Writing nomenclature file \jobname\@outputfileextension}% \let\makenomenclature\@empty} \if@compatibilitymode\let\makeglossary\makenomenclature\fi% \def\nom@verb{\expandafter\strip@prefix\meaning} \def\nomenclature{\protect\@nomenclature} \def\@nomenclature{% \@bsphack \begingroup \@sanitize \@ifnextchar[% {\@@nomenclature}{\@@nomenclature[\nomprefix]}} \def\@@nomenclature[#1]#2#3{\endgroup\@esphack} \def\@@@nomenclature[#1]#2#3{% \def\@tempa{#2}\def\@tempb{#3}% \protected@write\@nomenclaturefile{}% {\string\nomenclatureentry{#1\nom@verb\@tempa @[{\nom@verb\@tempa}]% \begingroup\nom@verb\@tempb\protect\nomeqref{\theequation}% |nompageref}{\thepage}}% \endgroup \@esphack} \def\nomgroup#1{} \newdimen\nomlabelwidth \nomlabelwidth1cm\relax \newdimen\nom@tempdim \def\printnomenclature{% \@ifnextchar[% {\@printnomenclature}{\@printnomenclature[\nomlabelwidth]}} \def\@printnomenclature[#1]{% \nom@tempdim#1\relax \@input@{\jobname\@inputfileextension}} \if@compatibilitymode\let\printglossary\printnomenclature\fi% \def\nomlabel#1{#1\hfil} \def\nompreamble{} \def\nompostamble{} \def\nomentryend{} \newskip\nomitemsep \nomitemsep\itemsep \def\thenomenclature{% \@ifundefined{chapter}% { \section*{\nomname} \if@intoc\addcontentsline{toc}{section}{\nomname}\fi% }% { \chapter*{\nomname} \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi% }% \nompreamble \list{}{% \labelwidth\nom@tempdim \leftmargin\labelwidth \advance\leftmargin\labelsep \itemsep\nomitemsep \let\makelabel\nomlabel}} \def\endthenomenclature{% \endlist \nompostamble} \def\nomrefeq{\@printeqreftrue} \def\nomrefpage{\@printpagereftrue} \def\nomrefeqpage{\@printeqreftrue\@printpagereftrue} \def\nomnorefeq{\@printeqreffalse} \def\nomnorefpage{\@printpagereffalse} \def\nomnorefeqpage{\@printeqreffalse\@printpagereffalse} \def\nomeqref#1{\if@printeqref\eqdeclaration{#1}\fi\ignorespaces} \def\nompageref#1{\if@printpageref\pagedeclaration{#1}\fi% \nomentryend\endgroup} \if@loadcfg \InputIfFileExists{nomencl.cfg}{% \typeout{Using the configuration file nomencl.cfg}}{} \fi \endinput %% %% End of file `nomencl.sty'. systemtap-2.9/doc/tutorial.tex000066400000000000000000001473061260561570600165720ustar00rootroot00000000000000% Copyright (C) 2005-2013 Red Hat Inc. % This file is part of systemtap, and is free software. You can % redistribute it and/or modify it under the terms of the GNU General % Public License (GPL); either version 2, or (at your option) any % later version. \documentclass{article} \usepackage{html} \usepackage{graphicx} % \usepackage{moreverb} \usepackage{fancyvrb} \usepackage{listings} \usepackage{fullpage} \usepackage{fancybox} \usepackage[compatible]{nomencl} % \usepackage{geometry} % \geometry{letterpaper,text={7in,8.5in}} \usepackage{charter} \newenvironment{boxedminipage}%% Boxed minipage {\begin{makeimage}\begin{center}\begin{Sbox}\begin{minipage}}% {\end{minipage}\end{Sbox}\fbox{\TheSbox}\end{center}\end{makeimage}} \begin{htmlonly} \renewcommand{\nomenclature}[2]{} \end{htmlonly} % \usepackage{draftcopy} % ugly \bibliographystyle{plain} \makeglossary \parindent0.0cm \parskip0.2cm \begin{document} \begin{center} \LARGE {\bf Systemtap tutorial} \end{center} \hfill \begin{minipage}{2.5in} % contributors please add your names to the list Frank Ch. Eigler {\tt \small } \\ \hfill \today \end{minipage} \tableofcontents \section{Introduction} Systemtap is a tool that allows developers and administrators to write and reuse simple scripts to deeply examine the activities of a live Linux system. Data may be extracted, filtered, and summarized quickly and safely, to enable diagnoses of complex performance or functional problems. {\bf NOTE:} This tutorial does not describe every feature available in systemtap. Please see the individual {\verb+stap+} manual pages for the most up-to-date information. These may be available installed on your system, or at \verb+http://sourceware.org/systemtap/man/+. \nomenclature{script}{A simple programming language understood by systemtap.} The essential idea behind a systemtap script is to name {\em events}, and to give them {\em handlers}. Whenever a specified event occurs, the Linux kernel runs the handler as if it were a quick subroutine, then resumes. There are several kind of events, such as entering or exiting a function, a timer expiring, or the entire systemtap session starting or stopping. A handler is a series of script language statements that specify the work to be done whenever the event occurs. This work normally includes extracting data from the event context, storing them into internal variables, or printing results. \nomenclature{event}{An identifiable instant in the operating system's execution state, such as entry to a function, or expiry of a timer.} \nomenclature{session}{A complete run of a systemtap script program.} \nomenclature{handler}{A series of statements, written in script, which is to be performed whenever an event occurs.} \nomenclature{\tt .stp}{The standard file name extension for systemtap scripts.} Systemtap works by translating the script to C, running the system C compiler to create a kernel module from that. When the module is loaded, it activates all the probed events by hooking into the kernel. Then, as events occur on any processor, the compiled handlers run. Eventually, the session stops, the hooks are disconnected, and the module removed. This entire process is driven from a single command-line program, \verb+stap+. \begin{figure}[!ht] \begin{boxedminipage}{4.5in} \begin{verbatim} # cat hello-world.stp probe begin { print ("hello world\n") exit () } # stap hello-world.stp hello world \end{verbatim} \end{boxedminipage} \label{fig:hello-world} \caption{A systemtap smoke test.} \end{figure} This paper assumes that you have installed systemtap and its prerequisite kernel development tools and debugging data, so that you can run the scripts such as the simple one in Figure~\ref{fig:hello-world}. Log on as \verb+root+, or even better, login as a user that is a member of \verb+stapdev+ group or as a user authorized to \verb+sudo+, before running systemtap. \begin{figure}[ht] \begin{boxedminipage}{4.5in} \begin{verbatim} # cat strace-open.stp probe syscall.open { printf ("%s(%d) open (%s)\n", execname(), pid(), argstr) } probe timer.ms(4000) # after 4 seconds { exit () } # stap strace-open.stp vmware-guestd(2206) open ("/etc/redhat-release", O_RDONLY) hald(2360) open ("/dev/hdc", O_RDONLY|O_EXCL|O_NONBLOCK) hald(2360) open ("/dev/hdc", O_RDONLY|O_EXCL|O_NONBLOCK) hald(2360) open ("/dev/hdc", O_RDONLY|O_EXCL|O_NONBLOCK) df(3433) open ("/etc/ld.so.cache", O_RDONLY) df(3433) open ("/lib/tls/libc.so.6", O_RDONLY) df(3433) open ("/etc/mtab", O_RDONLY) hald(2360) open ("/dev/hdc", O_RDONLY|O_EXCL|O_NONBLOCK) \end{verbatim} \end{boxedminipage} \label{fig:strace-open} \caption{A taste of systemtap: a system-wide {\tt strace}, just for the {\tt open} system call.} \end{figure} \nomenclature{strace}{A standard ptrace-based command line tool to trace system call activity of a process.} \section{Tracing} The simplest kind of probe is simply to {\em trace} an event. \nomenclature{trace}{A compact textual record of an event occurrence.} This is the effect of inserting strategically located \verb+print+ statements into a program. This is often the first step of problem solving: explore by seeing a history of what has happened. This style of instrumentation is the simplest. It just asks systemtap to print something at each event. To express this in the script language, you need to say where to probe and what to print there. \subsection{Where to probe} Systemtap supports a number of built-in events. The library of scripts that comes with systemtap, each called a ``tapset'', may define additional ones defined in terms of the built-in family. {\bf See the \verb+stapprobes+ man page for details on these and many other probe point families.} \nomenclature{tapset}{A reusable script forming part of the automatically searched tapset library.} All these events are named using a unified syntax with dot-separated parameterized identifiers: \begin{tabular}{rl} \verb+begin+ & The startup of the systemtap session. \\ \verb+end+ & The end of the systemtap session. \\ \verb+kernel.function("sys_open")+ & The entry to the function named \verb+sys_open+ in the kernel. \\ \verb+syscall.close.return+ & The return from the \verb+close+ system call. \\ \verb+module("ext3").statement(0xdeadbeef)+ & The addressed instruction in the \verb+ext3+ filesystem driver. \\ \verb+timer.ms(200)+ & A timer that fires every 200 milliseconds. \\ \verb+timer.profile+ & A timer that fires periodically on every CPU. \\ \verb+perf.hw.cache_misses+ & A particular number of CPU cache misses have occurred. \\ \verb+procfs("status").read+ & A process trying to read a synthetic file. \\ \verb+process("a.out").statement("*@main.c:200")+ & Line 200 of the \verb+a.out+ program. \end{tabular} Let's say that you would like to trace all function entries and exits in a source file, say \verb+net/socket.c+ in the kernel. The \verb+kernel.function+ probe point lets you express that easily, since systemtap examines the kernel's debugging information to relate object code to source code. It works like a debugger: if you can name or place it, you can probe it. Use \verb+kernel.function("*@net/socket.c").call+ for the function entries\footnote{Without the {\tt .call} qualifier, inlined function instances are also probed, but they have no corresponding {\tt .return}.}, and \verb+kernel.function("*@net/socket.c").return+ for matching exits. Note the use of wildcards in the function name part, and the subsequent \verb+@FILENAME+ part. You can also put wildcards into the file name, and even add a colon (\verb+:+) and a line number, if you want to restrict the search that precisely. Since systemtap will put a separate probe in every place that matches a probe point, a few wildcards can expand to hundreds or thousands of probes, so be careful what you ask for. \nomenclature{debug information}{Data created by the compiler when the kernel or application was built, sometimes packaged into {\tt debuginfo} files, for use by a symbolic debugger.} \nomenclature{wildcard}{Presence of \verb+*+ globbing patterns in probe points.} Once you identify the probe points, the skeleton of the systemtap script appears. The \verb+probe+ keyword introduces a probe point, or a comma-separated list of them. The following \verb+{+ and \verb+}+ braces enclose the handler for all listed probe points. \begin{verbatim} probe kernel.function("*@net/socket.c") { } probe kernel.function("*@net/socket.c").return { } \end{verbatim} You can run this script as is, though with empty handlers there will be no output. Put the two lines into a new file. Run \verb+stap -v FILE+. Terminate it any time with \verb+^C+. (The \verb+-v+ option tells systemtap to print more verbose messages during its processing. Try the \verb+-h+ option to see more options.) \subsection{What to print} Since you are interested in each function that was entered and exited, a line should be printed for each, containing the function name. In order to make that list easy to read, systemtap should indent the lines so that functions called by other traced functions are nested deeper. To tell each single process apart from any others that may be running concurrently, systemtap should also print the process ID in the line. Systemtap provides a variety of such contextual data, ready for formatting. They usually appear as function calls within the handler, like you already saw in Figure~\ref{fig:strace-open}. {\bf See the \verb+function::*+ man pages for those functions and more defined in the tapset library}, but here's a sampling: \begin{tabular}{rl} \verb+tid()+ & The id of the current thread. \\ \verb+pid()+ & The process (task group) id of the current thread. \\ \verb+uid()+ & The id of the current user. \\ \verb+execname()+ & The name of the current process. \\ \verb+cpu()+ & The current cpu number. \\ \verb+gettimeofday_s()+ & Number of seconds since epoch. \\ \verb+get_cycles()+ & Snapshot of hardware cycle counter. \\ \verb+pp()+ & A string describing the probe point being currently handled. \\ \verb+ppfunc()+ & If known, the the function name in which this probe was placed. \\ \verb+$$vars+ & If available, a pretty-printed listing of all local variables in scope. \\ \verb+print_backtrace()+ & If possible, print a kernel backtrace. \\ \verb+print_ubacktrace()+ & If possible, print a user-space backtrace. \\ \end{tabular} The values returned may be strings or numbers. The \verb+print()+ built-in function accepts either as its sole argument. Or, you can use the C-style \verb+printf()+ built-in, whose formatting argument may include \verb+%s+ for a string, \verb+%d+ for a number. \verb+printf+ and other functions take comma-separated arguments. Don't forget a \verb+"\n"+ at the end. There exist more printing / formatting functions too. A particularly handy function in the tapset library is \verb+thread_indent+. Given an indentation delta parameter, it stores internally an indentation counter for each thread (\verb+tid()+), and returns a string with some generic trace data plus an appropriate number of indentation spaces. That generic data includes a timestamp (number of microseconds since the initial indentation for the thread), a process name and the thread id itself. It therefore gives an idea not only about what functions were called, but who called them, and how long they took. Figure~\ref{fig:socket-trace} shows the finished script. It lacks a call to the \verb+exit()+ function, so you need to interrupt it with \verb+^C+ when you want the tracing to stop. \begin{figure}[!ht] \begin{boxedminipage}{4.5in} \begin{verbatim} # cat socket-trace.stp probe kernel.function("*@net/socket.c").call { printf ("%s -> %s\n", thread_indent(1), ppfunc()) } probe kernel.function("*@net/socket.c").return { printf ("%s <- %s\n", thread_indent(-1), ppfunc()) } # stap socket-trace.stp 0 hald(2632): -> sock_poll 28 hald(2632): <- sock_poll [...] 0 ftp(7223): -> sys_socketcall 1159 ftp(7223): -> sys_socket 2173 ftp(7223): -> __sock_create 2286 ftp(7223): -> sock_alloc_inode 2737 ftp(7223): <- sock_alloc_inode 3349 ftp(7223): -> sock_alloc 3389 ftp(7223): <- sock_alloc 3417 ftp(7223): <- __sock_create 4117 ftp(7223): -> sock_create 4160 ftp(7223): <- sock_create 4301 ftp(7223): -> sock_map_fd 4644 ftp(7223): -> sock_map_file 4699 ftp(7223): <- sock_map_file 4715 ftp(7223): <- sock_map_fd 4732 ftp(7223): <- sys_socket 4775 ftp(7223): <- sys_socketcall [...] \end{verbatim} \end{boxedminipage} \caption{Tracing and timing functions in {\tt net/sockets.c}.} \label{fig:socket-trace} \end{figure} \subsection{Exercises} \begin{enumerate} \item Use the \verb+-L+ option to systemtap to list all the kernel functions named with the word ``nit'' in them. \item Trace some system calls (use \verb+syscall.NAME+ and \verb+.return+ probe points), with the same \verb+thread_indent+ probe handler as in Figure~\ref{fig:socket-trace}. Print parameters using \verb+$$parms+ and \verb+$$return+. Interpret the results. \item Change figure~\ref{fig:socket-trace} by removing the \verb+.call+ modifier from the first probe. Note how function entry and function return now don't match anymore. This is because now the first probe will match both normal function entry and inlined functions. Try putting the \verb+.call+ modifier back and add another probe just for \verb+probe kernel.function("*@net/socket.c").inline+ What \verb+printf+ statement can you come up with in the probe handler to show the inlined function entries nicely in between the \verb+.call+ and \verb+.return+ thread indented output? \end{enumerate} \section{Analysis} Pages of generic tracing text may give you enough information for exploring a system. With systemtap, it is possible to analyze that data, to filter, aggregate, transform, and summarize it. Different probes can work together to share data. Probe handlers can use a rich set of control constructs to describe algorithms, with a syntax taken roughly from \verb+awk+. With these tools, systemtap scripts can focus on a specific question and provide a compact response: no \verb+grep+ needed. \nomenclature{awk}{A classic UNIX stream processing language.} \subsection{Basic constructs} Most systemtap scripts include conditionals, to limit tracing or other logic to those processes or users or {\em whatever} of interest. The syntax is simple: \begin{tabular}{rl} \verb+if (+{\em EXPR}\verb+)+ {\em STATEMENT} [\verb+else+ {\em STATEMENT}\verb+]+ & if/else statement \\ \verb+while (+{\em EXPR}\verb+)+ {\em STATEMENT} & while loop \\ \verb+for (+{\em A}\verb+;+ {\em B}\verb+;+ {\em C}\verb+)+ {\em STATEMENT} & for loop \\ \end{tabular} Scripts may use \verb+break+/\verb+continue+ as in C. Probe handlers can return early using \verb+next+ as in \verb+awk+. Blocks of statements are enclosed in \verb+{+ and \verb+}+. In systemtap, the semicolon (\verb+;+) is accepted as a null statement rather than as a statement terminator, so is only rarely\footnote{Use them between consecutive expressions that place unary {\tt +},{\tt -} or mixed pre/post {\tt ++},{\tt --} in an ambiguous manner.} necessary. Shell-style (\verb+#+), C-style (\verb+/* */+), and C++-style (\verb+//+) comments are all accepted. Expressions look like C or \verb+awk+, and support the usual operators, precedences, and numeric literals. Strings are treated as atomic values rather than arrays of characters. String concatenation is done with the dot (\verb+"a" . "b"+). Some examples: \begin{tabular}{rl} \verb+(uid() > 100)+ & probably an ordinary user \\ \verb+(execname() == "sed")+ & current process is sed \\ \verb+(cpu() == 0 && gettimeofday_s() > 1140498000)+ & after Feb. 21, 2006, on CPU 0 \\ \verb+"hello" . " " . "world"+ & a string in three easy pieces \\ \end{tabular} Variables may be used as well. Just pick a name, assign to it, and use it in expressions. They are automatically initialized and declared. The type of each identifier -- string vs. number -- is automatically inferred by systemtap from the kinds of operators and literals used on it. Any inconsistencies will be reported as errors. Conversion between string and number types is done through explicit function calls. \nomenclature{type}{A designation of each identifier such as a variable, or function, or array value or index, as containing a string or number.} \nomenclature{string}{A \verb+\0+-terminated character string of up to a fixed limit in length.} \nomenclature{number}{A 64-bit signed integer.} \nomenclature{type inference}{The automatic determination of the type of each variable, function parameter, array value and index, based on their use.} \begin{tabular}{rl} \verb+foo = gettimeofday_s()+ & foo is a number \\ \verb+bar = "/usr/bin/" . execname()+ & bar is a string \\ \verb|c++| & c is a number \\ \verb+s = sprint(2345)+ & s becomes the string "2345" \\ \end{tabular} By default, variables are local to the probe they are used in. That is, they are initialized, used, and disposed of at each probe handler invocation. To share variables between probes, declare them global anywhere in the script. Because of possible concurrency (multiple probe handlers running on different CPUs), each global variable used by a probe is automatically read- or write-locked while the handler is running. \nomenclature{global variable}{A scalar, array, or aggregate that was named in a \verb+global+ declaration, sharing that object amongst all probe handlers and functions executed during a systemtap session.} \nomenclature{locking}{An automated facility used by systemtap to protect global variables against concurrent modification and/or access.} \begin{figure}[!ht] \begin{boxedminipage}{4.5in} \begin{verbatim} # cat timer-jiffies.stp global count_jiffies, count_ms probe timer.jiffies(100) { count_jiffies ++ } probe timer.ms(100) { count_ms ++ } probe timer.ms(12345) { hz=(1000*count_jiffies) / count_ms printf ("jiffies:ms ratio %d:%d => CONFIG_HZ=%d\n", count_jiffies, count_ms, hz) exit () } # stap timer-jiffies.stp jiffies:ms ratio 30:123 => CONFIG_HZ=243 \end{verbatim} \end{boxedminipage} \caption{Experimentally measuring {\tt CONFIG\_HZ}.} \label{fig:timer-jiffies} \end{figure} \subsection{Target variables} A class of special ``target variables'' allow access to the probe point context. \nomenclature{target variable}{A value that may be extracted from the kernel context of the probe point, such as a parameter or local variable within a probed function.} In a symbolic debugger, when you're stopped at a breakpoint, you can print values from the program's context. In systemtap scripts, for those probe points that match with specific executable point (rather than an asynchronous event like a timer), you can do the same. In addition, you can take their address (the \verb+&+ operator), pretty-print structures (the \verb+$+ and \verb+$$+ suffix), pretty-print multiple variables in scope (the \verb+$$vars+ and related variables), or cast pointers to their types (the \verb+@cast+ operator), or test their existence / resolvability (the \verb+@defined+ operator). Read about these in the manual pages. To know which variables are likely to be available, you will need to be familiar with the kernel source you are probing. In addition, you will need to check that the compiler has not optimized those values into unreachable nonexistence. You can use \verb+stap -L PROBEPOINT+ to enumerate the variables available there. Let's say that you are trying to trace filesystem reads/writes to a particular device/inode. From your knowledge of the kernel, you know that two functions of interest could be \verb+vfs_read+ and \verb+vfs_write+. Each takes a \verb+struct file *+ argument, inside there is either a \verb+struct dentry *+ or \verb+struct path *+ which has a \verb+struct dentry *+. The \verb+struct dentry *+ contains a \verb+struct inode *+, and so on. Systemtap allows limited dereferencing of such pointer chains. Two functions, \verb+user_string+ and \verb+kernel_string+, can copy \verb+char *+ target variables into systemtap strings. Figure~\ref{fig:inode-watch} demonstrates one way to monitor a particular file (identified by device number and inode number). The script selects the appropriate variants of \verb+dev_nr+ and\verb+inode_nr+ based on the kernel version. This example also demonstrates passing numeric command-line arguments (\verb+$1+ etc.) into scripts. %$ \begin{figure}[!ht] \begin{boxedminipage}{4.5in} \begin{verbatim} # cat inode-watch.stp probe kernel.function ("vfs_write"), kernel.function ("vfs_read") { if (@defined($file->f_path->dentry)) { dev_nr = $file->f_path->dentry->d_inode->i_sb->s_dev inode_nr = $file->f_path->dentry->d_inode->i_ino } else { dev_nr = $file->f_dentry->d_inode->i_sb->s_dev inode_nr = $file->f_dentry->d_inode->i_ino } if (dev_nr == ($1 << 20 | $2) # major/minor device && inode_nr == $3) printf ("%s(%d) %s 0x%x/%u\n", execname(), pid(), ppfunc(), dev_nr, inode_nr) } # stat -c "%D %i" /etc/crontab fd03 133099 # stap inode-watch.stp 0xfd 3 133099 more(30789) vfs_read 0xfd00003/133099 more(30789) vfs_read 0xfd00003/133099 \end{verbatim} % $ \end{boxedminipage} \caption{Watching for reads/writes to a particular file.} \label{fig:inode-watch} \end{figure} \subsection{Functions} Functions are conveniently packaged reusable software: it would be a shame to have to duplicate a complex condition expression or logging directive in every placed it's used. So, systemtap lets you define functions of your own. Like global variables, systemtap functions may be defined anywhere in the script. They may take any number of string or numeric arguments (by value), and may return a single string or number. The parameter types are inferred as for ordinary variables, and must be consistent throughout the program. Local and global script variables are available, but target variables are {\em not}. That's because there is no specific debugging-level context associated with a function. \nomenclature{function}{A clump of parametrized script statements that may be repeatedly and recursively called from probe handlers and other functions.} A function is defined with the keyword \verb+function+ followed by a name. Then comes a comma-separated formal argument list (just a list of variable names). The \verb+{ }+-enclosed body consists of any list of statements, including expressions that call functions. Recursion is possible, up to a nesting depth limit. Figure~\ref{fig:functions} displays function syntax. \begin{figure}[!ht] \begin{boxedminipage}{4.5in} \begin{verbatim} # Red Hat convention; see /etc/login.defs UID_MIN function system_uid_p (u) { return u < 500 } # kernel device number assembly macro function makedev (major,minor) { return major << 20 | minor } function trace_common () { printf("%d %s(%d)", gettimeofday_s(), execname(), pid()) # no return value necessary } function fibonacci (i) { if (i < 1) return 0 else if (i < 2) return 1 else return fibonacci(i-1) + fibonacci(i-2) } \end{verbatim} \end{boxedminipage} \caption{Some functions of dubious utility.} \label{fig:functions} \end{figure} \subsection{Arrays} Often, probes will want to share data that cannot be represented as a simple scalar value. Much data is naturally tabular in nature, indexed by some tuple of thread numbers, processor ids, names, time, and so on. Systemtap offers associative arrays for this purpose. These arrays are implemented as hash tables with a maximum size that is fixed at startup. Because they are too large to be created dynamically for individual probes handler runs, they must be declared as global. \nomenclature{array}{A global \verb+[+$k_1,k_2,\ldots,k_n\verb+]+\rightarrow value$ associative lookup table, with a string, number for each index; the value may be a string, number, or an aggregate.} \begin{tabular}{rl} \verb|global a| & declare global scalar or array variable \\ \verb|global b[400]| & declare array, reserving space for up to 400 tuples \\ \end{tabular} The basic operations for arrays are setting and looking up elements. These are expressed in \verb+awk+ syntax: the array name followed by an opening \verb+[+ bracket, a comma-separated list of index expressions, and a closing \verb+]+ bracket. Each index expression may be string or numeric, as long as it is consistently typed throughout the script. \nomenclature{arity}{Number of indexes to an array, or number of parameters to a function.} \begin{tabular}{rl} \verb|foo [4,"hello"] ++ | & increment the named array slot \\ \verb|processusage [uid(),execname()] ++| & update a statistic \\ \verb|times [tid()] = get_cycles()| & set a timestamp reference point \\ \verb|delta = get_cycles() - times [tid()]| & compute a timestamp delta \\ \end{tabular} Array elements that have not been set {\em may} be fetched, and return a dummy null value (zero or an empty string) as appropriate. However, assigning a null value does not delete the element: an explicit \verb|delete| statement is required. \nomenclature{null value}{A default initialized value for globals and array elements: a zero or an empty string, depending on type.} Systemtap provides syntactic sugar for these operations, in the form of explicit membership testing and deletion. \begin{tabular}{rl} \verb|if ([4,"hello"] in foo) { }| & membership test \\ \verb|delete times[tid()]| & deletion of a single element \\ \verb|delete times| & deletion of all elements \\ \end{tabular} One final and important operation is iteration over arrays. This uses the keyword \verb+foreach+. Like \verb+awk+, this creates a loop that {\em iterates over key tuples} of an array, not just {\em values}. In addition, the iteration may be {\em sorted} by any single key or the value by adding an extra \verb|+| or \verb|-| code. The \verb+break+ and \verb+continue+ statements work inside \verb+foreach+ loops, too. Since arrays can be large but probe handlers must not run for long, it is a good idea to exit iteration early if possible. The \verb+limit+ option in the \verb+foreach+ expression is one way. For simplicity, systemtap forbids any {\em modification} of an array while it is being iterated using a \verb+foreach+. \begin{tabular}{rp{0.4\textwidth}} \verb|foreach (x = [a,b] in foo) { fuss_with(x) }| & simple loop in arbitrary sequence \\ \verb|foreach ([a,b] in foo+ limit 5) { }| & loop in increasing sequence of value, stop after 5 \\ \verb|foreach ([a-,b] in foo) { }| & loop in decreasing sequence of first key \\ \end{tabular} \subsection{Aggregates} When we said above that values can only be strings or numbers, we lied a little. There is a third type: statistics aggregates, or aggregates for short. Instances of this type are used to collect statistics on numerical values, where it is important to accumulate new data quickly ({\em without} exclusive locks) and in large volume (storing only aggregated stream statistics). This type only makes sense for global variables, and may be stored individually or as elements of an array. \nomenclature{aggregate}{A special ``write-mostly'' data type used to efficiently store aggregated statistical values of a potentially huge data stream.} To add a value to a statistics aggregate, systemtap uses the special operator \verb+<<<+. Think of it like C++'s \verb+<<+ output streamer: the left hand side object accumulates the data sample given on the right hand side. This operation is efficient (taking a shared lock) because the aggregate values are kept separately on each processor, and are only aggregated across processors on request. \begin{verbatim} a <<< delta_timestamp writes[execname()] <<< count \end{verbatim} To read the aggregate value, special functions are available to extract a selected statistical function. {\em The aggregate value cannot be read by simply naming it as if it were an ordinary variable.} These operations take an exclusive lock on the respective globals, and should therefore be relatively rare. The simple ones are: \verb+@min+, \verb+@max+, \verb+@count+, \verb+@avg+, and \verb+@sum+, and evaluate to a single number. In addition, histograms of the data stream may be extracted using the \verb+@hist_log+ and \verb+@hist_linear+. These evaluate to a special sort of array that may at present\footnote{We anticipate support for indexing and looping using {\tt foreach} shortly.} only be printed. \nomenclature{extractor}{A function-like expression in a script that computes a single statistic for a given aggregate.} \begin{tabular}{rp{0.5\textwidth}} \verb+@avg(a)+ & the average of all the values accumulated into \verb+a+ \\ \verb+print(@hist_linear(a,0,100,10))+ & print an ``ascii art'' linear histogram of the same data stream, bounds $0 \ldots 100$, bucket width is $10$ \\ \verb|@count(writes["zsh"])| & the number of times ``zsh'' ran the probe handler \\ \verb+print(@hist_log(writes["zsh"]))+ & print an ``ascii art'' logarithmic histogram of the same data stream \\ \end{tabular} \subsection{Safety} \label{sec:safety} The full expressivity of the scripting language raises good questions of safety. Here is a set of Q\&A: \begin{description} \item{\bf What about infinite loops? recursion?} A probe handler is bounded in time. The C code generated by systemtap includes explicit checks that limit the total number of statements executed to a small number. A similar limit is imposed on the nesting depth of function calls. When either limit is exceeded, that probe handler cleanly aborts and signals an error. The systemtap session is normally configured to abort as a whole at that time. \item{\bf What about running out of memory?} No dynamic memory allocation whatsoever takes place during the execution of probe handlers. Arrays, function contexts, and buffers are allocated during initialization. These resources may run out during a session, and generally result in errors. \item{\bf What about locking?} If multiple probes seek conflicting locks on the same global variables, one or more of them will time out, and be aborted. Such events are tallied as ``skipped'' probes, and a count is displayed at session end. A configurable number of skipped probes can trigger an abort of the session. \item{\bf What about null pointers? division by zero?} The C code generated by systemtap translates potentially dangerous operations to routines that check their arguments at run time. These signal errors if they are invalid. Many arithmetic and string operations silently overflow if the results exceed representation limits. \item{\bf What about bugs in the translator? compiler?} While bugs in the translator, or the runtime layer certainly exist\footnote{See \tt http://sourceware.org/bugzilla}, our test suite gives some assurance. Plus, the entire generated C code may be inspected (try the \verb+-p3+ option). Compiler bugs are unlikely to be of any greater concern for systemtap than for the kernel as a whole. In other words, if it was reliable enough to build the kernel, it will build the systemtap modules properly too. \item{\bf Is that the whole truth?} In practice, there are several weak points in systemtap and the underlying kprobes system at the time of writing. Putting probes indiscriminately into unusually sensitive parts of the kernel (low level context switching, interrupt dispatching) has reportedly caused crashes in the past. We are fixing these bugs as they are found, and constructing a probe point ``blacklist'', but it is not complete. \nomenclature{blacklist}{A list of probe point patterns encoded into the translator or the kernel, where probing is prohibited for safety reasons.} \nomenclature{kprobes}{A breakpoint dispatching system for dynamic kernel probes, used by systemtap to implement some families of probe points.} \end{description} \subsection{Exercises} \begin{enumerate} \item Alter the last probe in \verb+timer-jiffies.stp+ to reset the counters and continue reporting instead of exiting. \item Write a script that, every ten seconds, displays the top five most frequent users of \verb+open+ system call during that interval. \item Write a script that experimentally measures the speed of the \verb+get_cycles()+ counter on each processor. \item Use any suitable probe point to get an approximate profile of process CPU usage: which processes/users use how much of each CPU. \end{enumerate} \section{Tapsets} After writing enough analysis scripts for yourself, you may become known as an expert to your colleagues, who will want to use your scripts. Systemtap makes it possible to share in a controlled manner; to build libraries of scripts that build on each other. In fact, all of the functions (\verb+pid()+, etc.) used in the scripts above come from tapset scripts like that. A ``tapset'' is just a script that designed for reuse by installation into a special directory. \subsection{Automatic selection} Systemtap attempts to resolve references to global symbols (probes, functions, variables) that are not defined within the script by a systematic search through the tapset library for scripts that define those symbols. Tapset scripts are installed under the default directory named \verb+/usr/share/systemtap/tapset+. A user may give additional directories with the \verb+-I DIR+ option. Systemtap searches these directories for script (\verb+.stp+) files. The search process includes subdirectories that are specialized for a particular kernel version and/or architecture, and ones that name only larger kernel families. Naturally, the search is ordered from specific to general, as shown in Figure~\ref{fig:tapset-search}. \nomenclature{tapset search path}{A list of subdirectories searched by systemtap for tapset scripts, allowing specialization by version architecture.} \begin{figure}[!ht] \begin{boxedminipage}{6in} \begin{verbatim} # stap -p1 -vv -e 'probe begin { }' > /dev/null Created temporary directory "/tmp/staplnEBh7" Searched '/usr/share/systemtap/tapset/2.6.15/i686/*.stp', match count 0 Searched '/usr/share/systemtap/tapset/2.6.15/*.stp', match count 0 Searched '/usr/share/systemtap/tapset/2.6/i686/*.stp', match count 0 Searched '/usr/share/systemtap/tapset/2.6/*.stp', match count 0 Searched '/usr/share/systemtap/tapset/i686/*.stp', match count 1 Searched '/usr/share/systemtap/tapset/*.stp', match count 12 Pass 1: parsed user script and 13 library script(s) in 350usr/10sys/375real ms. Running rm -rf /tmp/staplnEBh7 \end{verbatim} \end{boxedminipage} \caption{Listing the tapset search path.} \label{fig:tapset-search} \end{figure} When a script file is found that {\em defines} one of the undefined symbols, that {\em entire file} is added to the probing session being analyzed. This search is repeated until no more references can become satisfied. Systemtap signals an error if any are still unresolved. This mechanism enables several programming idioms. First, it allows some global symbols to be defined only for applicable kernel version/architecture pairs, and cause an error if their use is attempted on an inapplicable host. Similarly, the same symbol can be defined differently depending on kernels, in much the same way that different kernel \verb+include/asm/ARCH/+ files contain macros that provide a porting layer. Another use is to separate the default parameters of a tapset routine from its implementation. For example, consider a tapset that defines code for relating elapsed time intervals to process scheduling activities. The data collection code can be generic with respect to which time unit (jiffies, wall-clock seconds, cycle counts) it can use. It should have a default, but should not require additional run-time checks to let a user choose another. Figure~\ref{fig:tapset-default} shows a way. \begin{figure}[!ht] \begin{boxedminipage}{6in} \begin{verbatim} # cat tapset/time-common.stp global __time_vars function timer_begin (name) { __time_vars[name] = __time_value () } function timer_end (name) { return __time_value() - __time_vars[name] } # cat tapset/time-default.stp function __time_value () { return gettimeofday_us () } # cat tapset-time-user.stp probe begin { timer_begin ("bench") for (i=0; i<100; i++) ; printf ("%d cycles\n", timer_end ("bench")) exit () } function __time_value () { return get_ticks () } # override for greater precision \end{verbatim} \end{boxedminipage} \caption{Providing an overrideable default.} \label{fig:tapset-default} \end{figure} A tapset that exports only {\em data} may be as useful as ones that exports functions or probe point aliases (see below). Such global data can be computed and kept up-to-date using probes internal to the tapset. Any outside reference to the global variable would incidentally activate all the required probes. \subsection{Probe point aliases} \nomenclature{probe point alias}{A probe point that is defined in terms of another probe point.} Probe point aliases allow creation of new probe points from existing ones. This is useful if the new probe points are named to provide a higher level of abstraction. For example, the system-calls tapset defines probe point aliases of the form \verb+syscall.open+ etc., in terms of lower level ones like \verb+kernel.function("sys_open")+. Even if some future kernel renames \verb+sys_open+, the aliased name can remain valid. A probe point alias definition looks like a normal probe. Both start with the keyword \verb+probe+ and have a probe handler statement block at the end. But where a normal probe just lists its probe points, an alias creates a new name using the assignment (\verb+=+) operator. Another probe that names the new probe point will create an actual probe, with the handler of the alias {\em prepended}. This prepending behavior serves several purposes. It allows the alias definition to ``preprocess'' the context of the probe before passing control to the user-specified handler. This has several possible uses: \begin{tabular}{rl} \verb+if ($flag1 != $flag2) next+ & skip probe unless given condition is met \\ \verb+name = "foo"+ & supply probe-describing values \\ \verb+var = $var+ & extract target variable to plain local variable \\ %$ \end{tabular} Figure~\ref{fig:probe-alias} demonstrates a probe point alias definition as well as its use. It demonstrates how a single probe point alias can expand to multiple probe points, even to other aliases. It also includes probe point wildcarding. These functions are designed to compose sensibly. \begin{figure}[!ht] \begin{boxedminipage}{4.5in} \begin{verbatim} # cat probe-alias.stp probe syscallgroup.io = syscall.open, syscall.close, syscall.read, syscall.write { groupname = "io" } probe syscallgroup.process = syscall.fork, syscall.execve { groupname = "process" } probe syscallgroup.* { groups [execname() . "/" . groupname] ++ } probe end { foreach (eg+ in groups) printf ("%s: %d\n", eg, groups[eg]) } global groups # stap probe-alias.stp 05-wait_for_sys/io: 19 10-udev.hotplug/io: 17 20-hal.hotplug/io: 12 X/io: 73 apcsmart/io: 59 [...] make/io: 515 make/process: 16 [...] xfce-mcs-manage/io: 3 xfdesktop/io: 5 [...] xmms/io: 7070 zsh/io: 78 zsh/process: 5 \end{verbatim} \end{boxedminipage} \caption{Classified system call activity.} \label{fig:probe-alias} \end{figure} \subsection{Embedded C} \label{embedded-c} Sometimes, a tapset needs provide data values from the kernel that cannot be extracted using ordinary target variables (\verb+$var+). %$ This may be because the values are in complicated data structures, may require lock awareness, or are defined by layers of macros. Systemtap provides an ``escape hatch'' to go beyond what the language can safely offer. In certain contexts, you may embed plain raw C in tapsets, exchanging power for the safety guarantees listed in section~\ref{sec:safety}. End-user scripts {\em may not} include embedded C code, unless systemtap is run with the \verb+-g+ (``guru'' mode) option. Tapset scripts get guru mode privileges automatically. \nomenclature{embedded C}{Special syntax permitting tapsets to include literal C code.} Embedded C can be the body of a script function. Instead enclosing the function body statements in \verb+{+ and \verb+}+, use \verb+%{+ and \verb+%}+. Any enclosed C code is literally transcribed into the kernel module: it is up to you to make it safe and correct. In order to take parameters and return a value, macros \verb+STAP_ARG_*+ and \verb+STAP_RETVALUE+ are made available. The familiar data-gathering functions \verb+pid()+, \verb+execname()+, and their neighbours are all embedded C functions. Figure~\ref{fig:embedded-C} contains another example. Since systemtap cannot examine the C code to infer these types, an optional\footnote{This is only necessary if the types cannot be inferred from other sources, such as the call sites.} annotation syntax is available to assist the type inference process. Simply suffix parameter names and/or the function name with \verb+:string+ or \verb+:long+ to designate the string or numeric type. In addition, the script may include a \verb+%{+ \verb+%}+ block at the outermost level of the script, in order to transcribe declarative code like \verb+#include +. These enable the embedded C functions to refer to general kernel types. There are a number of safety-related constraints that should be observed by developers of embedded C code. \begin{enumerate} \item Do not dereference pointers that are not known or testable valid. \item Do not call any kernel routine that may cause a sleep or fault. \item Consider possible undesirable recursion, where your embedded C function calls a routine that may be the subject of a probe. If that probe handler calls your embedded C function, you may suffer infinite regress. Similar problems may arise with respect to non-reentrant locks. \item If locking of a data structure is necessary, use a \verb+trylock+ type call to attempt to take the lock. If that fails, give up, do not block. \end{enumerate} \begin{figure}[!ht] \begin{boxedminipage}{4.5in} \begin{verbatim} # cat embedded-C.stp %{ #include #include %} function task_execname_by_pid:string (pid:long) %{ struct task_struct *p; struct list_head *_p, *_n; list_for_each_safe(_p, _n, ¤t->tasks) { p = list_entry(_p, struct task_struct, tasks); if (p->pid == (int)STAP_ARG_pid) snprintf(STAP_RETVALUE, MAXSTRINGLEN, "%s", p->comm); } %} probe begin { printf("%s(%d)\n", task_execname_by_pid(target()), target()) exit() } # pgrep emacs 16641 # stap -g embedded-C.stp -x 16641 emacs(16641) \end{verbatim} \end{boxedminipage} \caption{Embedded C function.} \label{fig:embedded-C} \end{figure} \subsection{Naming conventions} Using the tapset search mechanism just described, potentially many script files can become selected for inclusion in a single session. This raises the problem of name collisions, where different tapsets accidentally use the same names for functions/globals. This can result in errors at translate or run time. To control this problem, systemtap tapset developers are advised to follow naming conventions. Here is some of the guidance. \nomenclature{naming convention}{Guidelines for naming variables and functions to prevent unintentional duplication.} \begin{enumerate} \item Pick a unique name for your tapset, and substitute it for {\em TAPSET} below. \item Separate identifiers meant to be used by tapset users from those that are internal implementation artifacts. \item Document the first set in the appropriate \verb+man+ pages. \item Prefix the names of external identifiers with {\em TAPSET}\_ if there is any likelihood of collision with other tapsets or end-user scripts. \item Prefix any probe point aliases with an appropriate prefix. \item Prefix the names of internal identifiers with \_\_{\em TAPSET}\_. \end{enumerate} \subsection{Exercises} \begin{enumerate} \item Write a tapset that implements deferred and ``cancelable'' logging. Export a function that enqueues a text string (into some private array), returning an id token. Include a timer-based probe that periodically flushes the array to the standard log output. Export another function that, if the entry was not already flushed, allows a text string to be cancelled from the queue. One might speculate that similar functions and tapsets exist. \item Create a ``relative timestamp'' tapset with functions return all the same values as the ones in the timestamp tapset, except that they are made relative to the start time of the script. \item Create a tapset that exports a global array that contains a mapping of recently seen process ID numbers to process names. Intercept key system calls (\verb+execve+?) to update the list incrementally. \item Send your tapset ideas to the mailing list! \end{enumerate} \section{Further information} For further information about systemtap, several sources are available. There are \verb+man+ pages: \begin{tabular}{rl} \verb+stap+ & systemtap program usage, language summary \\ \verb+stappaths+ & your systemtap installation paths \\ \verb+stapprobes+ & probes / probe aliases provided by built-in tapsets \\ \verb+stapex+ & a few basic example scripts \\ \verb+tapset::*+ & summaries of the probes and functions in each tapset \\ \verb+probe::*+ & detailed descriptions of each probe \\ \verb+function::*+ & detailed descriptions of each function \end{tabular} There is much more documentation and sample scripts included. You may find them under \verb+/usr/share/doc/systemtap*/+. Then, there is the source code itself. Since systemtap is {\em free software}, you should have available the entire source code. The source files in the \verb+tapset/+ directory are also packaged along with the systemtap binary. Since systemtap reads these files rather than their documentation, they are the most reliable way to see what's inside all the tapsets. Use the \verb+-v+ (verbose) command line option, several times if you like, to show inner workings. \nomenclature{free software}{Software licensed under terms such as the GNU GPL, which aims to enforce certain specified user freedoms such as study, modification, and sharing.} Finally, there is the project web site (\verb+http://sourceware.org/systemtap/+) with several articles, an archived public mailing list for users and developers (\verb+systemtap@sourceware.org+), IRC channels, and a live GIT source repository. Come join us! \appendix \section{Glossary} \renewcommand{\nomname}{} \printglossary \begin{htmlonly} {\em Sorry, not available in HTML.} \end{htmlonly} \section{Errors} We explain some common systemtap error messages in this section. Most error messages include line/character numbers with which one can locate the precise location of error in the script code. There is sometimes a subsequent or prior line that elaborates. {\large {\em error} {\tt at:} {\em filename}:{\em line}:{\em column}: {\em details}} \subsection{Parse errors} \begin{description} \item{\bf parse error: expected {\em foo}, saw {\em bar} $\ldots$} \\ The script contained a grammar error. A different type of construct was expected in the given context. \item{\bf parse error: embedded code in unprivileged script} \\ The script contained unsafe constructs such as embedded C (section \ref{embedded-c}), but was run without the \verb+-g+ (guru mode) option. Confirm that the constructs are used safely, then try again with \verb+-g+. \end{description} \subsection{Type errors} \begin{description} \item{\bf semantic error: type mismatch for identifier '{\em foo}' $\ldots$ string vs. long} \\ In this case, the identifier {\em foo} was previously inferred as a numeric type (``long''), but at the given point is being used as a string. Similar messages appear if an array index or function parameter slot is used with conflicting types. \item{\bf semantic error: unresolved type for identifier '{\em foo}'} \\ The identifier {\em foo} was used, for example in a \verb+print+, but without any operations that could assign it a type. Similar messages may appear if a symbol is misspelled by a typo. \item{\bf semantic error: Expecting symbol or array index expression} \\ Something other than an assignable lvalue was on the left hand sign of an assignment. \end{description} \subsection{Symbol errors} \begin{description} \item{\bf while searching for arity {\em N} function, semantic error: unresolved function call} \\ The script calls a function with {\em N} arguments that does not exist. The function may exist with different arity. \item{\bf semantic error: array locals not supported: $\ldots$} \\ An array operation is present for which no matching global declaration was found. Similar messages appear if an array is used with inconsistent arities. \item{\bf semantic error: variable '{\em foo}' modified during 'foreach'} \\ The array {\em foo} is being modified (being assigned to or deleted from) within an active \verb+foreach+ loop. This invalid operation is also detected within a function called from within the loop. \end{description} \subsection{Probing errors } \begin{description} \item{\bf semantic error: probe point mismatch at position {\em N}, while resolving probe point {\em foo}} \\ A probe point was named that neither directly understood by systemtap, nor defined as an alias by a tapset script. The divergence from the ``tree'' of probe point namespace is at position {\em N} (starting with zero at left). \item{\bf semantic error: no match for probe point, while resolving probe point {\em foo}} \\ A probe point cannot be resolved for any of a variety of reasons. It may be a debuginfo-based probe point such as \verb+kernel.function("foobar")+ where no \verb+foobar+ function was found. This can occur if the script specifies a wildcard on function names, or an invalid file name or source line number. \item{\bf semantic error: unresolved target-symbol expression} \\ A target variable was referred to in a probe handler that was not resolvable. Or, a target variable is not valid at all in a context such as a script function. This variable may have been elided by an optimizing compiler, or may not have a suitable type, or there might just be an annoying bug somewhere. Try again with a slightly different probe point (use \verb+statement()+ instead of \verb+function()+) to search for a more cooperative neighbour in the same area. \item{\bf semantic error: libdwfl failure $\ldots$} \\ There was a problem processing the debugging information. It may simply be missing, or may have some consistency / correctness problems. Later compilers tend to produce better debugging information, so if you can upgrade and recompile your kernel/application, it may help. \item{\bf semantic error: cannot find {\em foo} debuginfo} \\ Similarly, suitable debugging information was not found. Check that your kernel build/installation includes a matching version of debugging data. \end{description} \subsection{Runtime errors} Usually, run-time errors cause a script to terminate. Some of these may be caught with the \verb+try { ... } catch { ... }+ construct. \begin{description} \item{\bf WARNING: Number of errors: {\em N}, skipped probes: {\em M}} \\ Errors and/or skipped probes occurred during this run. \nomenclature{skipped probe}{A probe handler that should have run but couldn't, due to contention or temporary resource problems.} \item{\bf division by 0} \\ The script code performed an invalid division. \item{\bf aggregate element not found} \\ An statistics extractor function other than \verb+@count+ was invoked on an aggregate that has not had any values accumulated yet. This is similar to a division by zero. \item{\bf aggregation overflow} \\ An array containing aggregate values contains too many distinct key tuples at this time. \item{\bf MAXNESTING exceeded} \\ Too many levels of function call nesting were attempted. \item{\bf MAXACTION exceeded} \\ The probe handler attempted to execute too many statements. \item{\bf kernel/user string copy fault at {\em 0xaddr}} \\ The probe handler attempted to copy a string from kernel or user space at an invalid address. \item{\bf pointer dereference fault} \\ There was a fault encountered during a pointer dereference operation such as a target variable evaluation. \end{description} \section{Acknowledgments} The author thanks Martin Hunt, Will Cohen, and Jim Keniston for improvement advice for this paper. \end{document} systemtap-2.9/doc/tutorial/000077500000000000000000000000001260561570600160355ustar00rootroot00000000000000systemtap-2.9/doc/tutorial/embedded-C.stp000066400000000000000000000007061260561570600205010ustar00rootroot00000000000000%{ #include #include %} function task_execname_by_pid:string (pid:long) %{ struct task_struct *p; struct list_head *_p, *_n; list_for_each_safe(_p, _n, ¤t->tasks) { p = list_entry(_p, struct task_struct, tasks); if (p->pid == (int)STAP_ARG_pid) snprintf(STAP_RETVALUE, MAXSTRINGLEN, "%s", p->comm); } %} probe begin { printf("%s(%d)\n", task_execname_by_pid(target()), target()) exit() } systemtap-2.9/doc/tutorial/functions.stp000066400000000000000000000006551260561570600206030ustar00rootroot00000000000000# Red Hat convention; see /etc/login.defs UID_MIN function system_uid_p (u) { return u < 500 } # kernel device number assembly macro function makedev (major,minor) { return major << 20 | minor } function trace_common () { printf("%d %s(%d)", gettimeofday_s(), execname(), pid()) # no return value } function fibonacci (i) { if (i < 1) return 0 else if (i < 2) return 1 else return fibonacci(i-1) + fibonacci(i-2) } systemtap-2.9/doc/tutorial/hello-world.stp000066400000000000000000000000651260561570600210160ustar00rootroot00000000000000probe begin { print ("hello world\n") exit () } systemtap-2.9/doc/tutorial/inode-watch.stp000066400000000000000000000007761260561570600210010ustar00rootroot00000000000000probe kernel.function ("vfs_write"), kernel.function ("vfs_read") { if (@defined($file->f_path->dentry)) { dev_nr = $file->f_path->dentry->d_inode->i_sb->s_dev inode_nr = $file->f_path->dentry->d_inode->i_ino } else { dev_nr = $file->f_dentry->d_inode->i_sb->s_dev inode_nr = $file->f_dentry->d_inode->i_ino } if (dev_nr == ($1 << 20 | $2) # major/minor device && inode_nr == $3) printf ("%s(%d) %s 0x%x/%u\n", execname(), pid(), probefunc(), dev_nr, inode_nr) } systemtap-2.9/doc/tutorial/probe-alias.stp000066400000000000000000000005701260561570600207650ustar00rootroot00000000000000probe syscallgroup.io = syscall.open, syscall.close, syscall.read, syscall.write { groupname = "io" } probe syscallgroup.process = syscall.fork, syscall.execve { groupname = "process" } probe syscallgroup.* { groups [execname() . "/" . groupname] ++ } probe end { foreach (eg+ in groups) printf ("%s: %d\n", eg, groups[eg]) } global groups systemtap-2.9/doc/tutorial/socket-trace.stp000066400000000000000000000003231260561570600211470ustar00rootroot00000000000000probe kernel.function("*@net/socket.c").call { printf ("%s -> %s\n", thread_indent(1), probefunc()) } probe kernel.function("*@net/socket.c").return { printf ("%s <- %s\n", thread_indent(-1), probefunc()) } systemtap-2.9/doc/tutorial/strace-open.stp000066400000000000000000000002101260561570600207760ustar00rootroot00000000000000probe syscall.open { printf ("%s(%d) open (%s)\n", execname(), pid(), argstr) } probe timer.ms(4000) # after 4 seconds { exit () } systemtap-2.9/doc/tutorial/tapset-time-user.stp000066400000000000000000000002671260561570600220020ustar00rootroot00000000000000probe begin { timer_begin ("bench") for (i=0; i<100; i++) ; printf ("%d cycles\n", timer_end ("bench")) exit () } function __time_value () { return get_cycles () } # override systemtap-2.9/doc/tutorial/tapset/000077500000000000000000000000001260561570600173355ustar00rootroot00000000000000systemtap-2.9/doc/tutorial/tapset/time-common.stp000066400000000000000000000002401260561570600223050ustar00rootroot00000000000000global __time_vars function timer_begin (name) { __time_vars[name] = __time_value () } function timer_end (name) { return __time_value() - __time_vars[name] } systemtap-2.9/doc/tutorial/tapset/time-default.stp000066400000000000000000000000701260561570600224420ustar00rootroot00000000000000function __time_value () { return gettimeofday_us () } systemtap-2.9/doc/tutorial/timer-jiffies.stp000066400000000000000000000004221260561570600213200ustar00rootroot00000000000000global count_jiffies, count_ms probe timer.jiffies(100) { count_jiffies ++ } probe timer.ms(100) { count_ms ++ } probe timer.ms(12345) { hz=(1000*count_jiffies) / count_ms printf ("jiffies:ms ratio %d:%d => CONFIG_HZ=%d\n", count_jiffies, count_ms, hz) exit () } systemtap-2.9/dtrace.in000066400000000000000000000403261260561570600152240ustar00rootroot00000000000000#!/usr/bin/@python@ # vim: et sta sts=4 sw=4 ts=8 # This handles the systemtap equivalent of # $(DTRACE) $(DTRACEFLAGS) -G -s $^ -o $@ # $(DTRACE) $(DTRACEFLAGS) -h -s $^ -o $@ # which is a step that builds DTrace provider and probe definitions # Copyright (C) 2009-2015 Red Hat Inc. # # This file is part of systemtap, and is free software. You can # redistribute it and/or modify it under the terms of the GNU General # Public License (GPL); either version 2, or (at your option) any # later version. # ignore line too long, missing docstring, method could be a function, # too many public methods # pylint: disable=C0301 # pylint: disable=C0111 # pylint: disable=R0201 # pylint: disable=R0904 import os import sys from shlex import split from subprocess import call from tempfile import mkstemp try: from pyparsing import alphas, cStyleComment, delimitedList, Group, \ Keyword, lineno, Literal, nestedExpr, nums, oneOf, OneOrMore, \ Optional, ParseException, ParserElement, restOfLine, restOfLine, \ Suppress, SkipTo, Word, ZeroOrMore HAVE_PYP = True except ImportError: HAVE_PYP = False # Common file creation methods for pyparsing and string pattern matching class _HeaderCreator(object): def init_semaphores(self, fdesc): # dummy declaration just to make the object file non-empty fdesc.write("/* Generated by the Systemtap dtrace wrapper */\n\n") fdesc.write("static void __dtrace (void) __attribute__((unused));\n") fdesc.write("static void __dtrace (void) {}\n") fdesc.write("\n#include \n\n") def init_probes(self, fdesc): fdesc.write("/* Generated by the Systemtap dtrace wrapper */\n\n") fdesc.write("\n#define _SDT_HAS_SEMAPHORES 1\n\n") fdesc.write("\n#define STAP_HAS_SEMAPHORES 1 /* deprecated */\n\n") fdesc.write("\n#include \n\n") def add_semaphore(self, this_provider, this_probe): # NB: unsigned short is fixed in ABI semaphores_def = '\n#if defined STAP_SDT_V1\n' semaphores_def += '#define %s_%s_semaphore %s_semaphore\n' % \ (this_provider, this_probe, this_probe) semaphores_def += '#endif\n' semaphores_def += '#if defined STAP_SDT_V1 || defined STAP_SDT_V2 \n' semaphores_def += "__extension__ unsigned short %s_%s_semaphore __attribute__ ((unused)) __attribute__ ((section (\".probes\")));\n" % \ (this_provider, this_probe) semaphores_def += '#else\n' semaphores_def += "__extension__ unsigned short %s_%s_semaphore __attribute__ ((unused)) __attribute__ ((section (\".probes\"))) __attribute__ ((visibility (\"hidden\")));\n" % \ (this_provider, this_probe) semaphores_def += '#endif\n' return semaphores_def def add_probe(self, this_provider, this_probe, args): stap_str = "" this_probe_canon = this_provider.upper() + "_" + this_probe.replace("__", "_").upper() define_str = "#define %s(" % (this_probe_canon) comment_str = "/* %s (" % (this_probe_canon) if len(args) == 0: stap_str += "DTRACE_PROBE (" else: stap_str += "DTRACE_PROBE%d (" % len(args) stap_str += "%s, %s" % (this_provider, this_probe) i = 0 while i < len(args): if i != 0: define_str += ", " comment_str += "," define_str = define_str + "arg%s" % (i + 1) stap_str = stap_str + ", arg%s" % (i + 1) for argi in args[i]: if len(argi) > 0: comment_str += " %s" % argi i += 1 stap_str += ")" comment_str += " ) */" define_str += ") \\\n" probe_def = '%s\n' % (comment_str) probe_def += ('#if defined STAP_SDT_V1\n') probe_def += ('#define %s_ENABLED() __builtin_expect (%s_semaphore, 0)\n' % \ (this_probe_canon, this_probe)) probe_def += ('#define %s_%s_semaphore %s_semaphore\n' % \ (this_provider, this_probe, this_probe)) probe_def += ('#else\n') probe_def += ('#define %s_ENABLED() __builtin_expect (%s_%s_semaphore, 0)\n' % \ (this_probe_canon, this_provider, this_probe)) probe_def += ('#endif\n') # NB: unsigned short is fixed in ABI probe_def += ("__extension__ extern unsigned short %s_%s_semaphore __attribute__ ((unused)) __attribute__ ((section (\".probes\")));\n" % \ (this_provider, this_probe)) probe_def += (define_str + stap_str + "\n\n") return probe_def # Parse using pyparsing if it is available class _PypProvider(_HeaderCreator): def __init__(self): self.ast = [] self.bnf = None self.dtrace_statements = None def dtrace_bnf(self): self.current_probe = "" if self.dtrace_statements is not None: return ParserElement.setDefaultWhitespaceChars(' \f\r\n\t\v') ident = Word(alphas+"_", alphas+nums+"_$") probe_ident = Word(alphas+nums+"_$") semi = Literal(";").suppress() integer = Word( nums ) lbrace = Literal("{").suppress() rbrace = Literal("}").suppress() type_name = ident varname = ident PROBE = Keyword("probe") PROVIDER = Keyword("provider") array_size = integer | ident varname_spec = varname + Optional("[" + array_size + "]") struct_decl = Group(oneOf("struct union") + varname + Suppress(nestedExpr('{','}')) + semi) enum_decl = Group("enum" + varname + Suppress(nestedExpr('{','}')) + semi) member_decl = Group((Optional(oneOf("struct unsigned const")) + type_name) + Optional(Word("*"), default="") + Optional(varname_spec)) struct_typedef = Group(Literal("typedef") + Literal("struct") + varname + Suppress(nestedExpr('{','}'))) + Optional(varname) + semi typedef = ZeroOrMore("typedef" + (member_decl)) + semi decls = OneOrMore(struct_typedef | struct_decl | typedef | enum_decl) def memoize_probe(instring, loc, tokens): self.current_probe = tokens[0][1] self.current_lineno = lineno(loc,instring) probe_decl = Group(PROBE + probe_ident + "(" + Optional(Group(delimitedList(member_decl))) + ")" + Optional(semi)) probe_decl.setParseAction(memoize_probe) probe_decls = OneOrMore(probe_decl) provider_decl = (PROVIDER + Optional(ident) + lbrace + Group(probe_decls) + rbrace + Optional(semi)) dtrace_statement = Group (SkipTo("provider", include=False) + provider_decl) self.dtrace_statements = ZeroOrMore(dtrace_statement) cplusplus_linecomment = Literal("//") + restOfLine cpp_linecomment = Literal("#") + restOfLine self.dtrace_statements.ignore(cStyleComment) self.dtrace_statements.ignore(cplusplus_linecomment) self.dtrace_statements.ignore(cpp_linecomment) self.bnf = self.dtrace_statements def semaphore_write(self, fdesc): semaphores_def = "" self.init_semaphores(fdesc) for asti in self.ast: if len(asti) == 0: continue # ignore SkipTo token if asti[0] != "provider": del asti[0] if asti[0] == "provider": # list of probes for prb in asti[2]: semaphores_def += self.add_semaphore(asti[1], prb[1]) fdesc.write(semaphores_def) def probe_write(self, provider, header): hdr = open(header, mode='w') self.init_probes(hdr) self.dtrace_bnf() try: try: self.ast = self.bnf.parseFile(provider, parseAll=True).asList() except TypeError: # pyparsing-1.5.0 does not support parseAll self.ast = self.bnf.parseFile(provider).asList() except ParseException: err = sys.exc_info()[1] if len(self.current_probe): print("Warning: %s:%s:%d: syntax error near:\nprobe %s\n" % (sys.argv[0], provider, self.current_lineno, self.current_probe)) else: print("Warning: %s:%s:%d syntax error near:\n%s\n" % (sys.argv[0], provider, err.lineno, err.line)) raise err probes_def = "" for asti in self.ast: if len(asti) == 0: continue # ignore SkipTo token if asti[0] != "provider": del asti[0] if asti[0] == "provider": # list of probes for prb in asti[2]: if prb[3] == ')': # No parsed argument list alist = [] else: alist = prb[3] probes_def += self.add_probe(asti[1], prb[1], alist) hdr.write(probes_def) hdr.close() # Parse using regular expressions if pyparsing is not available class _ReProvider(_HeaderCreator): def __init__(self): self.semaphores_def = "\n" self.provider = [] def __semaphore_append(self, this_probe): self.semaphores_def += self.add_semaphore(self.provider, this_probe) def semaphore_write(self, fdesc): self.init_semaphores(fdesc) fdesc.write(self.semaphores_def) def probe_write(self, provider, header): have_provider = False fdesc = open(provider) hdr = open(header, mode='w') self.init_probes(hdr) in_comment = False probes_def = "" while True: line = fdesc.readline() if line == "": break if line.find("/*") != -1: in_comment = True if line.find("*/") != -1: in_comment = False continue if in_comment: continue if line.find("provider") != -1: tokens = line.split() have_provider = True self.provider = tokens[1] elif have_provider and line.find("probe ") != -1: while line.find(")") < 0: line += fdesc.readline() this_probe = line[line.find("probe ")+5:line.find("(")].strip() argstr = (line[line.find("(")+1:line.find(")")]) arg = "" i = 0 args = [] self.__semaphore_append(this_probe) while i < len(argstr): if argstr[i:i+1] == ",": args.append(arg.split()) arg = "" else: arg = arg + argstr[i] i += 1 if len(arg) > 0: args.append(arg.split()) probes_def += self.add_probe(self.provider, this_probe, args) elif line.find("}") != -1 and have_provider: have_provider = False hdr.write(probes_def) hdr.close() def usage(): print("Usage " + sys.argv[0] + " [--help] [-h | -G] [-C [-I]] -s File.d [-o ]") def dtrace_help(): usage() print("Where -h builds a systemtap header file from the .d file") print(" -C when used with -h, also run cpp preprocessor") print(" -o specifies an explicit output file name,") print(" the default for -G is file.o and -h is file.h") print(" -I when running cpp pass through this -I include Path") print(" -s specifies the name of the .d input file") print(" -G builds a stub file.o from file.d,") print(" which is required by some packages that use dtrace.") sys.exit(1) ######################################################################## # main ######################################################################## def main(): if len(sys.argv) < 2: usage() return 1 global HAVE_PYP i = 1 build_header = False build_source = False keep_temps = False use_cpp = False suffix = "" filename = "" s_filename = "" includes = [] defines = [] ignore_options = ["-64", "-32", "-fpic", "-fPIC"] ignore_options2 = ["-x"] # with parameter while i < len(sys.argv): if sys.argv[i] == "-o": i += 1 filename = sys.argv[i] elif sys.argv[i] == "-s": i += 1 s_filename = sys.argv[i] elif sys.argv[i] == "-C": use_cpp = True elif sys.argv[i].startswith("-D"): defines.append(sys.argv[i]) elif sys.argv[i] == "-h": build_header = True suffix = ".h" elif sys.argv[i].startswith("-I"): includes.append(sys.argv[i]) elif sys.argv[i] == "-G": build_source = True suffix = ".o" elif sys.argv[i] == "-k": keep_temps = True elif sys.argv[i] == "--no-pyparsing": HAVE_PYP = False elif sys.argv[i] == "--types": print(sys.argv[0] + ": note: obsolete option --types used") elif sys.argv[i] in ignore_options: pass # dtrace users sometimes pass these flags elif sys.argv[i] in ignore_options2: i += 1 pass # dtrace users sometimes pass these flags elif sys.argv[i] == "--help": dtrace_help() elif sys.argv[i][0] == "-": print(sys.argv[0], "invalid option", sys.argv[i]) usage() return 1 i += 1 if not build_header and not build_source: usage() return 1 if s_filename != "" and use_cpp: (ignore, fname) = mkstemp(suffix=".d") cpp = os.environ.get("CPP", "cpp") retcode = call(split(cpp) + includes + defines + [s_filename, fname]) if retcode != 0: print("\"cpp includes s_filename\" failed") usage() return 1 s_filename = fname if filename == "": if s_filename != "": (filename, ignore) = os.path.splitext(s_filename) filename = os.path.basename(filename) else: usage() return 1 else: suffix = "" if build_header: if HAVE_PYP: providers = _PypProvider() else: providers = _ReProvider() while True: try: providers.probe_write(s_filename, filename + suffix) break; # complex C declarations can fool the pyparsing grammar. # we could increase the complexity of the grammar # instead we fall back to string pattern matching except ParseException: err = sys.exc_info()[1] print("Warning: Proceeding as if --no-pyparsing was given.\n") providers = _ReProvider() elif build_source: if HAVE_PYP: providers = _PypProvider() else: providers = _ReProvider() (ignore, fname) = mkstemp(suffix=".h") while True: try: providers.probe_write(s_filename, fname) break; except ParseException: err = sys.exc_info()[1] print("Warning: Proceeding as if --no-pyparsing was given.\n") providers = _ReProvider() if not keep_temps: os.remove(fname) else: print("header: " + fname) (ignore, fname) = mkstemp(suffix=".c") fdesc = open(fname, mode='w') providers.semaphore_write(fdesc) fdesc.close() cc1 = os.environ.get("CC", "gcc") cflags = "-g " + os.environ.get("CFLAGS", "") retcode = call(split(cc1) + defines + includes + split(cflags) + ["-fPIC", "-I.", "-I@prefix@/include", "-c", fname, "-o", filename + suffix], shell=False) if retcode != 0: print("\"gcc " + fname + "\" failed") usage() return 1 if not keep_temps: os.remove(fname) else: print("source: " + fname) if use_cpp: if not keep_temps: os.remove(s_filename) else: print("cpp: " + s_filename) return 0 if __name__ == "__main__": sys.exit(main()) systemtap-2.9/dwarf_wrappers.cxx000066400000000000000000000121521260561570600172000ustar00rootroot00000000000000// -*- C++ -*- // Copyright (C) 2008-2014 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #include "dwarf_wrappers.h" #include "staptree.h" #include "util.h" #include #include #include #include #include using namespace std; void dwfl_assert(const string& desc, int rc, const string& file, int line) { if (rc == 0) return; string msg = _F("libdwfl failure (%s): ", desc.c_str()); if (rc < 0) msg += (dwfl_errmsg (rc) ?: "?"); else msg += std::strerror (rc); throw semantic_error (file+":"+lex_cast(line), msg); } void dwarf_assert(const string& desc, int rc, const string& file, int line) { if (rc == 0) return; string msg = _F("libdw failure (%s): ", desc.c_str()); if (rc < 0) msg += dwarf_errmsg (rc); else msg += std::strerror (rc); throw semantic_error (file+":"+lex_cast(line), msg); } #if !_ELFUTILS_PREREQ(0, 143) // Elfutils prior to 0.143 didn't use attr_integrate when looking up the // decl_file or decl_line, so the attributes would sometimes be missed. For // those old versions, we define custom implementations to do the integration. const char * dwarf_decl_file_integrate (Dwarf_Die *die) { Dwarf_Attribute attr_mem; Dwarf_Sword idx = 0; if (dwarf_formsdata (dwarf_attr_integrate (die, DW_AT_decl_file, &attr_mem), &idx) != 0 || idx == 0) return NULL; Dwarf_Die cudie; Dwarf_Files *files = NULL; if (dwarf_getsrcfiles (dwarf_diecu (die, &cudie, NULL, NULL), &files, NULL) != 0) return NULL; return dwarf_filesrc(files, idx, NULL, NULL); } int dwarf_decl_line_integrate (Dwarf_Die *die, int *linep) { Dwarf_Attribute attr_mem; Dwarf_Sword line; int res = dwarf_formsdata (dwarf_attr_integrate (die, DW_AT_decl_line, &attr_mem), &line); if (res == 0) *linep = line; return res; } #endif // !_ELFUTILS_PREREQ(0, 143) static bool dwarf_type_name(Dwarf_Die *type_die, ostream& o) { // if we've gotten down to a basic type, then we're done bool done = true; switch (dwarf_tag(type_die)) { case DW_TAG_enumeration_type: o << "enum "; break; case DW_TAG_structure_type: o << "struct "; break; case DW_TAG_union_type: o << "union "; break; case DW_TAG_class_type: o << "class "; break; case DW_TAG_typedef: case DW_TAG_base_type: break; // modifier types that require recursion first case DW_TAG_reference_type: case DW_TAG_rvalue_reference_type: case DW_TAG_pointer_type: case DW_TAG_array_type: case DW_TAG_const_type: case DW_TAG_volatile_type: case DW_TAG_restrict_type: done = false; break; // unknown tag default: return false; } if (done) { // this follows gdb precedent that anonymous structs/unions // are displayed as "struct {...}" and "union {...}". o << (dwarf_diename(type_die) ?: "{...}"); return true; } // otherwise, this die is a type modifier. // recurse into the referent type Dwarf_Die subtype_die_mem, *subtype_die; subtype_die = dwarf_attr_die(type_die, DW_AT_type, &subtype_die_mem); // NB: va_list is a builtin type that shows up in the debuginfo as a // "struct __va_list_tag*", but it has to be called only va_list. if (subtype_die != NULL && dwarf_tag(type_die) == DW_TAG_pointer_type && dwarf_tag(subtype_die) == DW_TAG_structure_type && strcmp(dwarf_diename(subtype_die) ?: "", "__va_list_tag") == 0) { o << "va_list"; return true; } // if it can't be named, just call it "void" if (subtype_die == NULL || !dwarf_type_name(subtype_die, o)) o << "void"; switch (dwarf_tag(type_die)) { case DW_TAG_reference_type: o << "&"; break; case DW_TAG_rvalue_reference_type: o << "&&"; break; case DW_TAG_pointer_type: o << "*"; break; case DW_TAG_array_type: o << "[]"; break; case DW_TAG_const_type: // NB: the debuginfo may sometimes have an extra const tag // on reference types, which is redundant to us. if (subtype_die == NULL || (dwarf_tag(subtype_die) != DW_TAG_reference_type && dwarf_tag(subtype_die) != DW_TAG_rvalue_reference_type)) o << " const"; break; case DW_TAG_volatile_type: o << " volatile"; break; case DW_TAG_restrict_type: o << " restrict"; break; default: return false; } return true; } bool dwarf_type_name(Dwarf_Die *type_die, string& type_name) { ostringstream o; bool ret = dwarf_type_name(type_die, o); type_name = o.str(); return ret; } string dwarf_type_name(Dwarf_Die *type_die) { ostringstream o; return dwarf_type_name(type_die, o) ? o.str() : ""; } /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/dwarf_wrappers.h000066400000000000000000000127101260561570600166250ustar00rootroot00000000000000// -*- C++ -*- // Copyright (C) 2008-2014 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #ifndef DWARF_WRAPPERS_H #define DWARF_WRAPPERS_H 1 #include "config.h" extern "C" { #include #include #include } #include #if ! _ELFUTILS_PREREQ(0, 148) #define DW_AT_linkage_name 0x6e #endif #if ! _ELFUTILS_PREREQ(0, 153) #define DW_TAG_GNU_call_site 0x4109 #define DW_AT_GNU_tail_call 0x2115 #endif #if ! _ELFUTILS_PREREQ(0, 155) #define DW_ATE_UTF 0x10 #endif #define DWFL_ASSERT(desc, arg) \ dwfl_assert(desc, arg, __FILE__, __LINE__) // NB: "rc == 0" means OK in this case void dwfl_assert(const std::string& desc, int rc, const std::string& file, int line); // Throw error if pointer is NULL inline void dwfl_assert(const std::string& desc, const void* ptr, const std::string& file, int line) { if (!ptr) dwfl_assert(desc, -1, file, line); } // Throw error if condition is false inline void dwfl_assert(const std::string& desc, bool condition, const std::string& file, int line) { if (!condition) dwfl_assert(desc, -1, file, line); } #define DWARF_ASSERT(desc, arg) \ dwarf_assert(desc, arg, __FILE__, __LINE__) // NB: "rc == 0" means OK in this case void dwarf_assert(const std::string& desc, int rc, const std::string& file, int line); // Throw error if pointer is NULL inline void dwarf_assert(const std::string& desc, const void* ptr, const std::string& file, int line) { if (!ptr) dwarf_assert(desc, -1, file, line); } #define DWARF_LINENO(line) \ safe_dwarf_lineno(line, __FILE__, __LINE__) inline int safe_dwarf_lineno(const Dwarf_Line* line, const std::string& errfile, int errline) { int lineno; dwarf_assert("dwarf_lineno", dwarf_lineno(const_cast(line), &lineno), errfile, errline); return lineno; } #define DWARF_LINEADDR(line) \ safe_dwarf_lineaddr(line, __FILE__, __LINE__) inline Dwarf_Addr safe_dwarf_lineaddr(const Dwarf_Line* line, const std::string& errfile, int errline) { Dwarf_Addr addr; dwarf_assert("dwarf_lineaddr", dwarf_lineaddr(const_cast(line), &addr), errfile, errline); return addr; } #define DWARF_LINESRC(line) \ safe_dwarf_linesrc(line, NULL, NULL, __FILE__, __LINE__) #define DWARF_LINESRC2(line, mtime) \ safe_dwarf_linesrc(line, mtime, NULL, __FILE__, __LINE__) #define DWARF_LINESRC3(line, mtime, length) \ safe_dwarf_linesrc(line, mtime, length, __FILE__, __LINE__) inline const char* safe_dwarf_linesrc(const Dwarf_Line* line, Dwarf_Word* mtime, Dwarf_Word* length, const std::string& errfile, int errline) { const char* linesrc = dwarf_linesrc(const_cast(line), mtime, length); dwarf_assert("dwarf_linesrc", linesrc, errfile, errline); return linesrc; } #define DWARF_LINEPROLOGUEEND(line) \ safe_dwarf_lineprologueend(line, __FILE__, __LINE__) inline bool safe_dwarf_lineprologueend(const Dwarf_Line* line, const std::string& errfile, int errline) { bool flag; dwarf_assert("is_prologue_end", dwarf_lineprologueend(const_cast(line), &flag), errfile, errline); return flag; } // Look up the DIE for a reference-form attribute name inline Dwarf_Die * dwarf_attr_die (Dwarf_Die *die, unsigned int attr, Dwarf_Die *result) { Dwarf_Attribute attr_mem; if (dwarf_formref_die (dwarf_attr_integrate (die, attr, &attr_mem), result) != NULL) { /* If we want a type make sure we get the actual DIE describing the real type. */ if (attr == DW_AT_type) { Dwarf_Attribute sigm; Dwarf_Attribute *sig = dwarf_attr (result, DW_AT_signature, &sigm); if (sig != NULL) result = dwarf_formref_die (sig, result); /* A DW_AT_signature might point to a type_unit, then the actual type DIE we want is the first child. */ if (result != NULL && dwarf_tag (result) == DW_TAG_type_unit) DWFL_ASSERT("type_unit child", dwarf_child (result, result)); } return result; } return NULL; } // Retrieve the linkage name of a die, either by the MIPS vendor extension or // DWARF4's standardized attribute. inline const char * dwarf_linkage_name (Dwarf_Die *die) { Dwarf_Attribute attr_mem; return dwarf_formstring (dwarf_attr_integrate (die, DW_AT_MIPS_linkage_name, &attr_mem) ?: dwarf_attr_integrate (die, DW_AT_linkage_name, &attr_mem)); } #if !_ELFUTILS_PREREQ(0, 143) // Elfutils prior to 0.143 didn't use attr_integrate when looking up the // decl_file or decl_line, so the attributes would sometimes be missed. For // those old versions, we define custom implementations to do the integration. const char *dwarf_decl_file_integrate (Dwarf_Die *die); #define dwarf_decl_file dwarf_decl_file_integrate int dwarf_decl_line_integrate (Dwarf_Die *die, int *linep) __nonnull_attribute__ (2); #define dwarf_decl_line dwarf_decl_line_integrate #endif // !_ELFUTILS_PREREQ(0, 143) // Resolve a full name for dwarf types bool dwarf_type_name(Dwarf_Die *type_die, std::string& type_name); std::string dwarf_type_name(Dwarf_Die *type_die); #endif /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/dwflpp.cxx000066400000000000000000004564031260561570600154610ustar00rootroot00000000000000// C++ interface to dwfl // Copyright (C) 2005-2015 Red Hat Inc. // Copyright (C) 2005-2007 Intel Corporation. // Copyright (C) 2008 James.Bottomley@HansenPartnership.com // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #include "dwflpp.h" #include "config.h" #include #include "staptree.h" #include "elaborate.h" #include "tapsets.h" #include "task_finder.h" #include "translate.h" #include "session.h" #include "util.h" #include "buildrun.h" #include "dwarf_wrappers.h" #include "auto_free.h" #include "hash.h" #include "rpm_finder.h" #include "setupdwfl.h" #include #include #include #include #include #include #include #include #include #include #include #include #include extern "C" { #include #include #include #include #include #include #include #include #include #include #include #include "loc2c.h" #define __STDC_FORMAT_MACROS #include } // Older glibc elf.h don't know about this new constant. #ifndef STB_GNU_UNIQUE #define STB_GNU_UNIQUE 10 #endif // debug flag to compare to the uncached version from libdw // #define DEBUG_DWFLPP_GETSCOPES 1 using namespace std; using namespace __gnu_cxx; static string TOK_KERNEL("kernel"); // RAII style tracker for obstack pool, used because of complex exception flows #define obstack_chunk_alloc malloc #define obstack_chunk_free free struct obstack_tracker { struct obstack* p; obstack_tracker(struct obstack*p): p(p) { obstack_init (p); } ~obstack_tracker() { obstack_free (this->p, 0); } }; dwflpp::dwflpp(systemtap_session & session, const string& name, bool kernel_p): sess(session), module(NULL), module_bias(0), mod_info(NULL), module_start(0), module_end(0), cu(NULL), dwfl(NULL), module_dwarf(NULL), function(NULL), blacklist_func(), blacklist_func_ret(), blacklist_file(), blacklist_enabled(false) { if (kernel_p) setup_kernel(name, session); else { vector modules; modules.push_back(name); setup_user(modules); } } dwflpp::dwflpp(systemtap_session & session, const vector& names, bool kernel_p): sess(session), module(NULL), module_bias(0), mod_info(NULL), module_start(0), module_end(0), cu(NULL), dwfl(NULL), module_dwarf(NULL), function(NULL), blacklist_enabled(false) { if (kernel_p) setup_kernel(names); else setup_user(names); } dwflpp::~dwflpp() { delete_map(module_cu_cache); delete_map(cu_function_cache); delete_map(mod_function_cache); delete_map(cu_inl_function_cache); delete_map(global_alias_cache); delete_map(cu_die_parent_cache); cu_lines_cache_t::iterator i; for (i = cu_lines_cache.begin(); i != cu_lines_cache.end(); ++i) delete_map(*i->second); delete_map(cu_lines_cache); if (dwfl) dwfl_end(dwfl); // NB: don't "delete mod_info;", as that may be shared // between dwflpp instances, and are stored in // session.module_cache[] anyway. } module_cache::~module_cache () { delete_map(cache); } void dwflpp::get_module_dwarf(bool required, bool report) { module_dwarf = dwfl_module_getdwarf(module, &module_bias); mod_info->dwarf_status = (module_dwarf ? info_present : info_absent); if (!module_dwarf && report) { string msg = _("cannot find "); if (module_name == "") msg += "kernel"; else msg += string("module ") + module_name; msg += " debuginfo"; int i = dwfl_errno(); if (i) msg += string(": ") + dwfl_errmsg (i); msg += " [man warning::debuginfo]"; /* add module_name to list to find rpm */ find_debug_rpms(sess, module_name.c_str()); if (required) throw SEMANTIC_ERROR (msg); else sess.print_warning(msg); } } void dwflpp::focus_on_module(Dwfl_Module * m, module_info * mi) { module = m; mod_info = mi; if (m) { module_name = dwfl_module_info(module, NULL, &module_start, &module_end, NULL, NULL, NULL, NULL) ?: "module"; } else { assert(mi && mi->name && mi->name == TOK_KERNEL); module_name = mi->name; module_start = 0; module_end = 0; module_bias = mi->bias; } // Reset existing pointers and names module_dwarf = NULL; cu = NULL; function_name.clear(); function = NULL; } void dwflpp::focus_on_cu(Dwarf_Die * c) { assert(c); assert(module); cu = c; // Reset existing pointers and names function_name.clear(); function = NULL; } string dwflpp::cu_name(void) { return dwarf_diename(cu) ?: ""; } void dwflpp::focus_on_function(Dwarf_Die * f) { assert(f); assert(module); assert(cu); function = f; function_name = dwarf_diename(function) ?: "function"; } /* Return the Dwarf_Die for the given address in the current module. * The address should be in the module address address space (this * function will take care of any dw bias). */ Dwarf_Die * dwflpp::query_cu_containing_address(Dwarf_Addr a) { Dwarf_Addr bias; assert(dwfl); assert(module); get_module_dwarf(); Dwarf_Die* cudie = dwfl_module_addrdie(module, a, &bias); assert(bias == module_bias); return cudie; } bool dwflpp::module_name_matches(const string& pattern) { bool t = (fnmatch(pattern.c_str(), module_name.c_str(), 0) == 0); if (t && sess.verbose>3) clog << _F("pattern '%s' matches module '%s'\n", pattern.c_str(), module_name.c_str()); if (!t && sess.verbose>4) clog << _F("pattern '%s' does not match module '%s'\n", pattern.c_str(), module_name.c_str()); return t; } bool dwflpp::name_has_wildcard (const string& pattern) { return (pattern.find('*') != string::npos || pattern.find('?') != string::npos || pattern.find('[') != string::npos); } bool dwflpp::module_name_final_match(const string& pattern) { // Assume module_name_matches(). Can there be any more matches? // Not unless the pattern is a wildcard, since module names are // presumed unique. return !name_has_wildcard(pattern); } bool dwflpp::function_name_matches_pattern(const string& name, const string& pattern) { bool t = (fnmatch(pattern.c_str(), name.c_str(), 0) == 0); if (t && sess.verbose>3) clog << _F("pattern '%s' matches function '%s'\n", pattern.c_str(), name.c_str()); return t; } bool dwflpp::function_name_matches(const string& pattern) { assert(function); return function_name_matches_pattern(function_name, pattern); } bool dwflpp::function_scope_matches(const vector& scopes) { // walk up the containing scopes Dwarf_Die* die = function; for (int i = scopes.size() - 1; i >= 0; --i) { die = get_parent_scope(die); // check if this scope matches, and prepend it if so // NB: a NULL die is the global scope, compared as "" string name = dwarf_diename(die) ?: ""; if (name_has_wildcard(scopes[i]) ? function_name_matches_pattern(name, scopes[i]) : name == scopes[i]) function_name = name + "::" + function_name; else return false; // make sure there's no more if we're at the global scope if (!die && i > 0) return false; } return true; } void dwflpp::setup_kernel(const string& name, systemtap_session & s, bool debuginfo_needed) { if (! sess.module_cache) sess.module_cache = new module_cache (); unsigned offline_search_matches = 0; dwfl = setup_dwfl_kernel(name, &offline_search_matches, sess); if (offline_search_matches < 1) { if (debuginfo_needed) { // Suggest a likely kernel dir to find debuginfo rpm for string dir = string(sess.sysroot + "/lib/modules/" + sess.kernel_release ); find_debug_rpms(sess, dir.c_str()); } throw SEMANTIC_ERROR (_F("missing %s kernel/module debuginfo [man warning::debuginfo] under '%s'", sess.architecture.c_str(), sess.kernel_build_tree.c_str())); } if (dwfl != NULL) { ptrdiff_t off = 0; do { assert_no_interrupts(); off = dwfl_getmodules (dwfl, &add_module_build_id_to_hash, &s, off); } while (off > 0); DWFL_ASSERT("dwfl_getmodules", off == 0); } build_kernel_blacklist(); } void dwflpp::setup_kernel(const vector &names, bool debuginfo_needed) { if (! sess.module_cache) sess.module_cache = new module_cache (); unsigned offline_search_matches = 0; set offline_search_names(names.begin(), names.end()); dwfl = setup_dwfl_kernel(offline_search_names, &offline_search_matches, sess); if (offline_search_matches < offline_search_names.size()) { if (debuginfo_needed) { // Suggest a likely kernel dir to find debuginfo rpm for string dir = string(sess.sysroot + "/lib/modules/" + sess.kernel_release ); find_debug_rpms(sess, dir.c_str()); } throw SEMANTIC_ERROR (_F("missing %s kernel/module debuginfo [man warning::debuginfo] under '%s'", sess.architecture.c_str(), sess.kernel_build_tree.c_str())); } build_kernel_blacklist(); } void dwflpp::setup_user(const vector& modules, bool debuginfo_needed) { if (! sess.module_cache) sess.module_cache = new module_cache (); vector::const_iterator it = modules.begin(); dwfl = setup_dwfl_user(it, modules.end(), debuginfo_needed, sess); if (debuginfo_needed && it != modules.end()) DWFL_ASSERT (string(_F("missing process %s %s debuginfo", (*it).c_str(), sess.architecture.c_str())), dwfl); build_user_blacklist(); } template<> void dwflpp::iterate_over_modules(int (*callback)(Dwfl_Module*, void**, const char*, Dwarf_Addr, void*), void *data) { dwfl_getmodules (dwfl, callback, data, 0); // Don't complain if we exited dwfl_getmodules early. // This could be a $target variable error that will be // reported soon anyway. // DWFL_ASSERT("dwfl_getmodules", off == 0); // PR6864 XXX: For dwarfless case (if .../vmlinux is missing), then the // "kernel" module is not reported in the loop above. However, we // may be able to make do with symbol table data. } template<> void dwflpp::iterate_over_cus(int (*callback)(Dwarf_Die*, void*), void *data, bool want_types) { get_module_dwarf(false); Dwarf *dw = module_dwarf; if (!dw) return; vector* v = module_cu_cache[dw]; if (v == 0) { v = new vector; module_cu_cache[dw] = v; Dwarf_Off off = 0; size_t cuhl; Dwarf_Off noff; while (dwarf_nextcu (dw, off, &noff, &cuhl, NULL, NULL, NULL) == 0) { assert_no_interrupts(); Dwarf_Die die_mem; Dwarf_Die *die; die = dwarf_offdie (dw, off + cuhl, &die_mem); /* Skip partial units. */ if (dwarf_tag (die) == DW_TAG_compile_unit) v->push_back (*die); /* copy */ off = noff; } } if (want_types && module_tus_read.find(dw) == module_tus_read.end()) { // Process type units. Dwarf_Off off = 0; size_t cuhl; Dwarf_Off noff; uint64_t type_signature; while (dwarf_next_unit (dw, off, &noff, &cuhl, NULL, NULL, NULL, NULL, &type_signature, NULL) == 0) { assert_no_interrupts(); Dwarf_Die die_mem; Dwarf_Die *die; die = dwarf_offdie_types (dw, off + cuhl, &die_mem); /* Skip partial units. */ if (dwarf_tag (die) == DW_TAG_type_unit) v->push_back (*die); /* copy */ off = noff; } module_tus_read.insert(dw); } for (vector::iterator i = v->begin(); i != v->end(); ++i) { int rc = (*callback)(&*i, data); assert_no_interrupts(); if (rc != DWARF_CB_OK) break; } } bool dwflpp::func_is_inline() { assert (function); return dwarf_func_inline (function) != 0; } bool dwflpp::func_is_exported() { const char *name = dwarf_linkage_name (function) ?: dwarf_diename (function); assert (function); int syms = dwfl_module_getsymtab (module); DWFL_ASSERT (_("Getting symbols"), syms >= 0); for (int i = 0; i < syms; i++) { GElf_Sym sym; GElf_Word shndxp; const char *symname = dwfl_module_getsym(module, i, &sym, &shndxp); if (symname && strcmp (name, symname) == 0) { if (GELF_ST_TYPE(sym.st_info) == STT_FUNC && (GELF_ST_BIND(sym.st_info) == STB_GLOBAL || GELF_ST_BIND(sym.st_info) == STB_WEAK || GELF_ST_BIND(sym.st_info) == STB_GNU_UNIQUE)) return true; else return false; } } return false; } void dwflpp::cache_inline_instances (Dwarf_Die* die) { // If this is an inline instance, link it back to its origin Dwarf_Die origin; if (dwarf_tag(die) == DW_TAG_inlined_subroutine && dwarf_attr_die(die, DW_AT_abstract_origin, &origin)) { vector*& v = cu_inl_function_cache[origin.addr]; if (!v) v = new vector; v->push_back(*die); } // Recurse through other scopes that may contain inlines Dwarf_Die child, import; if (dwarf_child(die, &child) == 0) do { switch (dwarf_tag (&child)) { // tags that could contain inlines case DW_TAG_compile_unit: case DW_TAG_module: case DW_TAG_lexical_block: case DW_TAG_with_stmt: case DW_TAG_catch_block: case DW_TAG_try_block: case DW_TAG_entry_point: case DW_TAG_inlined_subroutine: case DW_TAG_subprogram: cache_inline_instances(&child); break; // imported dies should be followed case DW_TAG_imported_unit: if (dwarf_attr_die(&child, DW_AT_import, &import)) cache_inline_instances(&import); break; // nothing to do for other tags default: break; } } while (dwarf_siblingof(&child, &child) == 0); } template<> void dwflpp::iterate_over_inline_instances(int (*callback)(Dwarf_Die*, void*), void *data) { assert (function); assert (func_is_inline ()); if (cu_inl_function_cache_done.insert(cu->addr).second) cache_inline_instances(cu); vector* v = cu_inl_function_cache[function->addr]; if (!v) return; for (vector::iterator i = v->begin(); i != v->end(); ++i) { int rc = (*callback)(&*i, data); assert_no_interrupts(); if (rc != DWARF_CB_OK) break; } } void dwflpp::cache_die_parents(cu_die_parent_cache_t* parents, Dwarf_Die* die) { // Record and recurse through DIEs we care about Dwarf_Die child, import; if (dwarf_child(die, &child) == 0) do { switch (dwarf_tag (&child)) { // normal tags to recurse case DW_TAG_compile_unit: case DW_TAG_module: case DW_TAG_lexical_block: case DW_TAG_with_stmt: case DW_TAG_catch_block: case DW_TAG_try_block: case DW_TAG_entry_point: case DW_TAG_inlined_subroutine: case DW_TAG_subprogram: case DW_TAG_namespace: case DW_TAG_class_type: case DW_TAG_structure_type: parents->insert(make_pair(child.addr, *die)); cache_die_parents(parents, &child); break; // record only, nothing to recurse case DW_TAG_label: parents->insert(make_pair(child.addr, *die)); break; // imported dies should be followed case DW_TAG_imported_unit: if (dwarf_attr_die(&child, DW_AT_import, &import)) { parents->insert(make_pair(import.addr, *die)); cache_die_parents(parents, &import); } break; // nothing to do for other tags default: break; } } while (dwarf_siblingof(&child, &child) == 0); } cu_die_parent_cache_t* dwflpp::get_die_parents() { assert (cu); cu_die_parent_cache_t *& parents = cu_die_parent_cache[cu->addr]; if (!parents) { parents = new cu_die_parent_cache_t; cache_die_parents(parents, cu); if (sess.verbose > 4) clog << _F("die parent cache %s:%s size %zu", module_name.c_str(), cu_name().c_str(), parents->size()) << endl; } return parents; } vector dwflpp::getscopes_die(Dwarf_Die* die) { cu_die_parent_cache_t *parents = get_die_parents(); vector scopes; Dwarf_Die *scope = die; cu_die_parent_cache_t::iterator it; do { scopes.push_back(*scope); it = parents->find(scope->addr); scope = &it->second; } while (it != parents->end()); #ifdef DEBUG_DWFLPP_GETSCOPES Dwarf_Die *dscopes = NULL; int nscopes = dwarf_getscopes_die(die, &dscopes); assert(nscopes == (int)scopes.size()); for (unsigned i = 0; i < scopes.size(); ++i) assert(scopes[i].addr == dscopes[i].addr); free(dscopes); #endif return scopes; } std::vector dwflpp::getscopes(Dwarf_Die* die) { cu_die_parent_cache_t *parents = get_die_parents(); vector scopes; Dwarf_Die origin; Dwarf_Die *scope = die; cu_die_parent_cache_t::iterator it; do { scopes.push_back(*scope); if (dwarf_tag(scope) == DW_TAG_inlined_subroutine && dwarf_attr_die(scope, DW_AT_abstract_origin, &origin)) scope = &origin; it = parents->find(scope->addr); scope = &it->second; } while (it != parents->end()); #ifdef DEBUG_DWFLPP_GETSCOPES // there isn't an exact libdw equivalent, but if dwarf_getscopes on the // entrypc returns the same first die, then all the scopes should match Dwarf_Addr pc; if (die_entrypc(die, &pc)) { Dwarf_Die *dscopes = NULL; int nscopes = dwarf_getscopes(cu, pc, &dscopes); if (nscopes > 0 && dscopes[0].addr == die->addr) { assert(nscopes == (int)scopes.size()); for (unsigned i = 0; i < scopes.size(); ++i) assert(scopes[i].addr == dscopes[i].addr); } free(dscopes); } #endif return scopes; } std::vector dwflpp::getscopes(Dwarf_Addr pc) { // The die_parent_cache doesn't help us without knowing where the pc is // contained, so we have to do this one the old fashioned way. assert (cu); vector scopes; Dwarf_Die* dwarf_scopes; int nscopes = dwarf_getscopes(cu, pc, &dwarf_scopes); if (nscopes > 0) { scopes.assign(dwarf_scopes, dwarf_scopes + nscopes); free(dwarf_scopes); } #ifdef DEBUG_DWFLPP_GETSCOPES // check that getscopes on the starting die gets the same result if (!scopes.empty()) { vector other = getscopes(&scopes[0]); assert(scopes.size() == other.size()); for (unsigned i = 0; i < scopes.size(); ++i) assert(scopes[i].addr == other[i].addr); } #endif return scopes; } Dwarf_Die* dwflpp::get_parent_scope(Dwarf_Die* die) { Dwarf_Die specification; if (dwarf_attr_die(die, DW_AT_specification, &specification)) die = &specification; cu_die_parent_cache_t *parents = get_die_parents(); cu_die_parent_cache_t::iterator it = parents->find(die->addr); while (it != parents->end()) { Dwarf_Die* scope = &it->second; switch (dwarf_tag (scope)) { case DW_TAG_namespace: case DW_TAG_class_type: case DW_TAG_structure_type: return scope; default: break; } it = parents->find(scope->addr); } return NULL; } static const char* cache_type_prefix(Dwarf_Die* type) { switch (dwarf_tag(type)) { case DW_TAG_enumeration_type: return "enum "; case DW_TAG_structure_type: case DW_TAG_class_type: // treating struct/class as equals return "struct "; case DW_TAG_union_type: return "union "; } return ""; } /* GCC might generate a struct/class without DW_AT_declaration, but that only contains members which have DW_AT_declaration set. We aren't interested in those. PR14434 (GCC bug #54181). */ static bool has_only_decl_members (Dwarf_Die *die) { Dwarf_Die child, import; if (dwarf_child(die, &child) != 0) return false; /* no members */ do { if (! dwarf_hasattr(&child, DW_AT_declaration)) return false; /* real member found. */ int tag = dwarf_tag(&child); if ((tag == DW_TAG_namespace || tag == DW_TAG_structure_type || tag == DW_TAG_class_type) && ! has_only_decl_members (&child)) return false; /* real grand child member found. */ // Unlikely to ever happen, but if there is an imported unit // then check its children as if they are children of this DIE. if (tag == DW_TAG_imported_unit && dwarf_attr_die(&child, DW_AT_import, &import) && ! has_only_decl_members (&import)) return false; } while (dwarf_siblingof(&child, &child) == 0); return true; /* Tried all children and grandchildren. */ } int dwflpp::global_alias_caching_callback(Dwarf_Die *die, bool has_inner_types, const string& prefix, cu_type_cache_t *cache) { const char *name = dwarf_diename(die); if (!name || dwarf_hasattr(die, DW_AT_declaration) || has_only_decl_members(die)) return DWARF_CB_OK; int tag = dwarf_tag(die); if (has_inner_types && (tag == DW_TAG_namespace || tag == DW_TAG_structure_type || tag == DW_TAG_class_type)) iterate_over_types(die, has_inner_types, prefix + name + "::", global_alias_caching_callback, cache); if (tag != DW_TAG_namespace) { string type_name = prefix + cache_type_prefix(die) + name; if (cache->find(type_name) == cache->end()) (*cache)[type_name] = *die; } return DWARF_CB_OK; } int dwflpp::global_alias_caching_callback_cus(Dwarf_Die *die, dwflpp *dw) { mod_cu_type_cache_t *global_alias_cache; global_alias_cache = &dw->global_alias_cache; cu_type_cache_t *v = (*global_alias_cache)[die->addr]; if (v != 0) return DWARF_CB_OK; v = new cu_type_cache_t; (*global_alias_cache)[die->addr] = v; iterate_over_globals(die, global_alias_caching_callback, v); return DWARF_CB_OK; } Dwarf_Die * dwflpp::declaration_resolve_other_cus(const string& name) { iterate_over_cus(global_alias_caching_callback_cus, this, true); for (mod_cu_type_cache_t::iterator i = global_alias_cache.begin(); i != global_alias_cache.end(); ++i) { cu_type_cache_t *v = (*i).second; if (v->find(name) != v->end()) return & ((*v)[name]); } return NULL; } Dwarf_Die * dwflpp::declaration_resolve(const string& name) { cu_type_cache_t *v = global_alias_cache[cu->addr]; if (v == 0) // need to build the cache, just once per encountered module/cu { v = new cu_type_cache_t; global_alias_cache[cu->addr] = v; iterate_over_globals(cu, global_alias_caching_callback, v); if (sess.verbose > 4) clog << _F("global alias cache %s:%s size %zu", module_name.c_str(), cu_name().c_str(), v->size()) << endl; } // XXX: it may be desirable to search other modules' declarations // too, in case a module/shared-library processes a // forward-declared pointer type only, where the actual definition // may only be in vmlinux or the application. if (v->find(name) == v->end()) return declaration_resolve_other_cus(name); return & ((*v)[name]); } Dwarf_Die * dwflpp::declaration_resolve(Dwarf_Die *type) { const char* name = dwarf_diename(type); if (!name) return NULL; string type_name = cache_type_prefix(type) + string(name); return declaration_resolve(type_name); } int dwflpp::cu_function_caching_callback (Dwarf_Die* func, cu_function_cache_t *v) { const char *name = dwarf_diename(func); if (!name) return DWARF_CB_OK; v->insert(make_pair(name, *func)); return DWARF_CB_OK; } int dwflpp::mod_function_caching_callback (Dwarf_Die* cu, cu_function_cache_t *v) { // need to cast callback to func which accepts void* dwarf_getfuncs (cu, (int (*)(Dwarf_Die*, void*))cu_function_caching_callback, v, 0); return DWARF_CB_OK; } template<> int dwflpp::iterate_over_functions(int (*callback)(Dwarf_Die*, void*), void *data, const string& function) { int rc = DWARF_CB_OK; assert (module); assert (cu); cu_function_cache_t *v = cu_function_cache[cu->addr]; if (v == 0) { v = new cu_function_cache_t; cu_function_cache[cu->addr] = v; // need to cast callback to func which accepts void* dwarf_getfuncs (cu, (int (*)(Dwarf_Die*, void*))cu_function_caching_callback, v, 0); if (sess.verbose > 4) clog << _F("function cache %s:%s size %zu", module_name.c_str(), cu_name().c_str(), v->size()) << endl; mod_info->update_symtab(v); } cu_function_cache_t::iterator it; cu_function_cache_range_t range = v->equal_range(function); if (range.first != range.second) { for (it = range.first; it != range.second; ++it) { Dwarf_Die& die = it->second; if (sess.verbose > 4) clog << _F("function cache %s:%s hit %s", module_name.c_str(), cu_name().c_str(), function.c_str()) << endl; rc = (*callback)(& die, data); if (rc != DWARF_CB_OK) break; } } else if (startswith(function, "_Z")) { // C++ names are mangled starting with a "_Z" prefix. Most of the time // we can discover the mangled name from a die's MIPS_linkage_name // attribute, so we read that to match against the user's function // pattern. Note that this isn't perfect, as not all will have that // attribute (notably ctors and dtors), but we do what we can... for (it = v->begin(); it != v->end(); ++it) { if (pending_interrupts) return DWARF_CB_ABORT; Dwarf_Die& die = it->second; const char* linkage_name = NULL; if ((linkage_name = dwarf_linkage_name (&die)) && function_name_matches_pattern (linkage_name, function)) { if (sess.verbose > 4) clog << _F("function cache %s:%s match %s vs %s", module_name.c_str(), cu_name().c_str(), linkage_name, function.c_str()) << endl; rc = (*callback)(& die, data); if (rc != DWARF_CB_OK) break; } } } else if (name_has_wildcard (function)) { for (it = v->begin(); it != v->end(); ++it) { if (pending_interrupts) return DWARF_CB_ABORT; const string& func_name = it->first; Dwarf_Die& die = it->second; if (function_name_matches_pattern (func_name, function)) { if (sess.verbose > 4) clog << _F("function cache %s:%s match %s vs %s", module_name.c_str(), cu_name().c_str(), func_name.c_str(), function.c_str()) << endl; rc = (*callback)(& die, data); if (rc != DWARF_CB_OK) break; } } } else // not a linkage name or wildcard and no match in this CU { // do nothing } return rc; } template<> int dwflpp::iterate_single_function(int (*callback)(Dwarf_Die*, void*), void *data, const string& function) { int rc = DWARF_CB_OK; assert (module); get_module_dwarf(false); if (!module_dwarf) return rc; cu_function_cache_t *v = mod_function_cache[module_dwarf]; if (v == 0) { v = new cu_function_cache_t; mod_function_cache[module_dwarf] = v; iterate_over_cus (mod_function_caching_callback, v, false); if (sess.verbose > 4) clog << _F("module function cache %s size %zu", module_name.c_str(), v->size()) << endl; mod_info->update_symtab(v); } cu_function_cache_t::iterator it; cu_function_cache_range_t range = v->equal_range(function); if (range.first != range.second) { for (it = range.first; it != range.second; ++it) { Dwarf_Die cu_mem; Dwarf_Die& die = it->second; if (sess.verbose > 4) clog << _F("module function cache %s hit %s", module_name.c_str(), function.c_str()) << endl; // since we're iterating out of cu-context, we need each focus focus_on_cu(dwarf_diecu(&die, &cu_mem, NULL, NULL)); rc = (*callback)(& die, data); if (rc != DWARF_CB_OK) break; } } // undo the focus_on_cu this->cu = NULL; this->function_name.clear(); this->function = NULL; return rc; } /* This basically only goes one level down from the compile unit so it * only picks up top level stuff (i.e. nothing in a lower scope) */ template<> int dwflpp::iterate_over_globals(Dwarf_Die *cu_die, int (*callback)(Dwarf_Die*, bool, const string&, void*), void *data) { assert (cu_die); assert (dwarf_tag(cu_die) == DW_TAG_compile_unit || dwarf_tag(cu_die) == DW_TAG_type_unit || dwarf_tag(cu_die) == DW_TAG_partial_unit); // Ignore partial_unit, if they get imported by a real unit, then // iterate_over_types will traverse them. if (dwarf_tag(cu_die) == DW_TAG_partial_unit) return DWARF_CB_OK; // If this is C++, recurse for any inner types bool has_inner_types = dwarf_srclang(cu_die) == DW_LANG_C_plus_plus; return iterate_over_types(cu_die, has_inner_types, "", callback, data); } template<> int dwflpp::iterate_over_types(Dwarf_Die *top_die, bool has_inner_types, const string& prefix, int (* callback)(Dwarf_Die*, bool, const string&, void*), void *data) { int rc = DWARF_CB_OK; Dwarf_Die die, import; assert (top_die); if (dwarf_child(top_die, &die) != 0) return rc; do /* We're only currently looking for named types, * although other types of declarations exist */ switch (dwarf_tag(&die)) { case DW_TAG_base_type: case DW_TAG_enumeration_type: case DW_TAG_structure_type: case DW_TAG_class_type: case DW_TAG_typedef: case DW_TAG_union_type: case DW_TAG_namespace: rc = (*callback)(&die, has_inner_types, prefix, data); break; case DW_TAG_imported_unit: // Follow the imported_unit and iterate over its contents // (either a partial_unit or a full compile_unit), all its // children should be treated as if they appear in this place. if (dwarf_attr_die(&die, DW_AT_import, &import)) rc = iterate_over_types(&import, has_inner_types, prefix, callback, data); break; } while (rc == DWARF_CB_OK && dwarf_siblingof(&die, &die) == 0); return rc; } /* For each notes section in the current module call 'callback', use * 'data' for the notes buffer and pass 'object' back in case * 'callback' is a method */ template<> int dwflpp::iterate_over_notes(void *object, void (*callback)(void*, const string&, const string&, int, const char*, size_t)) { Dwarf_Addr bias; // Note we really want the actual elf file, not the dwarf .debug file. // Older binutils had a bug where they mangled the SHT_NOTE type during // --keep-debug. Elf* elf = dwfl_module_getelf (module, &bias); size_t shstrndx; if (elf_getshdrstrndx (elf, &shstrndx)) return elf_errno(); Elf_Scn *scn = NULL; vector notes; while ((scn = elf_nextscn (elf, scn)) != NULL) { GElf_Shdr shdr; if (gelf_getshdr (scn, &shdr) == NULL) continue; switch (shdr.sh_type) { case SHT_NOTE: if (!(shdr.sh_flags & SHF_ALLOC)) { string scn_name = elf_strptr(elf, shstrndx, shdr.sh_name); Elf_Data *data = elf_getdata (scn, NULL); size_t next; GElf_Nhdr nhdr; size_t name_off; size_t desc_off; for (size_t offset = 0; (next = gelf_getnote (data, offset, &nhdr, &name_off, &desc_off)) > 0; offset = next) { const char *note_name_addr = (const char *)data->d_buf + name_off; const char *note_desc_addr = (const char *)data->d_buf + desc_off; string note_name = nhdr.n_namesz > 1 // n_namesz includes NULL ? string(note_name_addr, nhdr.n_namesz-1) : ""; (*callback) (object, scn_name, note_name, nhdr.n_type, note_desc_addr, nhdr.n_descsz); } } break; } } return 0; } /* For each entry in the .dynamic section in the current module call 'callback' * returning 'object' in case 'callback' is a method */ template<> void dwflpp::iterate_over_libraries(void (*callback)(void*, const char*), void *data) { std::set added; string interpreter; assert (this->module_name.length() != 0); Dwarf_Addr bias; // We cannot use this: dwarf_getelf (dwfl_module_getdwarf (module, &bias)) Elf *elf = dwfl_module_getelf (module, &bias); // elf_getphdrnum (elf, &phnum) is not available in all versions of elfutils // needs libelf from elfutils 0.144+ for (int i = 0; ; i++) { GElf_Phdr mem; GElf_Phdr *phdr; phdr = gelf_getphdr (elf, i, &mem); if (phdr == NULL) break; if (phdr->p_type == PT_INTERP) { size_t maxsize; char *filedata = elf_rawfile (elf, &maxsize); if (filedata != NULL && phdr->p_offset < maxsize) interpreter = (char*) (filedata + phdr->p_offset); break; } } if (interpreter.length() == 0) return; // If it gets cumbersome to maintain this whitelist, we could just check for // startswith("/lib/ld") || startswith("/lib64/ld"), and trust that no admin // would install untrustworthy loaders in those paths. // See also http://sourceware.org/git/?p=glibc.git;a=blob;f=shlib-versions;hb=HEAD if (interpreter != "/lib/ld.so.1" // s390, ppc && interpreter != "/lib/ld64.so.1" // s390x, ppc64 && interpreter != "/lib64/ld64.so.1" && interpreter != "/lib/ld-linux-ia64.so.2" // ia64 && interpreter != "/emul/ia32-linux/lib/ld-linux.so.2" && interpreter != "/lib64/ld-linux-x86-64.so.2" // x8664 && interpreter != "/lib/ld-linux.so.2" // x86 && interpreter != "/lib/ld-linux.so.3" // arm && interpreter != "/lib/ld-linux-armhf.so.3" // arm && interpreter != "/lib/ld-linux-aarch64.so.1" // arm64 && interpreter != "/lib64/ld64.so.2" // ppc64le ) { sess.print_warning (_F("module %s --ldd skipped: unsupported interpreter: %s", module_name.c_str(), interpreter.c_str())); return; } vector ldd_command; ldd_command.push_back("/usr/bin/env"); ldd_command.push_back("LD_TRACE_LOADED_OBJECTS=1"); ldd_command.push_back("LD_WARN=yes"); ldd_command.push_back("LD_BIND_NOW=yes"); ldd_command.push_back(interpreter); ldd_command.push_back(module_name); FILE *fp; int child_fd; pid_t child = stap_spawn_piped(sess.verbose, ldd_command, NULL, &child_fd); if (child <= 0 || !(fp = fdopen(child_fd, "r"))) clog << _F("library iteration on %s failed: %s", module_name.c_str(), strerror(errno)) << endl; else { while (1) // this parsing loop borrowed from add_unwindsym_ldd { char linebuf[256]; char *soname = 0; char *shlib = 0; unsigned long int addr = 0; char *line = fgets (linebuf, 256, fp); if (line == 0) break; // EOF or error #if __GLIBC__ >2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7) #define MS_FMT "%ms" #else #define MS_FMT "%as" #endif // Try soname => shlib (0xaddr) int nf = sscanf (line, MS_FMT " => " MS_FMT " (0x%lx)", &soname, &shlib, &addr); if (nf != 3 || shlib[0] != '/') { // Try shlib (0xaddr) nf = sscanf (line, " " MS_FMT " (0x%lx)", &shlib, &addr); if (nf != 2 || shlib[0] != '/') continue; // fewer than expected fields, or bad shlib. } if (added.find (shlib) == added.end()) { if (sess.verbose > 2) { clog << _F("Added -d '%s", shlib); if (nf == 3) clog << _F("' due to '%s'", soname); else clog << "'"; clog << endl; } added.insert (shlib); } free (soname); free (shlib); } if ((fclose(fp) || stap_waitpid(sess.verbose, child))) sess.print_warning("failed to read libraries from " + module_name + ": " + strerror(errno)); } for (std::set::iterator it = added.begin(); it != added.end(); it++) { string modname = *it; (callback) (data, modname.c_str()); } } /* For each plt section in the current module call 'callback', pass the plt entry * 'address' and 'name' back, and pass 'object' back in case 'callback' is a method */ template<> int dwflpp::iterate_over_plt(void *object, void (*callback)(void*, const char*, size_t)) { Dwarf_Addr load_addr; // Note we really want the actual elf file, not the dwarf .debug file. Elf* elf = dwfl_module_getelf (module, &load_addr); size_t shstrndx; assert (elf_getshdrstrndx (elf, &shstrndx) >= 0); // Get the load address for (int i = 0; ; i++) { GElf_Phdr mem; GElf_Phdr *phdr; phdr = gelf_getphdr (elf, i, &mem); if (phdr == NULL) break; if (phdr->p_type == PT_LOAD) { load_addr = phdr->p_vaddr; break; } } // Get the plt section header Elf_Scn *scn = NULL; GElf_Shdr *plt_shdr = NULL; GElf_Shdr plt_shdr_mem; while ((scn = elf_nextscn (elf, scn))) { GElf_Shdr *shdr = gelf_getshdr (scn, &plt_shdr_mem); assert (shdr != NULL); if (strcmp (elf_strptr (elf, shstrndx, shdr->sh_name), ".plt") == 0) { plt_shdr = shdr; break; } } if (plt_shdr == NULL) return 0; // Layout of the plt section int plt0_entry_size; int plt_entry_size; GElf_Ehdr ehdr_mem; GElf_Ehdr* em = gelf_getehdr (elf, &ehdr_mem); switch (em->e_machine) { case EM_386: plt0_entry_size = 16; plt_entry_size = 16; break; case EM_X86_64: plt0_entry_size = 16; plt_entry_size = 16; break; case EM_ARM: plt0_entry_size = 20; plt_entry_size = 12; break; case EM_AARCH64:plt0_entry_size = 32; plt_entry_size = 16; break; case EM_PPC64: case EM_S390: case EM_PPC: default: throw SEMANTIC_ERROR(".plt is not supported on this architecture"); } scn = NULL; while ((scn = elf_nextscn (elf, scn))) { GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); bool have_rela = false; bool have_rel = false; if (shdr == NULL) continue; assert (shdr != NULL); if ((have_rela = (strcmp (elf_strptr (elf, shstrndx, shdr->sh_name), ".rela.plt") == 0)) || (have_rel = (strcmp (elf_strptr (elf, shstrndx, shdr->sh_name), ".rel.plt") == 0))) { /* Get the data of the section. */ Elf_Data *data = elf_getdata (scn, NULL); assert (data != NULL); /* Get the symbol table information. */ Elf_Scn *symscn = elf_getscn (elf, shdr->sh_link); GElf_Shdr symshdr_mem; GElf_Shdr *symshdr = gelf_getshdr (symscn, &symshdr_mem); assert (symshdr != NULL); Elf_Data *symdata = elf_getdata (symscn, NULL); assert (symdata != NULL); unsigned int nsyms = shdr->sh_size / shdr->sh_entsize; for (unsigned int cnt = 0; cnt < nsyms; ++cnt) { GElf_Ehdr ehdr_mem; GElf_Ehdr* em = gelf_getehdr (elf, &ehdr_mem); if (em == 0) { DWFL_ASSERT ("dwfl_getehdr", dwfl_errno()); } GElf_Rela relamem; GElf_Rela *rela = NULL; GElf_Rel relmem; GElf_Rel *rel = NULL; if (have_rela) { rela = gelf_getrela (data, cnt, &relamem); assert (rela != NULL); } else if (have_rel) { rel = gelf_getrel (data, cnt, &relmem); assert (rel != NULL); } GElf_Sym symmem; Elf32_Word xndx; Elf_Data *xndxdata = NULL; GElf_Sym *sym = gelf_getsymshndx (symdata, xndxdata, GELF_R_SYM (have_rela ? rela->r_info : rel->r_info), &symmem, &xndx); assert (sym != NULL); Dwarf_Addr addr = plt_shdr->sh_offset + plt0_entry_size + cnt * plt_entry_size; if (elf_strptr (elf, symshdr->sh_link, sym->st_name)) (*callback) (object, elf_strptr (elf, symshdr->sh_link, sym->st_name), addr + load_addr); } break; // while scn } } return 0; } // Comparator function for sorting static bool compare_lines(Dwarf_Line* a, Dwarf_Line* b) { if (a == b) return false; int lineno_a = DWARF_LINENO(a); int lineno_b = DWARF_LINENO(b); if (lineno_a == lineno_b) return DWARF_LINEADDR(a) < DWARF_LINEADDR(b); return lineno_a < lineno_b; } // Comparator object for searching Dwarf_Lines with a specific lineno when we // don't have a Dwarf_Line of our own to search for (hence why a or b is always // NULL). struct lineno_comparator { int lineno; lineno_comparator(int lineno): lineno(lineno) {} bool operator() (Dwarf_Line* a, Dwarf_Line* b) { assert(a || b); if (a) return DWARF_LINENO(a) < lineno; else return lineno < DWARF_LINENO(b); } }; // Returns a range of lines in between begin and end with wanted lineno. If // none exist, points to where it would have been. static lines_range_t lineno_equal_range(lines_t* v, int lineno) { lineno_comparator lc(lineno); return equal_range(v->begin(), v->end(), (Dwarf_Line*)NULL, lc); } // Interface to CU lines cache sorted by lineno lines_t* dwflpp::get_cu_lines_sorted_by_lineno(const char *srcfile) { assert(cu); srcfile_lines_cache_t *srcfile_lines = cu_lines_cache[cu]; if (!srcfile_lines) { srcfile_lines = new srcfile_lines_cache_t(); cu_lines_cache[cu] = srcfile_lines; } lines_t *lines = (*srcfile_lines)[srcfile]; if (!lines) { size_t nlines_cu = 0; Dwarf_Lines *lines_cu = NULL; DWARF_ASSERT("dwarf_getsrclines", dwarf_getsrclines(cu, &lines_cu, &nlines_cu)); lines = new lines_t(); (*srcfile_lines)[srcfile] = lines; for (size_t i = 0; i < nlines_cu; i++) { Dwarf_Line *line = dwarf_onesrcline(lines_cu, i); const char *linesrc = DWARF_LINESRC(line); if (strcmp(srcfile, linesrc)) continue; lines->push_back(line); } if (lines->size() > 1) sort(lines->begin(), lines->end(), compare_lines); if (sess.verbose > 3) { clog << _F("found the following lines for %s:", srcfile) << endl; lines_t::iterator i; for (i = lines->begin(); i != lines->end(); ++i) cout << DWARF_LINENO(*i) << " = " << hex << DWARF_LINEADDR(*i) << dec << endl; } } return lines; } static Dwarf_Line* get_func_first_line(Dwarf_Die *cu, base_func_info& func) { // dwarf_getsrc_die() uses binary search to find the Dwarf_Line, but will // return the wrong line if not found. Dwarf_Line *line = dwarf_getsrc_die(cu, func.entrypc); if (line && DWARF_LINEADDR(line) == func.entrypc) return line; // Line not found (or line at wrong addr). We have to resort to a slower // linear method. We won't find an exact match (probably this is an inlined // instance), so just settle on the first Dwarf_Line with lowest addr which // falls in the die. size_t nlines = 0; Dwarf_Lines *lines = NULL; DWARF_ASSERT("dwarf_getsrclines", dwarf_getsrclines(cu, &lines, &nlines)); for (size_t i = 0; i < nlines; i++) { line = dwarf_onesrcline(lines, i); if (dwarf_haspc(&func.die, DWARF_LINEADDR(line))) return line; } return NULL; } static lines_t collect_lines_in_die(lines_range_t range, Dwarf_Die *die) { lines_t lines_in_die; for (lines_t::iterator line = range.first; line != range.second; ++line) if (dwarf_haspc(die, DWARF_LINEADDR(*line))) lines_in_die.push_back(*line); return lines_in_die; } static void add_matching_lines_in_func(Dwarf_Die *cu, lines_t *cu_lines, base_func_info& func, lines_t& matching_lines) { Dwarf_Line *start_line = get_func_first_line(cu, func); if (!start_line) return; for (int lineno = DWARF_LINENO(start_line);;) { lines_range_t range = lineno_equal_range(cu_lines, lineno); // We consider the lineno still part of the die if at least one of them // falls in the die. lines_t lines_in_die = collect_lines_in_die(range, &func.die); if (lines_in_die.empty()) break; // Just pick the first LR even if there are more than one. Since the lines // are sorted by lineno and then addr, the first one is the one with the // lowest addr. matching_lines.push_back(lines_in_die[0]); // break out if there are no more lines, otherwise, go to the next lineno if (range.second == cu_lines->end()) break; lineno = DWARF_LINENO(*range.second); } } void dwflpp::collect_all_lines(char const * srcfile, base_func_info_map_t& funcs, lines_t& matching_lines) { // This is where we handle WILDCARD lineno types. lines_t *cu_lines = get_cu_lines_sorted_by_lineno(srcfile); for (base_func_info_map_t::iterator func = funcs.begin(); func != funcs.end(); ++func) add_matching_lines_in_func(cu, cu_lines, *func, matching_lines); } static void add_matching_line_in_die(lines_t *cu_lines, lines_t& matching_lines, Dwarf_Die *die, int lineno) { lines_range_t lineno_range = lineno_equal_range(cu_lines, lineno); lines_t lines_in_die = collect_lines_in_die(lineno_range, die); if (lines_in_die.empty()) return; // Even if there are more than 1 LRs, just pick the first one. Since the lines // are sorted by lineno and then addr, the first one is the one with the // lowest addr. This is similar to what GDB does. matching_lines.push_back(lines_in_die[0]); } void dwflpp::collect_lines_for_single_lineno(char const * srcfile, int lineno, bool is_relative, base_func_info_map_t& funcs, lines_t& matching_lines) { /* Here, we handle ABSOLUTE and RELATIVE lineno types. Relative line numbers * are a bit special. The issue is that functions (esp. inlined ones) may not * even have a LR corresponding to the first valid line of code. So, applying * an offset to the 'first' LR found in the DIE can be quite imprecise. * Instead, we use decl_line, which although does not necessarily have a * LR associated with it (it can sometimes still happen esp. if the code is * written in OTB-style), it serves as an anchor on which we can apply the * offset to yield a lineno that will not change with compiler optimization. * It also has the added benefit of being consistent with the lineno * printed by e.g. stap -l kernel.function("vfs_read"), so users can be * confident from what lineno we adjust. */ lines_t *cu_lines = get_cu_lines_sorted_by_lineno(srcfile); for (base_func_info_map_t::iterator func = funcs.begin(); func != funcs.end(); ++func) add_matching_line_in_die(cu_lines, matching_lines, &func->die, is_relative ? lineno + func->decl_line : lineno); } static bool functions_have_lineno(base_func_info_map_t& funcs, lines_t *lines, int lineno) { lines_range_t lineno_range = lineno_equal_range(lines, lineno); if (lineno_range.first == lineno_range.second) return false; // no LRs at this lineno for (base_func_info_map_t::iterator func = funcs.begin(); func != funcs.end(); ++func) if (!collect_lines_in_die(lineno_range, &func->die).empty()) return true; return false; } // returns pair of valid linenos surrounding target lineno pair dwflpp::get_nearest_linenos(char const * srcfile, int lineno, base_func_info_map_t& funcs) { assert(cu); lines_t *cu_lines = get_cu_lines_sorted_by_lineno(srcfile); // Look around lineno for linenos with LRs. pair nearest_linenos = make_pair(-1, -1); for (size_t i = 1; i < 6; ++i) { if (nearest_linenos.first == -1 && functions_have_lineno(funcs, cu_lines, lineno-i)) nearest_linenos.first = lineno - i; if (nearest_linenos.second == -1 && functions_have_lineno(funcs, cu_lines, lineno+i)) nearest_linenos.second = lineno + i; } return nearest_linenos; } // returns nearest valid lineno to target lineno int dwflpp::get_nearest_lineno(char const * srcfile, int lineno, base_func_info_map_t& funcs) { assert(cu); pair nearest_linenos = get_nearest_linenos(srcfile, lineno, funcs); if (nearest_linenos.first > 0 && nearest_linenos.second > 0) { // pick the nearest line number (break tie to upper) if (lineno - nearest_linenos.first < nearest_linenos.second - lineno) return nearest_linenos.first; else return nearest_linenos.second; } else if (nearest_linenos.first > 0) return nearest_linenos.first; else if (nearest_linenos.second > 0) return nearest_linenos.second; else return -1; } void dwflpp::suggest_alternative_linenos(char const * srcfile, int lineno, base_func_info_map_t& funcs) { assert(cu); pair nearest_linenos = get_nearest_linenos(srcfile, lineno, funcs); stringstream advice; advice << _F("no line records for %s:%d [man error::dwarf]", srcfile, lineno); if (nearest_linenos.first > 0 || nearest_linenos.second > 0) { //TRANSLATORS: Here we are trying to advise what source file //TRANSLATORS: to attempt. advice << _(" (try "); if (nearest_linenos.first > 0) advice << ":" << nearest_linenos.first; if (nearest_linenos.first > 0 && nearest_linenos.second > 0) advice << _(" or "); if (nearest_linenos.second > 0) advice << ":" << nearest_linenos.second; advice << ")"; } throw SEMANTIC_ERROR (advice.str()); } static base_func_info_map_t get_funcs_in_srcfile(base_func_info_map_t& funcs, const char * srcfile) { base_func_info_map_t matching_funcs; for (base_func_info_map_t::iterator func = funcs.begin(); func != funcs.end(); ++func) if (func->decl_file == string(srcfile)) matching_funcs.push_back(*func); return matching_funcs; } template<> void dwflpp::iterate_over_srcfile_lines(char const * srcfile, const vector& linenos, enum lineno_t lineno_type, base_func_info_map_t& funcs, void (* callback) (Dwarf_Addr, int, void*), bool has_nearest, void *data) { /* Matching line records (LRs) to user-provided linenos is trickier than it * seems. The fate of all functions is one of three possibilities: * 1. it's a normal function, with a subprogram DIE and a bona fide lowpc * and highpc attribute. * 2. it's an inlined function (one/multiple inlined_subroutine DIE, with one * abstract_origin DIE) * 3. it's both a normal function and an inlined function. For example, if * the funtion has been inlined only in some places, we'll have a DIE for * the normal subprogram DIE as well as inlined_subroutine DIEs. * * Multiple LRs for the same lineno but different addresses can simply happen * due to the function appearing in multiple forms. E.g. a function inlined * in two spots can yield two sets of LRs for its linenos at the different * addresses where it is inlined. * This is why the collect_* functions used here try to match up LRs back * to their originating DIEs. For example, in the function * collect_lines_for_single_lineno(), we filter first by DIE so that a lineno * corresponding to multiple addrs in multiple inlined_subroutine DIEs yields * a probe for each of them. */ assert(cu); // only work on the functions found in the current srcfile base_func_info_map_t current_funcs = get_funcs_in_srcfile(funcs, srcfile); if (current_funcs.empty()) return; // collect lines lines_t matching_lines; if (lineno_type == ABSOLUTE) collect_lines_for_single_lineno(srcfile, linenos[0], false, /* is_relative */ current_funcs, matching_lines); else if (lineno_type == RELATIVE) collect_lines_for_single_lineno(srcfile, linenos[0], true, /* is_relative */ current_funcs, matching_lines); else if (lineno_type == WILDCARD) collect_all_lines(srcfile, current_funcs, matching_lines); else if (lineno_type == ENUMERATED) { set collected_linenos; for (vector::const_iterator it = linenos.begin(); it != linenos.end(); it++) { // have we already collected this lineno? if (collected_linenos.find(*it) != collected_linenos.end()) continue; // remember end iterator so we can tell if things were found later lines_t::const_iterator itend = matching_lines.end(); collect_lines_for_single_lineno(srcfile, *it, false, /* is_relative */ current_funcs, matching_lines); // add to set if we found LRs if (itend != matching_lines.end()) collected_linenos.insert(*it); // if we didn't find anything and .nearest is given, then try nearest if (itend == matching_lines.end() && has_nearest) { int nearest_lineno = get_nearest_lineno(srcfile, *it, current_funcs); if (nearest_lineno <= 0) // no valid nearest linenos continue; bool new_lineno = collected_linenos.insert(nearest_lineno).second; if (new_lineno) collect_lines_for_single_lineno(srcfile, nearest_lineno, false, /* is_relative */ current_funcs, matching_lines); } } } // should we try to collect the nearest lines if we didn't collect everything // on first try? (ABSOLUTE and RELATIVE only: ENUMERATED handles it already // and WILDCARD doesn't need it) if (matching_lines.empty() && has_nearest && (lineno_type == ABSOLUTE || lineno_type == RELATIVE)) { int lineno = linenos[0]; if (lineno_type == RELATIVE) // just pick the first function and make it relative to that lineno += current_funcs[0].decl_line; int nearest_lineno = get_nearest_lineno(srcfile, lineno, current_funcs); if (nearest_lineno > 0) collect_lines_for_single_lineno(srcfile, nearest_lineno, false, /* is_relative */ current_funcs, matching_lines); } // call back with matching lines if (!matching_lines.empty()) { set probed_addrs; for (lines_t::iterator line = matching_lines.begin(); line != matching_lines.end(); ++line) { int lineno = DWARF_LINENO(*line); Dwarf_Addr addr = DWARF_LINEADDR(*line); bool is_new_addr = probed_addrs.insert(addr).second; if (is_new_addr) callback(addr, lineno, data); } } // No LRs found at the wanted lineno. So let's suggest other ones if user was // targeting a specific lineno (ABSOLUTE or RELATIVE). else if (lineno_type == ABSOLUTE || lineno_type == RELATIVE) { int lineno = linenos[0]; if (lineno_type == RELATIVE) // just pick the first function and make it relative to that lineno += current_funcs[0].decl_line; suggest_alternative_linenos(srcfile, lineno, current_funcs); } } template<> void dwflpp::iterate_over_labels(Dwarf_Die *begin_die, const string& sym, const base_func_info& function, const vector& linenos, enum lineno_t lineno_type, void *data, void (* callback)(const base_func_info&, const char*, const char*, int, Dwarf_Die*, Dwarf_Addr, void*)) { get_module_dwarf(); Dwarf_Die die, import; const char *name; int res = dwarf_child (begin_die, &die); if (res != 0) return; // die without children, bail out. do { switch (dwarf_tag(&die)) { case DW_TAG_label: name = dwarf_diename (&die); if (name && (name == sym || (name_has_wildcard(sym) && function_name_matches_pattern (name, sym)))) { // Don't try to be smart. Just drop no addr labels. Dwarf_Addr stmt_addr; if (dwarf_lowpc (&die, &stmt_addr) == 0) { // Get the file/line number for this label int dline; const char *file = dwarf_decl_file (&die) ?: ""; dwarf_decl_line (&die, &dline); vector scopes = getscopes_die(&die); if (scopes.size() > 1) { Dwarf_Die scope; if (!inner_die_containing_pc(scopes[1], stmt_addr, scope)) { sess.print_warning(_F("label '%s' at address %s (dieoffset: %s) is not " "contained by its scope '%s' (dieoffset: %s) -- bad" " debuginfo? [man error::dwarf]", name, lex_cast_hex(stmt_addr).c_str(), lex_cast_hex(dwarf_dieoffset(&die)).c_str(), (dwarf_diename(&scope) ?: ""), lex_cast_hex(dwarf_dieoffset(&scope)).c_str())); } bool matches_lineno; if (lineno_type == ABSOLUTE) matches_lineno = dline == linenos[0]; else if (lineno_type == RELATIVE) matches_lineno = dline == linenos[0] + function.decl_line; else if (lineno_type == ENUMERATED) matches_lineno = (binary_search(linenos.begin(), linenos.end(), dline)); else // WILDCARD matches_lineno = true; if (matches_lineno) callback(function, name, file, dline, &scope, stmt_addr, data); } } } break; case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: // Stay within our filtered function break; case DW_TAG_imported_unit: // Iterate over the children of the imported unit as if they // were inserted in place. if (dwarf_attr_die(&die, DW_AT_import, &import)) iterate_over_labels (&import, sym, function, linenos, lineno_type, data, callback); break; default: if (dwarf_haschildren (&die)) iterate_over_labels (&die, sym, function, linenos, lineno_type, data, callback); break; } } while (dwarf_siblingof (&die, &die) == 0); } // Mini 'query-like' struct to help us navigate callbacks during // external function resolution struct external_function_query { dwflpp* dw; const string name; Dwarf_Die die; Dwarf_Addr addr; bool resolved; external_function_query(dwflpp* dw, const string& name): dw(dw), name(name), addr(0), resolved(false) {} }; int dwflpp::external_function_cu_callback (Dwarf_Die* cu, external_function_query *efq) { efq->dw->focus_on_cu(cu); return efq->dw->iterate_over_functions(external_function_func_callback, efq, efq->name); } int dwflpp::external_function_func_callback (Dwarf_Die* func, external_function_query *efq) { Dwarf_Attribute external; Dwarf_Addr func_addr; if (dwarf_attr_integrate(func, DW_AT_external, &external) != NULL && dwarf_lowpc(func, &func_addr) == 0) { efq->die = *func; efq->addr = func_addr; efq->resolved = true; return DWARF_CB_ABORT; // we found it so stop here } return DWARF_CB_OK; } template<> void dwflpp::iterate_over_callees(Dwarf_Die *begin_die, const string& sym, long recursion_depth, void *data, void (* callback)(base_func_info&, base_func_info&, stack*, void*), base_func_info& caller, stack *callers) { get_module_dwarf(); Dwarf_Die die, import; // DIE of abstract_origin found in die Dwarf_Die origin; // callee's entry pc (= where we'll probe) Dwarf_Addr func_addr; // caller's unwind pc during call (to match against bt for filtering) Dwarf_Addr caller_uw_addr; Dwarf_Attribute attr; base_func_info callee; if (dwarf_child(begin_die, &die) != 0) return; // die without children, bail out. bool free_callers = false; if (callers == NULL) /* first call */ { callers = new stack(); free_callers = true; } do { bool inlined = false; switch (dwarf_tag(&die)) { case DW_TAG_inlined_subroutine: inlined = true; /* FALLTHROUGH */ /* thanks mjw */ case DW_TAG_GNU_call_site: callee.name = dwarf_diename(&die) ?: ""; if (callee.name.empty()) continue; if (callee.name != sym) { if (!name_has_wildcard(sym)) continue; if (!function_name_matches_pattern(callee.name, sym)) continue; } /* In both cases (call sites and inlines), we want the * abstract_origin. The difference is that in inlines, the addr is * in the die itself, whereas for call sites, the addr is in the * abstract_origin's die. * Note that in the case of inlines, we're only calling back * for that inline instance, not all. This is what we want, since * it will only be triggered when 'called' from the target func, * which is something we have to emulate for non-inlined funcs * (which is the purpose of the caller_uw_addr below) */ if (dwarf_attr_die(&die, DW_AT_abstract_origin, &origin) == NULL) continue; // the low_pc of the die in either cases is the pc that would // show up in a backtrace (inlines are a special case in which // the die's low_pc is also the abstract_origin's low_pc = the // 'start' of the inline instance) if (dwarf_lowpc(&die, &caller_uw_addr) != 0) continue; if (inlined) func_addr = caller_uw_addr; else if (dwarf_lowpc(&origin, &func_addr) != 0) { // function doesn't have a low_pc, is it external? if (dwarf_attr_integrate(&origin, DW_AT_external, &attr) != NULL) { // let's iterate over the CUs and find it. NB: it's // possible we could have also done this by creating a // probe point with .exported tacked on and rerunning it // through derive_probe(). But since we're already on the // dwflpp side of things, and we already have access to // everything we need, let's try to be self-sufficient. // remember old focus Dwarf_Die *old_cu = cu; external_function_query efq(this, dwarf_linkage_name(&origin) ?: callee.name); iterate_over_cus(external_function_cu_callback, &efq, false); // restore focus cu = old_cu; if (!efq.resolved) // did we resolve it? continue; func_addr = efq.addr; origin = efq.die; } // non-external function without low_pc, jump ship else continue; } // We now have the addr to probe in func_addr, and the DIE // from which to obtain file/line info in origin // Get the file/line number for this callee callee.decl_file = dwarf_decl_file (&origin) ?: ""; dwarf_decl_line (&origin, &callee.decl_line); // add as a caller to match against if (!inlined) callers->push(caller_uw_addr); callee.die = inlined ? die : origin; callee.entrypc = func_addr; callback(callee, caller, callers, data); // If it's a tail call, print a warning that it may not be caught if (!inlined && dwarf_attr_integrate(&die, DW_AT_GNU_tail_call, &attr) != NULL) sess.print_warning (_F("Callee \"%s\" in function \"%s\" is a tail call: " ".callee probe may not fire. Try placing the probe " "directly on the callee function instead.", callee.name.c_str(), caller.name.c_str())); // For .callees(N) probes, we recurse on this callee. Note that we // pass the callee we just found as the caller arg for this recursion, // since it (the callee we just found) will be the caller of whatever // callees found inside this recursion. if (recursion_depth > 1) iterate_over_callees(inlined ? &die : &origin, sym, recursion_depth-1, data, callback, callee, callers); if (!inlined) callers->pop(); break; case DW_TAG_subprogram: break; // don't leave our filtered func case DW_TAG_imported_unit: // Iterate over the children of the imported unit as if they // were inserted in place. if (dwarf_attr_die(&die, DW_AT_import, &import)) // NB: we pass the same caller arg into it iterate_over_callees (&import, sym, recursion_depth, data, callback, caller, callers); break; default: if (dwarf_haschildren (&die)) // NB: we pass the same caller arg into it iterate_over_callees (&die, sym, recursion_depth, data, callback, caller, callers); break; } } while (dwarf_siblingof (&die, &die) == 0); if (free_callers && callers != NULL) delete callers; } void dwflpp::collect_srcfiles_matching (string const & pattern, set & filtered_srcfiles) { assert (module); assert (cu); size_t nfiles; Dwarf_Files *srcfiles; // PR 5049: implicit * in front of given path pattern. // NB: fnmatch() is used without FNM_PATHNAME. string prefixed_pattern = string("*/") + pattern; DWARF_ASSERT ("dwarf_getsrcfiles", dwarf_getsrcfiles (cu, &srcfiles, &nfiles)); { for (size_t i = 0; i < nfiles; ++i) { char const * fname = dwarf_filesrc (srcfiles, i, NULL, NULL); if (fnmatch (pattern.c_str(), fname, 0) == 0 || fnmatch (prefixed_pattern.c_str(), fname, 0) == 0) { filtered_srcfiles.insert (fname); if (sess.verbose>2) clog << _F("selected source file '%s'\n", fname); } } } } void dwflpp::resolve_prologue_endings (func_info_map_t & funcs) { // When a program is compiled with no optimization, GCC does no variable // tracking, which means that location info is actually only really valid // after the prologue, even though GCC reports it as valid during. So we need // to find the prologue ends to get accurate info. This may or may not be the // first address that has a source line distinct from the function // declaration's. assert(module); assert(cu); size_t nlines = 0; Dwarf_Lines *lines = NULL; /* trouble cases: malloc do_symlink in init/initramfs.c tail-recursive/tiny then no-prologue sys_get?id in kernel/timer.c no-prologue sys_exit_group tail-recursive {do_,}sys_open extra-long-prologue (gcc 3.4) cpu_to_logical_apicid NULL-decl_file */ // Fetch all srcline records, sorted by address. No need to free lines, it's a // direct pointer to the CU's cached lines. if (dwarf_getsrclines(cu, &lines, &nlines) != 0 || lines == NULL || nlines == 0) { if (sess.verbose > 2) clog << _F("aborting prologue search: no source lines found for cu '%s'\n", cu_name().c_str()); return; } // Dump them into our own array for easier searching. They should already be // sorted by addr, but we doublecheck that here. We want to keep the indices // between lines and addrs the same. vector addrs; for (size_t i = 0; i < nlines; i++) { Dwarf_Line* line = dwarf_onesrcline(lines, i); Dwarf_Addr addr = DWARF_LINEADDR(line); if (!addrs.empty() && addr < addrs.back()) throw SEMANTIC_ERROR(_("lines from dwarf_getsrclines() not sorted")); addrs.push_back(addr); } // We normally ignore a function's decl_line, since it is associated with the // line at which the identifier appears in the declaration, and has no // meaningful relation to the lineno associated with the entrypc (which is // normally the lineno of '{', which could occur at the same line as the // declaration, or lower down). // However, if the CU was compiled using GCC < 4.4, then the decl_line // actually represents the lineno of '{' as well, in which case if the lineno // associated with the entrypc is != to the decl_line, it means the compiler // scraped/optimized off some of the beginning of the function and the safest // thing we can do is consider it naked. bool consider_decl_line = false; { string prod, vers; if (is_gcc_producer(cu, prod, vers) && strverscmp(vers.c_str(), "4.4.0") < 0) consider_decl_line = true; } for(func_info_map_t::iterator it = funcs.begin(); it != funcs.end(); it++) { #if 0 /* someday */ Dwarf_Addr* bkpts = 0; int n = dwarf_entry_breakpoints (& it->die, & bkpts); // ... free (bkpts); #endif Dwarf_Addr entrypc = it->entrypc; Dwarf_Addr highpc; // NB: highpc is exclusive: [entrypc,highpc) DWFL_ASSERT ("dwarf_highpc", dwarf_highpc (& it->die, & highpc)); unsigned entrypc_srcline_idx = 0; Dwarf_Line *entrypc_srcline = NULL; { vector::const_iterator it_addr = lower_bound(addrs.begin(), addrs.end(), entrypc); if (it_addr != addrs.end() && *it_addr == entrypc) { entrypc_srcline_idx = it_addr - addrs.begin(); entrypc_srcline = dwarf_onesrcline(lines, entrypc_srcline_idx); } } if (!entrypc_srcline) { if (sess.verbose > 2) clog << _F("missing entrypc dwarf line record for function '%s'\n", it->name.c_str()); // This is probably an inlined function. We'll end up using // its lowpc as a probe address. continue; } if (entrypc == 0) { if (sess.verbose > 2) clog << _F("null entrypc dwarf line record for function '%s'\n", it->name.c_str()); // This is probably an inlined function. We'll skip this instance; // it is messed up. continue; } if (sess.verbose>2) clog << _F("searching for prologue of function '%s' %#" PRIx64 "-%#" PRIx64 "@%s:%d\n", it->name.c_str(), entrypc, highpc, it->decl_file.c_str(), it->decl_line); // For each function, we look for the prologue-end marker (e.g. clang // outputs one). If there is no explicit marker (e.g. GCC does not), we // accept a bigger or equal lineno as a prologue end (this catches GCC's // 0-line advances). // We may have to skip a few because some old compilers plop // in dummy line records for longer prologues. If we go too // far (addr >= highpc), we take the previous one. Or, it may // be the first one, if the function had no prologue, and thus // the entrypc maps to a statement in the body rather than the // declaration. int entrypc_srcline_lineno = DWARF_LINENO(entrypc_srcline); unsigned postprologue_srcline_idx = entrypc_srcline_idx; Dwarf_Line *postprologue_srcline = entrypc_srcline; while (postprologue_srcline_idx < nlines) { postprologue_srcline = dwarf_onesrcline(lines, postprologue_srcline_idx); Dwarf_Addr lineaddr = DWARF_LINEADDR(postprologue_srcline); const char* linesrc = DWARF_LINESRC(postprologue_srcline); int lineno = DWARF_LINENO(postprologue_srcline); bool lineprologue_end = DWARF_LINEPROLOGUEEND(postprologue_srcline); if (sess.verbose>2) clog << _F("checking line record %#" PRIx64 "@%s:%d%s\n", lineaddr, linesrc, lineno, lineprologue_end ? " (marked)" : ""); // have we passed the function? if (lineaddr >= highpc) break; // is there an explicit prologue_end marker? if (lineprologue_end) break; // is it a different file? if (it->decl_file != string(linesrc)) break; // OK, it's the same file, but is it a different line? if (lineno != entrypc_srcline_lineno) break; // Same file and line, is this a second line record (e.g. 0-line advance)? if (postprologue_srcline_idx != entrypc_srcline_idx) break; // This is the first iteration. Is decl_line meaningful and is the // lineno past the decl_line? if (consider_decl_line && lineno != it->decl_line) break; // Let's try the next srcline. postprologue_srcline_idx ++; } // loop over srclines Dwarf_Addr postprologue_addr = DWARF_LINEADDR(postprologue_srcline); if (postprologue_addr >= highpc) { // pick addr of previous line record Dwarf_Line *lr = dwarf_onesrcline(lines, postprologue_srcline_idx-1); postprologue_addr = DWARF_LINEADDR(lr); } it->prologue_end = postprologue_addr; if (sess.verbose>2) { clog << _F("prologue found function '%s'", it->name.c_str()); // Add a little classification datum //TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) if (postprologue_addr == entrypc) clog << _(" (naked)"); //TRANSLATORS: Here we're adding some classification datum (ie we went over) if (DWARF_LINEADDR(postprologue_srcline) >= highpc) clog << _(" (tail-call?)"); //TRANSLATORS: Here we're adding some classification datum (ie it was marked) if (DWARF_LINEPROLOGUEEND(postprologue_srcline)) clog << _(" (marked)"); clog << " = 0x" << hex << postprologue_addr << dec << "\n"; } } // loop over functions } bool dwflpp::function_entrypc (Dwarf_Addr * addr) { assert (function); // PR10574: reject 0, which tends to be eliminated COMDAT return (dwarf_entrypc (function, addr) == 0 && *addr != 0); } bool dwflpp::die_entrypc (Dwarf_Die * die, Dwarf_Addr * addr) { int rc = 0; string lookup_method; * addr = 0; lookup_method = "dwarf_entrypc"; rc = dwarf_entrypc (die, addr); if (rc) { lookup_method = "dwarf_ranges"; Dwarf_Addr base; Dwarf_Addr begin; Dwarf_Addr end; ptrdiff_t offset = dwarf_ranges (die, 0, &base, &begin, &end); if (offset < 0) rc = -1; else if (offset > 0) { * addr = begin; rc = 0; // Now we need to check that there are no more ranges // associated with this function, which could conceivably // happen if a function is inlined, then pieces of it are // split amongst different conditional branches. It's not // obvious which of them to favour. As a heuristic, we // pick the beginning of the first range, and ignore the // others (but with a warning). unsigned extra = 0; while ((offset = dwarf_ranges (die, offset, &base, &begin, &end)) > 0) extra ++; if (extra) lookup_method += _F(", ignored %s more", lex_cast(extra).c_str()); } } // PR10574: reject subprograms where the entrypc address turns out // to be 0, since they tend to correspond to duplicate-eliminated // COMDAT copies of C++ functions. if (rc == 0 && *addr == 0) { lookup_method += _(" (skip comdat)"); rc = 1; } if (sess.verbose > 2) clog << _F("entry-pc lookup (%s dieoffset: %s) = %#" PRIx64 " (rc %d)", lookup_method.c_str(), lex_cast_hex(dwarf_dieoffset(die)).c_str(), *addr, rc) << endl; return (rc == 0); } void dwflpp::function_die (Dwarf_Die *d) { assert (function); *d = *function; } void dwflpp::function_file (char const ** c) { assert (function); assert (c); *c = dwarf_decl_file (function); if (*c == NULL) { // The line table might know. Dwarf_Addr pc; if (dwarf_lowpc(function, &pc) == 0) *c = pc_line (pc, NULL, NULL); if (*c == NULL) *c = ""; } } void dwflpp::function_line (int *linep) { assert (function); if (dwarf_decl_line (function, linep) != 0) { // The line table might know. Dwarf_Addr pc; if (dwarf_lowpc(function, &pc) == 0) pc_line (pc, linep, NULL); } } bool dwflpp::die_has_pc (Dwarf_Die & die, Dwarf_Addr pc) { int res = dwarf_haspc (&die, pc); // dwarf_ranges will return -1 if a function die has no DW_AT_ranges // if (res == -1) // DWARF_ASSERT ("dwarf_haspc", res); return res == 1; } bool dwflpp::inner_die_containing_pc(Dwarf_Die& scope, Dwarf_Addr addr, Dwarf_Die& result) { result = scope; // Sometimes we're in a bad scope to begin with -- just let it be. This can // happen for example if the compiler outputs a label PC that's just outside // the lexical scope. We can't really do anything about that, but variables // will probably not be accessible in this case. if (!die_has_pc(scope, addr)) return false; Dwarf_Die child, import; int rc = dwarf_child(&result, &child); while (rc == 0) { switch (dwarf_tag (&child)) { case DW_TAG_imported_unit: // The children of the imported unit need to be treated as if // they are inserted here. So look inside and set result if // found. if (dwarf_attr_die(&child, DW_AT_import, &import)) { Dwarf_Die import_result; if (inner_die_containing_pc(import, addr, import_result)) { result = import_result; return true; } } break; // lexical tags to recurse within the same starting scope // NB: this intentionally doesn't cross into inlines! case DW_TAG_lexical_block: case DW_TAG_with_stmt: case DW_TAG_catch_block: case DW_TAG_try_block: case DW_TAG_entry_point: if (die_has_pc(child, addr)) { result = child; rc = dwarf_child(&result, &child); continue; } } rc = dwarf_siblingof(&child, &child); } return true; } void dwflpp::loc2c_error (void *arg, const char *fmt, ...) { const char *msg = "?"; char *tmp = NULL; int rc; va_list ap; va_start (ap, fmt); rc = vasprintf (& tmp, fmt, ap); if (rc < 0) msg = "?"; else msg = tmp; va_end (ap); dwflpp *pp = (dwflpp *) arg; semantic_error err(ERR_SRC, msg); string what = pp->die_location_as_string(pp->l2c_ctx.pc, pp->l2c_ctx.die); string where = pp->die_location_as_function_string (pp->l2c_ctx.pc, pp->l2c_ctx.die); err.details.push_back(what); err.details.push_back(where); throw err; } // This function generates code used for addressing computations of // target variables. void dwflpp::emit_address (struct obstack *pool, Dwarf_Addr address) { int n = dwfl_module_relocations (module); DWFL_ASSERT ("dwfl_module_relocations", n >= 0); Dwarf_Addr reloc_address = address; const char *secname = ""; if (n > 1) { int i = dwfl_module_relocate_address (module, &reloc_address); DWFL_ASSERT ("dwfl_module_relocate_address", i >= 0); secname = dwfl_module_relocation_info (module, i, NULL); } if (sess.verbose > 2) { clog << _F("emit dwarf addr %#" PRIx64 " => module %s section %s relocaddr %#" PRIx64, address, module_name.c_str (), (secname ?: "null"), reloc_address) << endl; } if (n > 0 && !(n == 1 && secname == NULL)) { DWFL_ASSERT ("dwfl_module_relocation_info", secname); if (n > 1 || secname[0] != '\0') { // This gives us the module name, and section name within the // module, for a kernel module (or other ET_REL module object). obstack_printf (pool, "({ unsigned long addr = 0; "); obstack_printf (pool, "addr = _stp_kmodule_relocate (\"%s\",\"%s\",%#" PRIx64 "); ", module_name.c_str(), secname, reloc_address); obstack_printf (pool, "addr; })"); } else if (n == 1 && module_name == TOK_KERNEL && secname[0] == '\0') { // elfutils' way of telling us that this is a relocatable kernel address, which we // need to treat the same way here as dwarf_query::add_probe_point does: _stext. address -= sess.sym_stext; secname = "_stext"; // Note we "cache" the result here through a static because the // kernel will never move after being loaded (unlike modules and // user-space dynamic share libraries). obstack_printf (pool, "({ static unsigned long addr = 0; "); obstack_printf (pool, "if (addr==0) addr = _stp_kmodule_relocate (\"%s\",\"%s\",%#" PRIx64 "); ", module_name.c_str(), secname, address); // PR10000 NB: not reloc_address obstack_printf (pool, "addr; })"); } else { obstack_printf (pool, "/* pragma:vma */"); obstack_printf (pool, "({ unsigned long addr = 0; "); obstack_printf (pool, "addr = _stp_umodule_relocate (\"%s\",%#" PRIx64 ", current); ", resolve_path(module_name.c_str()).c_str(), address); obstack_printf (pool, "addr; })"); } } else obstack_printf (pool, "%#" PRIx64 "UL", address); // assume as constant } void dwflpp::loc2c_emit_address (void *arg, struct obstack *pool, Dwarf_Addr address) { static_cast(arg)->emit_address (pool, address); } void dwflpp::get_locals(vector& scopes, set& locals) { // XXX Shouldn't this be walking up to outer scopes too? get_locals_die(scopes[0], locals); } void dwflpp::get_locals_die(Dwarf_Die& die, set& locals) { // Try to get the first child of die. Dwarf_Die child, import; if (dwarf_child (&die, &child) == 0) { do { const char *name; // Output each sibling's name (that is a variable or // parameter) to 'o'. switch (dwarf_tag (&child)) { case DW_TAG_variable: case DW_TAG_formal_parameter: name = dwarf_diename (&child); if (name) locals.insert(string("$") + name); break; case DW_TAG_imported_unit: // Treat the imported unit children as if they are // children of the given DIE. if (dwarf_attr_die(&child, DW_AT_import, &import)) get_locals_die (import, locals); break; default: break; } } while (dwarf_siblingof (&child, &child) == 0); } } Dwarf_Attribute * dwflpp::find_variable_and_frame_base (vector& scopes, Dwarf_Addr pc, string const & local, const target_symbol *e, Dwarf_Die *vardie, Dwarf_Attribute *fb_attr_mem) { Dwarf_Die *scope_die = &scopes[0]; Dwarf_Attribute *fb_attr = NULL; assert (cu); int declaring_scope = dwarf_getscopevar (&scopes[0], scopes.size(), local.c_str(), 0, NULL, 0, 0, vardie); if (declaring_scope < 0) { set locals; get_locals(scopes, locals); string sugs = levenshtein_suggest(local, locals); // probably not that many, so no limit if (pc) throw SEMANTIC_ERROR (_F("unable to find local '%s', [man error::dwarf] dieoffset %s in %s, near pc %s %s %s %s (%s)", local.c_str(), lex_cast_hex(dwarf_dieoffset(scope_die)).c_str(), module_name.c_str(), lex_cast_hex(pc).c_str(), (scope_die == NULL) ? "" : _("in"), (dwarf_diename(scope_die) ?: ""), (dwarf_diename(cu) ?: ""), (sugs.empty() ? (_("")) : (_("alternatives: ") + sugs + ")")).c_str()), e->tok); else throw SEMANTIC_ERROR (_F("unable to find global '%s', [man error::dwarf] dieoffset %s in %s, %s %s %s (%s)", local.c_str(), lex_cast_hex(dwarf_dieoffset(scope_die)).c_str(), module_name.c_str(), (scope_die == NULL) ? "" : _("in"), (dwarf_diename(scope_die) ?: ""), cu_name().c_str(), (sugs.empty() ? (_("")) : (_("alternatives: ") + sugs + ")")).c_str()), e->tok); } /* Some GCC versions would output duplicate external variables, one without a location attribute. If so, try to find the other if it exists in the same scope. See GCC PR51410. */ Dwarf_Attribute attr_mem; if (dwarf_attr_integrate (vardie, DW_AT_const_value, &attr_mem) == NULL && dwarf_attr_integrate (vardie, DW_AT_location, &attr_mem) == NULL && dwarf_attr_integrate (vardie, DW_AT_external, &attr_mem) != NULL && dwarf_tag(&scopes[declaring_scope]) == DW_TAG_compile_unit) { Dwarf_Die orig_vardie = *vardie; bool alt_found = false; if (dwarf_child(&scopes[declaring_scope], vardie) == 0) do { // Note, not handling DW_TAG_imported_unit, assuming GCC // version is recent enough to not need this workaround if // we would see an imported unit. if (dwarf_tag (vardie) == DW_TAG_variable && strcmp (dwarf_diename (vardie), local.c_str ()) == 0 && (dwarf_attr_integrate (vardie, DW_AT_external, &attr_mem) != NULL) && ((dwarf_attr_integrate (vardie, DW_AT_const_value, &attr_mem) != NULL) || (dwarf_attr_integrate (vardie, DW_AT_location, &attr_mem) != NULL))) alt_found = true; } while (!alt_found && dwarf_siblingof(vardie, vardie) == 0); if (! alt_found) *vardie = orig_vardie; } // Global vars don't need (cannot use) frame base in location descriptor. if (pc == 0) return NULL; /* We start out walking the "lexical scopes" as returned by * as returned by dwarf_getscopes for the address, starting with the * declaring_scope that the variable was found in. */ vector physcopes, *fbscopes = &scopes; for (size_t inner = declaring_scope; inner < fbscopes->size() && fb_attr == NULL; ++inner) { Dwarf_Die& scope = (*fbscopes)[inner]; switch (dwarf_tag (&scope)) { default: continue; case DW_TAG_subprogram: case DW_TAG_entry_point: fb_attr = dwarf_attr_integrate (&scope, DW_AT_frame_base, fb_attr_mem); break; case DW_TAG_inlined_subroutine: /* Unless we already are going through the "pyshical die tree", * we now need to start walking the die tree where this * subroutine is inlined to find the appropriate frame base. */ if (declaring_scope != -1) { physcopes = getscopes_die(&scope); if (physcopes.empty()) throw SEMANTIC_ERROR (_F("unable to get die scopes for '%s' in an inlined subroutine", local.c_str()), e->tok); fbscopes = &physcopes; inner = 0; // zero is current scope, for look will increase. declaring_scope = -1; } break; } } return fb_attr; } /* Returns a human readable string with suggested locations where a DIE attribute is valid. */ static string suggested_locations_string(Dwarf_Attribute *attr) { string locsstr; if (attr == NULL) locsstr = ""; else { #if _ELFUTILS_PREREQ (0, 158) Dwarf_Op *expr; size_t exprlen; Dwarf_Addr base, start, end; ptrdiff_t off = 0; off = dwarf_getlocations (attr, off, &base, &start, &end, &expr, &exprlen); if (off > 0) { locsstr = _("alternative locations: "); while (off > 0) { locsstr += "["; locsstr += lex_cast_hex(start); locsstr += ","; locsstr += lex_cast_hex(end); locsstr += "]"; off = dwarf_getlocations (attr, off, &base, &start, &end, &expr, &exprlen); if (off > 0) locsstr += ", "; } } else if (off == 0) locsstr = _(""); else locsstr = _F("", dwarf_errmsg(-1)); #else locsstr = ""; #endif /* _ELFUTILS_PREREQ (0, 158) */ } return locsstr; } /* Produce a human readable name for a DIE. */ static string die_name_string (Dwarf_Die *die) { string res; const char *name = dwarf_linkage_name(die); if (name == NULL) name = dwarf_diename (die); size_t demangle_buffer_len = 0; char *demangle_buffer = NULL; if (name != NULL && name[0] == '_' && name[1] == 'Z') { int status = -1; char *dsymname = abi::__cxa_demangle (name, demangle_buffer, &demangle_buffer_len, &status); if (status == 0) name = demangle_buffer = dsymname; } if (name != NULL) res = name; else res = _(" 0) { linestr += ":" + lex_cast(lineno); if (col > 0) linestr += ":" + lex_cast(col); } } else linestr += _("unknown source"); return linestr; } /* Returns a human readable DIE offset for use in error messages. Includes DIE offset and DWARF file used. */ string dwflpp::die_location_as_string(Dwarf_Addr pc, Dwarf_Die *die) { string locstr; /* DIE offset */ locstr += _("dieoffset: "); locstr += lex_cast_hex(dwarf_dieoffset(die)); /* DWARF file */ const char *debugfile; locstr += _(" from "); if (dwfl_module_info (module, NULL, NULL, NULL, NULL, NULL, NULL, &debugfile) == NULL || debugfile == NULL) { locstr += _("unknown debug file for "); locstr += module_name; } else locstr += debugfile; return locstr; } /* Returns a human readable (inlined) function and source file/line location for a DIE and pc location. */ string dwflpp::die_location_as_function_string(Dwarf_Addr pc, Dwarf_Die *die) { string locstr; locstr = _("function: "); /* Find the first function-like DIE with a name in scope. */ Dwarf_Die funcdie_mem; Dwarf_Die *funcdie = NULL; string funcname = ""; Dwarf_Die *scopes = NULL; int nscopes = dwarf_getscopes (cu, pc, &scopes); for (int i = 0; funcname == "" && i < nscopes; i++) { Dwarf_Die *scope = &scopes[i]; int tag = dwarf_tag (scope); if (tag == DW_TAG_subprogram || tag == DW_TAG_inlined_subroutine || tag == DW_TAG_entry_point) funcname = die_name_string (scope); if (funcname != "") { funcdie_mem = *scope; funcdie = &funcdie_mem; } } free (scopes); /* source location */ if (funcname == "") locstr += _(" at ") + pc_die_line_string (pc, NULL); else { int nscopes = dwarf_getscopes_die (funcdie, &scopes); if (nscopes > 0) { /* scopes[0] == funcdie, the lowest level, for which we already have the name. This is the actual source location where it happened. */ locstr += funcname; locstr += _(" at "); locstr += pc_die_line_string (pc, NULL); /* last_scope is the source location where the next inlined frame/function call was done. */ Dwarf_Die *last_scope = &scopes[0]; for (int i = 1; i < nscopes; i++) { Dwarf_Die *scope = &scopes[i]; int tag = dwarf_tag (scope); if (tag != DW_TAG_inlined_subroutine && tag != DW_TAG_entry_point && tag != DW_TAG_subprogram) continue; locstr += _(" inlined by "); locstr += die_name_string (scope); locstr += _(" at "); locstr += pc_die_line_string (pc, last_scope); /* Found the "top-level" in which everything was inlined. */ if (tag == DW_TAG_subprogram) break; last_scope = scope; } } else { locstr += funcname; locstr += _(" at "); locstr += pc_die_line_string (pc, NULL); } free (scopes); } return locstr; } struct location * dwflpp::translate_location(struct obstack *pool, Dwarf_Attribute *attr, Dwarf_Die *die, Dwarf_Addr pc, Dwarf_Attribute *fb_attr, struct location **tail, const target_symbol *e) { /* DW_AT_data_member_location, can be either constant offsets (struct member fields), or full blown location expressions. */ /* There is no location expression, but a constant value instead. */ if (dwarf_whatattr (attr) == DW_AT_const_value) { l2c_ctx.pc = pc; l2c_ctx.die = die; *tail = c_translate_constant (pool, &loc2c_error, this, &loc2c_emit_address, 0, pc, attr); return *tail; } Dwarf_Op *expr; size_t len; /* PR9768: formerly, we added pc+module_bias here. However, that bias value is not present in the pc value by the time we get it, so adding it would result in false negatives of variable reachibility. In other instances further below, the c_translate_FOO functions, the module_bias value used to be passed in, but instead should now be zero for the same reason. */ retry: switch (dwarf_getlocation_addr (attr, pc /*+ module_bias*/, &expr, &len, 1)) { case 1: /* Should always happen. */ if (len > 0) break; /* Fall through. */ case 0: /* Shouldn't happen.... but can, e.g. due to PR15123. */ { Dwarf_Addr pc2 = pr15123_retry_addr (pc, die); if (pc2 != 0) { pc = pc2; goto retry; } } /* FALLTHROUGH */ { string msg = _F("not accessible at this address (pc: %s) [man error::dwarf]", lex_cast_hex(pc).c_str()); semantic_error err(ERR_SRC, msg, e->tok); err.details.push_back(die_location_as_string(pc, die)); err.details.push_back(die_location_as_function_string(pc, die)); err.details.push_back(suggested_locations_string(attr)); throw err; } default: /* Shouldn't happen. */ case -1: { string msg = _F("dwarf_getlocation_addr failed at this address (pc: %s) [man error::dwarf]", lex_cast_hex(pc).c_str()); semantic_error err(ERR_SRC, msg, e->tok); string dwarf_err = _F("dwarf_error: %s", dwarf_errmsg(-1)); err.details.push_back(dwarf_err); err.details.push_back(die_location_as_string(pc, die)); err.details.push_back(die_location_as_function_string(pc, die)); err.details.push_back(suggested_locations_string(attr)); throw err; } } Dwarf_Op *cfa_ops; // pc is in the dw address space of the current module, which is what // c_translate_location expects. get_cfa_ops wants the global dwfl address. // cfa_ops only make sense for locals. if (pc) { Dwarf_Addr addr = pc + module_bias; cfa_ops = get_cfa_ops (addr); } else cfa_ops = NULL; l2c_ctx.pc = pc; l2c_ctx.die = die; return c_translate_location (pool, &loc2c_error, this, &loc2c_emit_address, 1, 0 /* PR9768 */, pc, attr, expr, len, tail, fb_attr, cfa_ops); } void dwflpp::get_members(Dwarf_Die *typedie, set& members, set &dupes) { const int typetag = dwarf_tag (typedie); /* compile and partial unit included for recursion through imported_unit below. */ if (typetag != DW_TAG_structure_type && typetag != DW_TAG_class_type && typetag != DW_TAG_union_type && typetag != DW_TAG_compile_unit && typetag != DW_TAG_partial_unit) { throw SEMANTIC_ERROR(_F("Type %s isn't a struct/class/union", dwarf_type_name(typedie).c_str())); } // Try to get the first child of vardie. Dwarf_Die die_mem, import; Dwarf_Die *die = &die_mem; switch (dwarf_child (typedie, die)) { case 1: // No children. throw SEMANTIC_ERROR(_F("Type %s is empty", dwarf_type_name(typedie).c_str())); case -1: // Error. default: // Shouldn't happen. throw SEMANTIC_ERROR(_F("Type %s: %s", dwarf_type_name(typedie).c_str(), dwarf_errmsg(-1))); case 0: // Success. break; } // Add each sibling's name to members set do { int tag = dwarf_tag(die); /* The children of an imported_unit should be treated as members too. */ if (tag == DW_TAG_imported_unit && dwarf_attr_die(die, DW_AT_import, &import)) get_members(&import, members, dupes); if (tag != DW_TAG_member && tag != DW_TAG_inheritance) continue; const char *member = dwarf_diename (die) ; if ( tag == DW_TAG_member && member != NULL ) { // Only output if this is new, to avoid inheritance dupes. if (dupes.insert(member).second) members.insert(member); } else { Dwarf_Die temp_die; if (!dwarf_attr_die (die, DW_AT_type, &temp_die)) { string source = dwarf_decl_file(die) ?: ""; int line = -1; dwarf_decl_line(die, &line); throw SEMANTIC_ERROR(_F("Couldn't obtain type attribute for anonymous " "member at %s:%d", source.c_str(), line)); } get_members(&temp_die, members, dupes); } } while (dwarf_siblingof (die, die) == 0); } bool dwflpp::find_struct_member(const target_symbol::component& c, Dwarf_Die *parentdie, Dwarf_Die *memberdie, vector& dies, vector& locs) { Dwarf_Attribute attr; Dwarf_Die die; /* With inheritance, a subclass may mask member names of parent classes, so * our search among the inheritance tree must be breadth-first rather than * depth-first (recursive). The parentdie is still our starting point. */ deque inheritees(1, *parentdie); for (; !inheritees.empty(); inheritees.pop_front()) { switch (dwarf_child (&inheritees.front(), &die)) { case 0: /* First child found. */ break; case 1: /* No children. */ continue; case -1: /* Error. */ default: /* Shouldn't happen */ throw SEMANTIC_ERROR (dwarf_type_name(&inheritees.front()) + ": " + string (dwarf_errmsg (-1)), c.tok); } do { int tag = dwarf_tag(&die); /* recurse into imported units as if they are anonymoust structs */ Dwarf_Die import; if (tag == DW_TAG_imported_unit && dwarf_attr_die(&die, DW_AT_import, &import) && find_struct_member(c, &import, memberdie, dies, locs)) goto success; if (tag != DW_TAG_member && tag != DW_TAG_inheritance) continue; const char *name = dwarf_diename(&die); if (tag == DW_TAG_inheritance) { /* Remember inheritee for breadth-first search. */ Dwarf_Die inheritee; if (dwarf_attr_die (&die, DW_AT_type, &inheritee)) inheritees.push_back(inheritee); } else if (name == NULL) { /* Need to recurse for anonymous structs/unions. */ Dwarf_Die subdie; if (dwarf_attr_die (&die, DW_AT_type, &subdie) && find_struct_member(c, &subdie, memberdie, dies, locs)) goto success; } else if (name == c.member) { *memberdie = die; goto success; } } while (dwarf_siblingof (&die, &die) == 0); } return false; success: /* As we unwind the recursion, we need to build the chain of * locations that got to the final answer. */ if (dwarf_attr_integrate (&die, DW_AT_data_member_location, &attr)) { dies.insert(dies.begin(), die); locs.insert(locs.begin(), attr); } /* Union members don't usually have a location, * but just use the containing union's location. */ else if (dwarf_tag(parentdie) != DW_TAG_union_type) throw SEMANTIC_ERROR (_F("no location for field '%s':%s", c.member.c_str(), dwarf_errmsg(-1)), c.tok); return true; } static inline void dwarf_die_type (Dwarf_Die *die, Dwarf_Die *typedie_mem, const token *tok=NULL) { if (!dwarf_attr_die (die, DW_AT_type, typedie_mem)) throw SEMANTIC_ERROR (_F("cannot get type of field: %s", dwarf_errmsg(-1)), tok); } void dwflpp::translate_components(struct obstack *pool, struct location **tail, Dwarf_Addr pc, const target_symbol *e, Dwarf_Die *vardie, Dwarf_Die *typedie, unsigned first) { unsigned i = first; while (i < e->components.size()) { const target_symbol::component& c = e->components[i]; /* XXX: This would be desirable, but we don't get the target_symbol token, and printing that gives us the file:line number too early anyway. */ #if 0 // Emit a marker to note which field is being access-attempted, to give // better error messages if deref() fails. string piece = string(...target_symbol token...) + string ("#") + lex_cast(components[i].second); obstack_printf (pool, "c->last_stmt = %s;", lex_cast_qstring(piece).c_str()); #endif switch (dwarf_tag (typedie)) { case DW_TAG_typedef: case DW_TAG_const_type: case DW_TAG_volatile_type: case DW_TAG_restrict_type: /* Just iterate on the referent type. */ dwarf_die_type (typedie, typedie, c.tok); break; case DW_TAG_reference_type: case DW_TAG_rvalue_reference_type: if (pool) { l2c_ctx.die = typedie; c_translate_pointer (pool, 1, 0 /* PR9768*/, typedie, tail); } dwarf_die_type (typedie, typedie, c.tok); break; case DW_TAG_pointer_type: /* A pointer with no type is a void* -- can't dereference it. */ if (!dwarf_hasattr_integrate (typedie, DW_AT_type)) throw SEMANTIC_ERROR (_F("invalid access '%s' vs '%s'", lex_cast(c).c_str(), dwarf_type_name(typedie).c_str()), c.tok); if (pool) { l2c_ctx.die = typedie; c_translate_pointer (pool, 1, 0 /* PR9768*/, typedie, tail); } if (c.type != target_symbol::comp_literal_array_index && c.type != target_symbol::comp_expression_array_index) { dwarf_die_type (typedie, typedie, c.tok); break; } /* else fall through as an array access */ case DW_TAG_array_type: if (c.type == target_symbol::comp_literal_array_index) { if (pool) { l2c_ctx.die = typedie; c_translate_array (pool, 1, 0 /* PR9768 */, typedie, tail, NULL, c.num_index); } } else if (c.type == target_symbol::comp_expression_array_index) { string index = "STAP_ARG_index" + lex_cast(i); if (pool) { l2c_ctx.die = typedie; c_translate_array (pool, 1, 0 /* PR9768 */, typedie, tail, index.c_str(), 0); } } else throw SEMANTIC_ERROR (_F("invalid access '%s' for array type", lex_cast(c).c_str()), c.tok); dwarf_die_type (typedie, typedie, c.tok); *vardie = *typedie; ++i; break; case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_class_type: if (c.type != target_symbol::comp_struct_member) throw SEMANTIC_ERROR (_F("invalid access '%s' for %s", lex_cast(c).c_str(), dwarf_type_name(typedie).c_str())); if (dwarf_hasattr(typedie, DW_AT_declaration)) { Dwarf_Die *tmpdie = declaration_resolve(typedie); if (tmpdie == NULL) throw SEMANTIC_ERROR (_F("unresolved %s", dwarf_type_name(typedie).c_str()), c.tok); *typedie = *tmpdie; } { vector dies; vector locs; if (!find_struct_member(c, typedie, vardie, dies, locs)) { /* Add a file:line hint for anonymous types */ string source; if (!dwarf_hasattr_integrate(typedie, DW_AT_name)) { int line; const char *file = dwarf_decl_file(typedie); if (file && dwarf_decl_line(typedie, &line) == 0) source = " (" + string(file) + ":" + lex_cast(line) + ")"; } set members, member_dupes; get_members(typedie, members, member_dupes); string sugs = levenshtein_suggest(c.member, members); if (!sugs.empty()) sugs = " (alternatives: " + sugs + ")"; throw SEMANTIC_ERROR(_F("unable to find member '%s' for %s%s%s", c.member.c_str(), dwarf_type_name(typedie).c_str(), source.c_str(), sugs.c_str()), c.tok); } for (unsigned j = 0; j < locs.size(); ++j) if (pool) translate_location (pool, &locs[j], &dies[j], pc, NULL, tail, e); } dwarf_die_type (vardie, typedie, c.tok); ++i; break; case DW_TAG_enumeration_type: case DW_TAG_base_type: throw SEMANTIC_ERROR (_F("invalid access '%s' vs. %s", lex_cast(c).c_str(), dwarf_type_name(typedie).c_str()), c.tok); break; case -1: throw SEMANTIC_ERROR (_F("cannot find type: %s", dwarf_errmsg(-1)), c.tok); break; default: throw SEMANTIC_ERROR (_F("%s: unexpected type tag %s", dwarf_type_name(typedie).c_str(), lex_cast(dwarf_tag(typedie)).c_str()), c.tok); break; } } } void dwflpp::resolve_unqualified_inner_typedie (Dwarf_Die *typedie, Dwarf_Die *innerdie, const target_symbol *e) { int typetag = dwarf_tag (typedie); *innerdie = *typedie; while (typetag == DW_TAG_typedef || typetag == DW_TAG_const_type || typetag == DW_TAG_volatile_type || typetag == DW_TAG_restrict_type) { if (!dwarf_attr_die (innerdie, DW_AT_type, innerdie)) throw SEMANTIC_ERROR (_F("cannot get type of pointee: %s", dwarf_errmsg(-1)), e->tok); typetag = dwarf_tag (innerdie); } } void dwflpp::translate_final_fetch_or_store (struct obstack *pool, struct location **tail, Dwarf_Addr /*module_bias*/, Dwarf_Die *vardie, Dwarf_Die *start_typedie, bool lvalue, const target_symbol *e, string &, string & postlude, Dwarf_Die *typedie) { /* First boil away any qualifiers associated with the type DIE of the final location to be accessed. */ resolve_unqualified_inner_typedie (start_typedie, typedie, e); /* If we're looking for an address, then we can just provide what we computed to this point, without using a fetch/store. */ if (e->addressof) { if (lvalue) throw SEMANTIC_ERROR (_("cannot write to member address"), e->tok); if (dwarf_hasattr_integrate (vardie, DW_AT_bit_offset)) throw SEMANTIC_ERROR (_("cannot take address of bit-field"), e->tok); l2c_ctx.die = vardie; c_translate_addressof (pool, 1, 0, vardie, typedie, tail, "STAP_RETVALUE"); return; } /* Then switch behavior depending on the type of fetch/store we want, and the type and pointer-ness of the final location. */ int typetag = dwarf_tag (typedie); switch (typetag) { default: throw SEMANTIC_ERROR (_F("unsupported type tag %s for %s", lex_cast(typetag).c_str(), dwarf_type_name(typedie).c_str()), e->tok); break; case DW_TAG_structure_type: case DW_TAG_class_type: case DW_TAG_union_type: throw SEMANTIC_ERROR (_F("'%s' is being accessed instead of a member", dwarf_type_name(typedie).c_str()), e->tok); break; case DW_TAG_base_type: // Reject types we can't handle in systemtap { Dwarf_Attribute encoding_attr; Dwarf_Word encoding = (Dwarf_Word) -1; dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, &encoding_attr), & encoding); if (encoding == (Dwarf_Word) -1) { // clog << "bad type1 " << encoding << " diestr" << endl; throw SEMANTIC_ERROR (_F("unsupported type (mystery encoding %s for %s", lex_cast(encoding).c_str(), dwarf_type_name(typedie).c_str()), e->tok); } if (encoding == DW_ATE_float || encoding == DW_ATE_complex_float /* XXX || many others? */) { // clog << "bad type " << encoding << " diestr" << endl; throw SEMANTIC_ERROR (_F("unsupported type (encoding %s) for %s", lex_cast(encoding).c_str(), dwarf_type_name(typedie).c_str()), e->tok); } } // Fallthrough. enumeration_types are always scalar. case DW_TAG_enumeration_type: l2c_ctx.die = vardie; if (lvalue) c_translate_store (pool, 1, 0 /* PR9768 */, vardie, typedie, tail, "STAP_ARG_value"); else c_translate_fetch (pool, 1, 0 /* PR9768 */, vardie, typedie, tail, "STAP_RETVALUE"); break; case DW_TAG_array_type: case DW_TAG_pointer_type: case DW_TAG_reference_type: case DW_TAG_rvalue_reference_type: if (lvalue) { if (typetag == DW_TAG_array_type) throw SEMANTIC_ERROR (_("cannot write to array address"), e->tok); if (typetag == DW_TAG_reference_type || typetag == DW_TAG_rvalue_reference_type) throw SEMANTIC_ERROR (_("cannot write to reference"), e->tok); assert (typetag == DW_TAG_pointer_type); l2c_ctx.die = typedie; c_translate_pointer_store (pool, 1, 0 /* PR9768 */, typedie, tail, "STAP_ARG_value"); } else { // We have the pointer: cast it to an integral type via &(*(...)) // NB: per bug #1187, at one point char*-like types were // automagically converted here to systemtap string values. // For several reasons, this was taken back out, leaving // pointer-to-string "conversion" (copying) to tapset functions. l2c_ctx.die = typedie; if (typetag == DW_TAG_array_type) c_translate_array (pool, 1, 0 /* PR9768 */, typedie, tail, NULL, 0); else c_translate_pointer (pool, 1, 0 /* PR9768 */, typedie, tail); c_translate_addressof (pool, 1, 0 /* PR9768 */, NULL, NULL, tail, "STAP_RETVALUE"); } break; } if (lvalue) postlude += " STAP_RETVALUE = STAP_ARG_value;\n"; } string dwflpp::express_as_string (string prelude, string postlude, struct location *head) { size_t bufsz = 0; char *buf = 0; // NB: it would leak to pre-allocate a buffer here FILE *memstream = open_memstream (&buf, &bufsz); assert(memstream); fprintf(memstream, "{\n"); fprintf(memstream, "%s", prelude.c_str()); unsigned int stack_depth; bool deref = c_emit_location (memstream, head, 1, &stack_depth); // Ensure that DWARF keeps loc2c to a "reasonable" stack size // 32 intptr_t leads to max 256 bytes on the stack if (stack_depth > 32) throw SEMANTIC_ERROR("oversized DWARF stack"); fprintf(memstream, "%s", postlude.c_str()); fprintf(memstream, " goto out;\n"); // dummy use of deref_fault label, to disable warning if deref() not used fprintf(memstream, "if (0) goto deref_fault;\n"); // XXX: deref flag not reliable; emit fault label unconditionally (void) deref; fprintf(memstream, "deref_fault:\n" " goto out;\n"); fprintf(memstream, "}\n"); fclose (memstream); string result(buf); free (buf); return result; } Dwarf_Addr dwflpp::vardie_from_symtable (Dwarf_Die *vardie, Dwarf_Addr *addr) { const char *name = dwarf_linkage_name (vardie) ?: dwarf_diename (vardie); if (sess.verbose > 2) clog << _F("finding symtable address for %s\n", name); *addr = 0; int syms = dwfl_module_getsymtab (module); DWFL_ASSERT (_("Getting symbols"), syms >= 0); for (int i = 0; *addr == 0 && i < syms; i++) { GElf_Sym sym; GElf_Word shndxp; const char *symname = dwfl_module_getsym(module, i, &sym, &shndxp); if (symname && ! strcmp (name, symname) && sym.st_shndx != SHN_UNDEF && (GELF_ST_TYPE (sym.st_info) == STT_NOTYPE // PR13284 || GELF_ST_TYPE (sym.st_info) == STT_OBJECT)) *addr = sym.st_value; } // Don't relocate for the kernel, or kernel modules we handle those // specially in emit_address. if (dwfl_module_relocations (module) == 1 && module_name != TOK_KERNEL) dwfl_module_relocate_address (module, addr); if (sess.verbose > 2) clog << _F("found %s @%#" PRIx64 "\n", name, *addr); return *addr; } string dwflpp::literal_stmt_for_local (vector& scopes, Dwarf_Addr pc, string const & local, const target_symbol *e, bool lvalue, Dwarf_Die *die_mem) { Dwarf_Die vardie; Dwarf_Attribute fb_attr_mem, *fb_attr = NULL; // NB: when addr_loc is used for a synthesized DW_OP_addr below, then it // needs to remain valid until express_as_string() has finished with it. Dwarf_Op addr_loc; fb_attr = find_variable_and_frame_base (scopes, pc, local, e, &vardie, &fb_attr_mem); if (sess.verbose>2) { if (pc) clog << _F("finding location for local '%s' near address %#" PRIx64 ", module bias %#" PRIx64 "\n", local.c_str(), pc, module_bias); else clog << _F("finding location for global '%s' in CU '%s'\n", local.c_str(), cu_name().c_str()); } struct obstack pool; obstack_tracker p (&pool); struct location *tail = NULL; /* Given $foo->bar->baz[NN], translate the location of foo. */ struct location *head; Dwarf_Attribute attr_mem; if (dwarf_attr_integrate (&vardie, DW_AT_const_value, &attr_mem) == NULL && dwarf_attr_integrate (&vardie, DW_AT_location, &attr_mem) == NULL) { memset(&addr_loc, 0, sizeof(Dwarf_Op)); addr_loc.atom = DW_OP_addr; // If it is an external variable try the symbol table. PR10622. if (dwarf_attr_integrate (&vardie, DW_AT_external, &attr_mem) != NULL && vardie_from_symtable (&vardie, &addr_loc.number) != 0) { l2c_ctx.pc = pc; l2c_ctx.die = &vardie; head = c_translate_location (&pool, &loc2c_error, this, &loc2c_emit_address, 1, 0, pc, NULL, &addr_loc, 1, &tail, NULL, NULL); } else { string msg = _F("failed to retrieve location attribute for '%s' [man error::dwarf]", local.c_str()); semantic_error err(ERR_SRC, msg, e->tok); err.details.push_back(die_location_as_string(pc, &vardie)); err.details.push_back(die_location_as_function_string(pc, &vardie)); throw err; } } else head = translate_location (&pool, &attr_mem, &vardie, pc, fb_attr, &tail, e); /* Translate the ->bar->baz[NN] parts. */ Dwarf_Die typedie; if (dwarf_attr_die (&vardie, DW_AT_type, &typedie) == NULL) { string msg = _F("failed to retrieve type attribute for '%s' [man error::dwarf]", local.c_str()); semantic_error err(ERR_SRC, msg, e->tok); err.details.push_back(die_location_as_string(pc, &vardie)); err.details.push_back(die_location_as_function_string(pc, &vardie)); throw err; } translate_components (&pool, &tail, pc, e, &vardie, &typedie); /* Translate the assignment part, either x = $foo->bar->baz[NN] or $foo->bar->baz[NN] = x */ string prelude, postlude; translate_final_fetch_or_store (&pool, &tail, module_bias, &vardie, &typedie, lvalue, e, prelude, postlude, die_mem); /* Write the translation to a string. */ string result = express_as_string(prelude, postlude, head); return result; } Dwarf_Die* dwflpp::type_die_for_local (vector& scopes, Dwarf_Addr pc, string const & local, const target_symbol *e, Dwarf_Die *typedie) { Dwarf_Die vardie; Dwarf_Attribute attr_mem; find_variable_and_frame_base (scopes, pc, local, e, &vardie, &attr_mem); if (dwarf_attr_die (&vardie, DW_AT_type, typedie) == NULL) throw SEMANTIC_ERROR(_F("failed to retrieve type attribute for '%s' [man error::dwarf]", local.c_str()), e->tok); translate_components (NULL, NULL, pc, e, &vardie, typedie); return typedie; } string dwflpp::literal_stmt_for_return (Dwarf_Die *scope_die, Dwarf_Addr pc, const target_symbol *e, bool lvalue, Dwarf_Die *die_mem) { if (sess.verbose>2) clog << _F("literal_stmt_for_return: finding return value for %s (%s)\n", (dwarf_diename(scope_die) ?: ""), (dwarf_diename(cu) ?: "")); struct obstack pool; obstack_tracker p (&pool); struct location *tail = NULL; /* Given $return->bar->baz[NN], translate the location of return. */ const Dwarf_Op *locops; int nlocops = dwfl_module_return_value_location (module, scope_die, &locops); if (nlocops < 0) throw SEMANTIC_ERROR(_F("failed to retrieve return value location for %s [man error::dwarf] (%s)", (dwarf_diename(scope_die) ?: ""), (dwarf_diename(cu) ?: "")), e->tok); // the function has no return value (e.g. "void" in C) else if (nlocops == 0) throw SEMANTIC_ERROR(_F("function %s (%s) has no return value", (dwarf_diename(scope_die) ?: ""), (dwarf_diename(cu) ?: "")), e->tok); l2c_ctx.pc = pc; l2c_ctx.die = scope_die; struct location *head = c_translate_location (&pool, &loc2c_error, this, &loc2c_emit_address, 1, 0 /* PR9768 */, pc, NULL, locops, nlocops, &tail, NULL, NULL); /* Translate the ->bar->baz[NN] parts. */ Dwarf_Die vardie = *scope_die, typedie; if (dwarf_attr_die (&vardie, DW_AT_type, &typedie) == NULL) throw SEMANTIC_ERROR(_F("failed to retrieve return value type attribute for %s [man error::dwarf] (%s)", (dwarf_diename(&vardie) ?: ""), (dwarf_diename(cu) ?: "")), e->tok); translate_components (&pool, &tail, pc, e, &vardie, &typedie); /* Translate the assignment part, either x = $return->bar->baz[NN] or $return->bar->baz[NN] = x */ string prelude, postlude; translate_final_fetch_or_store (&pool, &tail, module_bias, &vardie, &typedie, lvalue, e, prelude, postlude, die_mem); /* Write the translation to a string. */ string result = express_as_string(prelude, postlude, head); return result; } Dwarf_Die* dwflpp::type_die_for_return (Dwarf_Die *scope_die, Dwarf_Addr pc, const target_symbol *e, Dwarf_Die *typedie) { Dwarf_Die vardie = *scope_die; if (dwarf_attr_die (&vardie, DW_AT_type, typedie) == NULL) throw SEMANTIC_ERROR(_F("failed to retrieve return value type attribute for %s [man error::dwarf] (%s)", (dwarf_diename(&vardie) ?: ""), (dwarf_diename(cu) ?: "")), e->tok); translate_components (NULL, NULL, pc, e, &vardie, typedie); return typedie; } string dwflpp::literal_stmt_for_pointer (Dwarf_Die *start_typedie, const target_symbol *e, bool lvalue, Dwarf_Die *die_mem) { if (sess.verbose>2) clog << _F("literal_stmt_for_pointer: finding value for %s (%s)\n", dwarf_type_name(start_typedie).c_str(), (dwarf_diename(cu) ?: "")); struct obstack pool; obstack_tracker p (&pool); l2c_ctx.pc = 1; l2c_ctx.die = start_typedie; struct location *head = c_translate_argument (&pool, &loc2c_error, this, &loc2c_emit_address, 1, "STAP_ARG_pointer"); struct location *tail = head; /* Translate the ->bar->baz[NN] parts. */ unsigned first = 0; Dwarf_Die typedie = *start_typedie, vardie = typedie; /* As a special case when typedie is not an array or pointer, we can * allow array indexing on STAP_ARG_pointer instead (since we do * know the pointee type and can determine its size). PR11556. */ const target_symbol::component* c = e->components.empty() ? NULL : &e->components[0]; if (c && (c->type == target_symbol::comp_literal_array_index || c->type == target_symbol::comp_expression_array_index)) { resolve_unqualified_inner_typedie (&typedie, &typedie, e); int typetag = dwarf_tag (&typedie); if (typetag != DW_TAG_pointer_type && typetag != DW_TAG_array_type) { l2c_ctx.die = &typedie; if (c->type == target_symbol::comp_literal_array_index) c_translate_array_pointer (&pool, 1, &typedie, &tail, NULL, c->num_index); else c_translate_array_pointer (&pool, 1, &typedie, &tail, "STAP_ARG_index0", 0); ++first; } } /* Now translate the rest normally. */ translate_components (&pool, &tail, 0, e, &vardie, &typedie, first); /* Translate the assignment part, either x = (STAP_ARG_pointer)->bar->baz[NN] or (STAP_ARG_pointer)->bar->baz[NN] = x */ string prelude, postlude; translate_final_fetch_or_store (&pool, &tail, module_bias, &vardie, &typedie, lvalue, e, prelude, postlude, die_mem); /* Write the translation to a string. */ string result = express_as_string(prelude, postlude, head); return result; } Dwarf_Die* dwflpp::type_die_for_pointer (Dwarf_Die *start_typedie, const target_symbol *e, Dwarf_Die *typedie) { unsigned first = 0; *typedie = *start_typedie; Dwarf_Die vardie = *typedie; /* Handle the same PR11556 case as above. */ const target_symbol::component* c = e->components.empty() ? NULL : &e->components[0]; if (c && (c->type == target_symbol::comp_literal_array_index || c->type == target_symbol::comp_expression_array_index)) { resolve_unqualified_inner_typedie (typedie, typedie, e); int typetag = dwarf_tag (typedie); if (typetag != DW_TAG_pointer_type && typetag != DW_TAG_array_type) ++first; } translate_components (NULL, NULL, 0, e, &vardie, typedie, first); return typedie; } static bool in_kprobes_function(systemtap_session& sess, Dwarf_Addr addr) { if (sess.sym_kprobes_text_start != 0 && sess.sym_kprobes_text_end != 0) { // If the probe point address is anywhere in the __kprobes // address range, we can't use this probe point. if (addr >= sess.sym_kprobes_text_start && addr < sess.sym_kprobes_text_end) return true; } return false; } enum dwflpp::blacklisted_type dwflpp::blacklisted_p(interned_string funcname, interned_string filename, int, interned_string module, Dwarf_Addr addr, bool has_return) { if (!blacklist_enabled) return dwflpp::blacklisted_none; enum dwflpp::blacklisted_type blacklisted = dwflpp::blacklisted_none; // check against section blacklist string section = get_blacklist_section(addr); // PR6503: modules don't need special init/exit treatment if (module == TOK_KERNEL && !regexec (&blacklist_section, section.c_str(), 0, NULL, 0)) blacklisted = dwflpp::blacklisted_section; // Check for function marked '__kprobes'. else if (module == TOK_KERNEL && in_kprobes_function(sess, addr)) blacklisted = dwflpp::blacklisted_kprobes; // Check probe point against function blacklist else if (!regexec(&blacklist_func, funcname.c_str(), 0, NULL, 0)) blacklisted = dwflpp::blacklisted_function; // Check probe point against function return blacklist else if (has_return && !regexec(&blacklist_func_ret, funcname.c_str(), 0, NULL, 0)) blacklisted = dwflpp::blacklisted_function_return; // Check probe point against file blacklist else if (!regexec(&blacklist_file, filename.c_str(), 0, NULL, 0)) blacklisted = dwflpp::blacklisted_file; if (blacklisted) { if (sess.verbose>1) clog << _(" - blacklisted"); if (sess.guru_mode) { blacklisted = dwflpp::blacklisted_none; if (sess.verbose>1) clog << _(" but not skipped (guru mode enabled)"); } } // This probe point is not blacklisted. return blacklisted; } void dwflpp::build_kernel_blacklist() { // We build up the regexps in these strings // Add ^ anchors at the front; $ will be added just before regcomp. string blfn = "^("; string blfn_ret = "^("; string blfile = "^("; string blsection = "^("; blsection += "\\.init\\."; // first alternative, no "|" blsection += "|\\.exit\\."; blsection += "|\\.devinit\\."; blsection += "|\\.devexit\\."; blsection += "|\\.cpuinit\\."; blsection += "|\\.cpuexit\\."; blsection += "|\\.meminit\\."; blsection += "|\\.memexit\\."; /* NOTE all include/asm .h blfile patterns might need "full path" so prefix those with '.*' - see PR13108 and PR13112. */ blfile += "kernel/kprobes\\.c"; // first alternative, no "|" blfile += "|arch/.*/kernel/kprobes\\.c"; blfile += "|.*/include/asm/io\\.h"; blfile += "|.*/include/asm/io_64\\.h"; blfile += "|.*/include/asm/bitops\\.h"; blfile += "|drivers/ide/ide-iops\\.c"; // paravirt ops blfile += "|arch/.*/kernel/paravirt\\.c"; blfile += "|.*/include/asm/paravirt\\.h"; // XXX: it would be nice if these blacklisted functions were pulled // in dynamically, instead of being statically defined here. // Perhaps it could be populated from script files. A "noprobe // kernel.function("...")" construct might do the trick. // Most of these are marked __kprobes in newer kernels. We list // them here (anyway) so the translator can block them on older // kernels that don't have the __kprobes function decorator. This // also allows detection of problems at translate- rather than // run-time. blfn += "atomic_notifier_call_chain"; // first blfn; no "|" blfn += "|default_do_nmi"; blfn += "|__die"; blfn += "|die_nmi"; blfn += "|do_debug"; blfn += "|do_general_protection"; blfn += "|do_int3"; blfn += "|do_IRQ"; blfn += "|do_page_fault"; blfn += "|do_sparc64_fault"; blfn += "|do_trap"; blfn += "|dummy_nmi_callback"; blfn += "|flush_icache_range"; blfn += "|ia64_bad_break"; blfn += "|ia64_do_page_fault"; blfn += "|ia64_fault"; blfn += "|io_check_error"; blfn += "|mem_parity_error"; blfn += "|nmi_watchdog_tick"; blfn += "|notifier_call_chain"; blfn += "|oops_begin"; blfn += "|oops_end"; blfn += "|program_check_exception"; blfn += "|single_step_exception"; blfn += "|sync_regs"; blfn += "|unhandled_fault"; blfn += "|unknown_nmi_error"; blfn += "|xen_[gs]et_debugreg"; blfn += "|xen_irq_.*"; blfn += "|xen_.*_fl_direct.*"; blfn += "|check_events"; blfn += "|xen_adjust_exception_frame"; blfn += "|xen_iret.*"; blfn += "|xen_sysret64.*"; blfn += "|test_ti_thread_flag.*"; blfn += "|inat_get_opcode_attribute"; blfn += "|system_call_after_swapgs"; blfn += "|HYPERVISOR_[gs]et_debugreg"; blfn += "|HYPERVISOR_event_channel_op"; blfn += "|hash_64"; blfn += "|hash_ptr"; blfn += "|native_set_pte"; // Lots of locks blfn += "|.*raw_.*_lock.*"; blfn += "|.*raw_.*_unlock.*"; blfn += "|.*raw_.*_trylock.*"; blfn += "|.*read_lock.*"; blfn += "|.*read_unlock.*"; blfn += "|.*read_trylock.*"; blfn += "|.*write_lock.*"; blfn += "|.*write_unlock.*"; blfn += "|.*write_trylock.*"; blfn += "|.*write_seqlock.*"; blfn += "|.*write_sequnlock.*"; blfn += "|.*spin_lock.*"; blfn += "|.*spin_unlock.*"; blfn += "|.*spin_trylock.*"; blfn += "|.*spin_is_locked.*"; blfn += "|rwsem_.*lock.*"; blfn += "|.*mutex_.*lock.*"; blfn += "|raw_.*"; // atomic functions blfn += "|atomic_.*"; blfn += "|atomic64_.*"; // few other problematic cases blfn += "|get_bh"; blfn += "|put_bh"; // Experimental blfn += "|.*apic.*|.*APIC.*"; blfn += "|.*softirq.*"; blfn += "|.*IRQ.*"; blfn += "|.*_intr.*"; blfn += "|__delay"; blfn += "|.*kernel_text.*"; blfn += "|get_current"; blfn += "|current_.*"; blfn += "|.*exception_tables.*"; blfn += "|.*setup_rt_frame.*"; // PR 5759, CONFIG_PREEMPT kernels blfn += "|.*preempt_count.*"; blfn += "|preempt_schedule"; // These functions don't return, so return probes would never be recovered blfn_ret += "do_exit"; // no "|" blfn_ret += "|sys_exit"; blfn_ret += "|sys_exit_group"; // __switch_to changes "current" on x86_64 and i686, so return probes // would cause kernel panic, and it is marked as "__kprobes" on x86_64 if (sess.architecture == "x86_64") blfn += "|__switch_to"; if (sess.architecture == "i686") blfn_ret += "|__switch_to"; // RHEL6 pre-beta 2.6.32-19.el6 blfn += "|special_mapping_.*"; blfn += "|.*_pte_.*"; // or "|smaps_pte_range"; blfile += "|fs/seq_file\\.c"; blfn += ")$"; blfn_ret += ")$"; blfile += ")$"; blsection += ")"; // NB: no $, sections match just the beginning if (sess.verbose > 2) { clog << _("blacklist regexps:") << endl; clog << "blfn: " << blfn << endl; clog << "blfn_ret: " << blfn_ret << endl; clog << "blfile: " << blfile << endl; clog << "blsection: " << blsection << endl; } int rc = regcomp (& blacklist_func, blfn.c_str(), REG_NOSUB|REG_EXTENDED); if (rc) throw SEMANTIC_ERROR (_("blacklist_func regcomp failed")); rc = regcomp (& blacklist_func_ret, blfn_ret.c_str(), REG_NOSUB|REG_EXTENDED); if (rc) throw SEMANTIC_ERROR (_("blacklist_func_ret regcomp failed")); rc = regcomp (& blacklist_file, blfile.c_str(), REG_NOSUB|REG_EXTENDED); if (rc) throw SEMANTIC_ERROR (_("blacklist_file regcomp failed")); rc = regcomp (& blacklist_section, blsection.c_str(), REG_NOSUB|REG_EXTENDED); if (rc) throw SEMANTIC_ERROR (_("blacklist_section regcomp failed")); blacklist_enabled = true; } void dwflpp::build_user_blacklist() { // We build up the regexps in these strings // Add ^ anchors at the front; $ will be added just before regcomp. string blfn = "^("; string blfn_ret = "^("; string blfile = "^("; string blsection = "^("; // Non-matching placeholders until we have real things to match blfn += ".^"; blfile += ".^"; blsection += ".^"; // These functions don't use the normal function-entry ABI, so can't be .return probed safely blfn_ret += "_start"; blfn += ")$"; blfn_ret += ")$"; blfile += ")$"; blsection += ")"; // NB: no $, sections match just the beginning if (sess.verbose > 2) { clog << _("blacklist regexps:") << endl; clog << "blfn: " << blfn << endl; clog << "blfn_ret: " << blfn_ret << endl; clog << "blfile: " << blfile << endl; clog << "blsection: " << blsection << endl; } int rc = regcomp (& blacklist_func, blfn.c_str(), REG_NOSUB|REG_EXTENDED); if (rc) throw SEMANTIC_ERROR (_("blacklist_func regcomp failed")); rc = regcomp (& blacklist_func_ret, blfn_ret.c_str(), REG_NOSUB|REG_EXTENDED); if (rc) throw SEMANTIC_ERROR (_("blacklist_func_ret regcomp failed")); rc = regcomp (& blacklist_file, blfile.c_str(), REG_NOSUB|REG_EXTENDED); if (rc) throw SEMANTIC_ERROR (_("blacklist_file regcomp failed")); rc = regcomp (& blacklist_section, blsection.c_str(), REG_NOSUB|REG_EXTENDED); if (rc) throw SEMANTIC_ERROR (_("blacklist_section regcomp failed")); blacklist_enabled = true; } string dwflpp::get_blacklist_section(Dwarf_Addr addr) { string blacklist_section; Dwarf_Addr bias; // We prefer dwfl_module_getdwarf to dwfl_module_getelf here, // because dwfl_module_getelf can force costly section relocations // we don't really need, while either will do for this purpose. Elf* elf = (dwarf_getelf (dwfl_module_getdwarf (module, &bias)) ?: dwfl_module_getelf (module, &bias)); Dwarf_Addr offset = addr - bias; if (elf) { Elf_Scn* scn = 0; size_t shstrndx; DWFL_ASSERT ("getshdrstrndx", elf_getshdrstrndx (elf, &shstrndx)); while ((scn = elf_nextscn (elf, scn)) != NULL) { GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); if (! shdr) continue; // XXX error? if (!(shdr->sh_flags & SHF_ALLOC)) continue; GElf_Addr start = shdr->sh_addr; GElf_Addr end = start + shdr->sh_size; if (! (offset >= start && offset < end)) continue; blacklist_section = elf_strptr (elf, shstrndx, shdr->sh_name); break; } } return blacklist_section; } /* Find the section named 'section_name' in the current module * returning the section header using 'shdr_mem' */ GElf_Shdr * dwflpp::get_section(string section_name, GElf_Shdr *shdr_mem, Elf **elf_ret) { GElf_Shdr *shdr = NULL; Elf* elf; Dwarf_Addr bias; size_t shstrndx; // Explicitly look in the main elf file first. elf = dwfl_module_getelf (module, &bias); Elf_Scn *probe_scn = NULL; DWFL_ASSERT ("getshdrstrndx", elf_getshdrstrndx (elf, &shstrndx)); bool have_section = false; while ((probe_scn = elf_nextscn (elf, probe_scn))) { shdr = gelf_getshdr (probe_scn, shdr_mem); assert (shdr != NULL); if (elf_strptr (elf, shstrndx, shdr->sh_name) == section_name) { have_section = true; break; } } // Older versions may put the section in the debuginfo dwarf file, // so check if it actually exists, if not take a look in the debuginfo file if (! have_section || (have_section && shdr->sh_type == SHT_NOBITS)) { elf = dwarf_getelf (dwfl_module_getdwarf (module, &bias)); if (! elf) return NULL; DWFL_ASSERT ("getshdrstrndx", elf_getshdrstrndx (elf, &shstrndx)); probe_scn = NULL; while ((probe_scn = elf_nextscn (elf, probe_scn))) { shdr = gelf_getshdr (probe_scn, shdr_mem); if (elf_strptr (elf, shstrndx, shdr->sh_name) == section_name) { have_section = true; break; } } } if (!have_section) return NULL; if (elf_ret) *elf_ret = elf; return shdr; } Dwarf_Addr dwflpp::relocate_address(Dwarf_Addr dw_addr, interned_string& reloc_section) { // PR10273 // libdw address, so adjust for bias gotten from dwfl_module_getdwarf Dwarf_Addr reloc_addr = dw_addr + module_bias; if (!module) { assert(module_name == TOK_KERNEL); reloc_section = ""; } else if (dwfl_module_relocations (module) > 0) { // This is a relocatable module; libdwfl already knows its // sections, so we can relativize addr. int idx = dwfl_module_relocate_address (module, &reloc_addr); const char* r_s = dwfl_module_relocation_info (module, idx, NULL); if (r_s) reloc_section = r_s; if (reloc_section == "" && dwfl_module_relocations (module) == 1) reloc_section = ".dynamic"; } else reloc_section = ".absolute"; return reloc_addr; } /* Returns the call frame address operations for the given program counter * in the libdw address space. */ Dwarf_Op * dwflpp::get_cfa_ops (Dwarf_Addr pc) { Dwarf_Op *cfa_ops = NULL; if (sess.verbose > 2) clog << "get_cfa_ops @0x" << hex << pc << dec << ", module_start @0x" << hex << module_start << dec << endl; // Try debug_frame first, then fall back on eh_frame. size_t cfa_nops = 0; Dwarf_Addr bias = 0; Dwarf_Frame *frame = NULL; Dwarf_CFI *cfi = dwfl_module_dwarf_cfi (module, &bias); if (cfi != NULL) { if (sess.verbose > 3) clog << "got dwarf cfi bias: 0x" << hex << bias << dec << endl; if (dwarf_cfi_addrframe (cfi, pc - bias, &frame) == 0) dwarf_frame_cfa (frame, &cfa_ops, &cfa_nops); else if (sess.verbose > 3) clog << "dwarf_cfi_addrframe failed: " << dwarf_errmsg(-1) << endl; } else if (sess.verbose > 3) clog << "dwfl_module_dwarf_cfi failed: " << dwfl_errmsg(-1) << endl; if (cfa_ops == NULL) { cfi = dwfl_module_eh_cfi (module, &bias); if (cfi != NULL) { if (sess.verbose > 3) clog << "got eh cfi bias: 0x" << hex << bias << dec << endl; Dwarf_Frame *frame = NULL; if (dwarf_cfi_addrframe (cfi, pc - bias, &frame) == 0) dwarf_frame_cfa (frame, &cfa_ops, &cfa_nops); else if (sess.verbose > 3) clog << "dwarf_cfi_addrframe failed: " << dwarf_errmsg(-1) << endl; } else if (sess.verbose > 3) clog << "dwfl_module_eh_cfi failed: " << dwfl_errmsg(-1) << endl; } if (sess.verbose > 2) { if (cfa_ops == NULL) clog << _("not found cfa") << endl; else { Dwarf_Addr frame_start, frame_end; bool frame_signalp; int info = dwarf_frame_info (frame, &frame_start, &frame_end, &frame_signalp); clog << _F("found cfa, info: %d [start: %#" PRIx64 ", end: %#" PRIx64 ", nops: %zu", info, frame_start, frame_end, cfa_nops) << endl; } } return cfa_ops; } int dwflpp::add_module_build_id_to_hash (Dwfl_Module *m, void **userdata __attribute__ ((unused)), const char *name, Dwarf_Addr base, void *arg) { string modname = name; systemtap_session * s = (systemtap_session *)arg; if (pending_interrupts) return DWARF_CB_ABORT; // Extract the build ID const unsigned char *bits; GElf_Addr vaddr; int bits_length = dwfl_module_build_id(m, &bits, &vaddr); if(bits_length > 0) { // Convert the binary bits to a hex string string hex = hex_dump(bits, bits_length); // Store the build ID in the session s->build_ids.push_back(hex); } return DWARF_CB_OK; } // Perform PR15123 heuristic for given variable at given address. // Return alternate pc address to do location-list lookup at, or 0 if // inapplicable. // Dwarf_Addr dwflpp::pr15123_retry_addr (Dwarf_Addr pc, Dwarf_Die* die) { // For PR15123, we'd like to detect the situation where the // incoming PC may point to a couple-of-byte instruction // sequence that gcc emits for CFLAGS=-mfentry, and where // context variables are in fact available throughout, *but* due // to the bug, the dwarf debuginfo location-list only starts a // few instructions later. Prologue searching does not resolve // this as a line-record is in place at the -mfentry prologue. // // Detecting this is complicated because ... // - we only want to do this if -mfentry was actually used // - if points to the a function entry point // - if the architecture is familiar enough that we can have a // hard-coded constant to skip over the prologue. // // Otherwise, we could give a false-positive - return corrupted // data. // // Use of -mfentry is detectable only if CFLAGS=-grecord-gcc-switches // was used. Without it, set the PR15123_ASSUME_MFENTRY environment // variable to override the -mfentry test. if (getenv ("PR15123_DISABLE")) return 0; if (!getenv ("PR15123_ASSUME_MFENTRY")) { Dwarf_Die cudie; string producer, version; dwarf_diecu (die, &cudie, NULL, NULL); if (!is_gcc_producer(&cudie, producer, version)) return 0; if (producer.find("-mfentry") == string::npos) return 0; } // Determine if this pc maps to the beginning of a // real function (not some inlined doppelganger. This // is made tricker by this->function may not be // pointing at the right DIE (say e.g. stap encountered // the inlined copy first, so was focus_on_function'd). vector scopes = getscopes(pc); if (scopes.size() == 0) return 0; Dwarf_Die outer_function_die = scopes[0]; Dwarf_Addr entrypc; if (!die_entrypc(& outer_function_die, &entrypc) || entrypc != pc) return 0; // (will fail on retry, so we won't loop more than once) if (sess.architecture == "i386" || sess.architecture == "x86_64") { /* pull the trigger */ if (sess.verbose > 2) clog << _("retrying variable location-list lookup at address pc+5\n"); return pc + 5; } return 0; } bool dwflpp::has_gnu_debugdata () { Dwarf_Addr load_addr; // Note we really want the actual elf file, not the dwarf .debug file. Elf* elf = dwfl_module_getelf (module, &load_addr); size_t shstrndx; assert (elf_getshdrstrndx (elf, &shstrndx) >= 0); // Get the gnu_debugdata section header Elf_Scn *scn = NULL; GElf_Shdr *gnu_debugdata_shdr = NULL; GElf_Shdr gnu_debugdata_shdr_mem; while ((scn = elf_nextscn (elf, scn))) { gnu_debugdata_shdr = gelf_getshdr (scn, &gnu_debugdata_shdr_mem); assert (gnu_debugdata_shdr != NULL); if (strcmp (elf_strptr (elf, shstrndx, gnu_debugdata_shdr->sh_name), ".gnu_debugdata") == 0) return true; } return false; } // If not GCC, return false. Otherwise, return true and set vers. bool dwflpp::is_gcc_producer(Dwarf_Die *cudie, string& producer, string& version) { Dwarf_Attribute producer_attr; if (!dwarf_attr_integrate(cudie, DW_AT_producer, &producer_attr)) return false; // GNU {C|C++|...} x.x.x YYYYMMDD ... const char *cproducer = dwarf_formstring(&producer_attr); if (!cproducer) return false; producer = cproducer; vector tokens; tokenize(producer, tokens); if (tokens.size() < 3 || tokens[0] != "GNU" || tokens[2].find_first_not_of(".0123456789") != string::npos) return false; version = tokens[2]; return true; } static bool die_has_loclist(Dwarf_Die *begin_die) { Dwarf_Die die; Dwarf_Attribute loc; if (dwarf_child(begin_die, &die) != 0) return false; do { switch (dwarf_tag(&die)) { case DW_TAG_formal_parameter: case DW_TAG_variable: if (dwarf_attr_integrate(&die, DW_AT_location, &loc) && dwarf_whatform(&loc) == DW_FORM_sec_offset) return true; break; default: if (dwarf_haschildren (&die)) if (die_has_loclist(&die)) return true; break; } } while (dwarf_siblingof (&die, &die) == 0); return false; } bool dwflpp::has_valid_locs () { assert(cu); // The current CU has valid location info (implying we do not need to skip the // prologue) if // - it was compiled with -O2 -g (in which case, GCC outputs proper location // info for the prologue), and // - it was compiled by GCC >= 4.5 (previous versions could have had invalid // debug info in the prologue, see GDB's PR13777) // Note that clang behaves similarly to GCC here: non-optimized code does not // have location lists, while optimized code does. In the check below, even if // the producer is not GCC, we assume that it is valid to do the loclist check // afterwards (which it is for clang). string prod, vers; if (is_gcc_producer(cu, prod, vers) && strverscmp(vers.c_str(), "4.5") < 0) return false; // We determine if the current CU has been optimized with -O2 -g by looking // for any data objects whose DW_AT_location is a location list. This is also // how GDB determines whether to skip the prologue or not. See GDB's PR12573 // and also RHBZ612253#c6. if (!die_has_loclist(cu)) return false; if (sess.verbose > 2) clog << _F("CU '%s' in module '%s' has valid locs", cu_name().c_str(), module_name.c_str()) << endl; return true; } /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/dwflpp.h000066400000000000000000000751261260561570600151050ustar00rootroot00000000000000// C++ interface to dwfl // Copyright (C) 2005-2015 Red Hat Inc. // Copyright (C) 2005-2007 Intel Corporation. // Copyright (C) 2008 James.Bottomley@HansenPartnership.com // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #ifndef DWFLPP_H #define DWFLPP_H #include "config.h" #include "dwarf_wrappers.h" #include "elaborate.h" #include "session.h" #include "unordered.h" #include "setupdwfl.h" #include "stringtable.h" #include #include #include #include #include #include // Old elf.h doesn't know about this machine type. #ifndef EM_AARCH64 #define EM_AARCH64 183 #endif extern "C" { #include #include } struct base_func_info; struct func_info; struct inline_instance_info; struct symbol_table; struct base_query; struct external_function_query; enum lineno_t { ABSOLUTE, RELATIVE, WILDCARD, ENUMERATED }; enum info_status { info_unknown, info_present, info_absent }; // module -> cu die[] typedef unordered_map*> module_cu_cache_t; // An instance of this type tracks whether the type units for a given // Dwarf have been read. typedef std::set module_tus_read_t; // typename -> die typedef unordered_map cu_type_cache_t; // cu die -> (typename -> die) typedef unordered_map mod_cu_type_cache_t; // function -> die typedef unordered_multimap cu_function_cache_t; typedef std::pair cu_function_cache_range_t; // cu die -> (function -> die) typedef unordered_map mod_cu_function_cache_t; // module -> (function -> die) typedef unordered_map mod_function_cache_t; // inline function die -> instance die[] typedef unordered_map*> cu_inl_function_cache_t; // die -> parent die typedef unordered_map cu_die_parent_cache_t; // cu die -> (die -> parent die) typedef unordered_map mod_cu_die_parent_cache_t; // Dwarf_Line[] (sorted by lineno) typedef std::vector lines_t; typedef std::pair lines_range_t; // srcfile -> Dwarf_Line[] typedef unordered_map srcfile_lines_cache_t; // cu die -> (srcfile -> Dwarf_Line[]) typedef unordered_map cu_lines_cache_t; typedef std::vector base_func_info_map_t; typedef std::vector func_info_map_t; typedef std::vector inline_instance_map_t; struct module_info { Dwfl_Module* mod; const char* name; std::string elf_path; Dwarf_Addr addr; Dwarf_Addr bias; symbol_table *sym_table; info_status dwarf_status; // module has dwarf info? info_status symtab_status; // symbol table cached? std::set inlined_funcs; std::set plt_funcs; std::set > marks; /* */ void get_symtab(); void update_symtab(cu_function_cache_t *funcs); module_info(const char *name) : mod(NULL), name(name), addr(0), bias(0), sym_table(NULL), dwarf_status(info_unknown), symtab_status(info_unknown) {} ~module_info(); }; struct module_cache { std::map cache; bool paths_collected; bool dwarf_collected; module_cache() : paths_collected(false), dwarf_collected(false) {} ~module_cache(); }; struct base_func_info { base_func_info() : decl_line(-1), entrypc(0) { std::memset(&die, 0, sizeof(die)); } interned_string name; interned_string decl_file; int decl_line; Dwarf_Die die; Dwarf_Addr entrypc; }; struct func_info : base_func_info { func_info() : addr(0), prologue_end(0), weak(false), descriptor(false) {} Dwarf_Addr addr; Dwarf_Addr prologue_end; bool weak, descriptor; }; struct inline_instance_info : base_func_info { inline_instance_info() {} bool operator<(const inline_instance_info& other) const; }; /* We'll need some context when dwflpp::loc2c_error is called. So we can attach some detailed information about (the location of) the DWARF that failed to be translated. Needs updating before each loc2c c_translate call. */ struct loc2c_context { Dwarf_Die *die; Dwarf_Addr pc; public: loc2c_context(): die(0), pc(0) {} }; struct dwflpp { systemtap_session & sess; // These are "current" values we focus on. Dwfl_Module * module; Dwarf_Addr module_bias; module_info * mod_info; // These describe the current module's PC address range Dwarf_Addr module_start; Dwarf_Addr module_end; Dwarf_Die * cu; std::string module_name; std::string function_name; // Some context for dwflpp::loc2c_error callback. // Needs updating before each loc2c c_translate call. struct loc2c_context l2c_ctx; dwflpp(systemtap_session & session, const std::string& user_module, bool kernel_p); dwflpp(systemtap_session & session, const std::vector& user_modules, bool kernel_p); ~dwflpp(); void get_module_dwarf(bool required = false, bool report = true); void focus_on_module(Dwfl_Module * m, module_info * mi); void focus_on_cu(Dwarf_Die * c); void focus_on_function(Dwarf_Die * f); std::string cu_name(void); Dwarf_Die *query_cu_containing_address(Dwarf_Addr a); bool module_name_matches(const std::string& pattern); static bool name_has_wildcard(const std::string& pattern); bool module_name_final_match(const std::string& pattern); bool function_name_matches_pattern(const std::string& name, const std::string& pattern); bool function_name_matches(const std::string& pattern); bool function_scope_matches(const std::vector& scopes); template void iterate_over_modules(int (* callback)(Dwfl_Module*, void**, const char*, Dwarf_Addr, T*), T *data) { /* We're using templates here to enforce type-safety between the data arg * we're requested to pass to callback, and the data arg that the callback * actually takes. Rather than putting the implementation here, we simply * call the specialization, which does the real work. * As a result, we need to cast the data arg in the callback signature * and the one passed to void* (which is what elfutils also works with). * */ iterate_over_modules((int (*)(Dwfl_Module*, void**, const char*, Dwarf_Addr, void *))callback, (void*)data); } template void iterate_over_cus(int (* callback)(Dwarf_Die*, T*), T *data, bool want_types) { // See comment block in iterate_over_modules() iterate_over_cus((int (*)(Dwarf_Die*, void*))callback, (void*)data, want_types); } bool func_is_inline(); bool func_is_exported(); template void iterate_over_inline_instances(int (* callback)(Dwarf_Die*, T*), T *data) { // See comment block in iterate_over_modules() iterate_over_inline_instances((int (*)(Dwarf_Die*, void*))callback, (void*)data); } std::vector getscopes_die(Dwarf_Die* die); std::vector getscopes(Dwarf_Die* die); std::vector getscopes(Dwarf_Addr pc); Dwarf_Die *declaration_resolve(Dwarf_Die *type); Dwarf_Die *declaration_resolve(const std::string& name); Dwarf_Die *declaration_resolve_other_cus(const std::string& name); template int iterate_over_functions (int (* callback)(Dwarf_Die*, T*), T *data, const std::string& function) { // See comment block in iterate_over_modules() return iterate_over_functions((int (*)(Dwarf_Die*, void*))callback, (void*)data, function); } template int iterate_single_function (int (* callback)(Dwarf_Die*, T*), T *data, const std::string& function) { // See comment block in iterate_over_modules() return iterate_single_function((int (*)(Dwarf_Die*, void*))callback, (void*)data, function); } template int iterate_over_notes (T *object, void (* callback)(T*, const std::string&, const std::string&, int, const char*, size_t)) { // See comment block in iterate_over_modules() return iterate_over_notes((void*)object, (void (*)(void*, const std::string&, const std::string&, int, const char*, size_t))callback); } template void iterate_over_libraries (void (*callback)(T*, const char*), T *data) { // See comment block in iterate_over_modules() iterate_over_libraries((void (*)(void*, const char*))callback, (void*)data); } template int iterate_over_plt (T *object, void (*callback)(T*, const char*, size_t)) { // See comment block in iterate_over_modules() return iterate_over_plt((void*)object, (void (*)(void*, const char*, size_t))callback); } template void iterate_over_srcfile_lines (char const * srcfile, const std::vector& linenos, enum lineno_t lineno_type, base_func_info_map_t& funcs, void (*callback) (Dwarf_Addr, int, T*), bool has_nearest, T *data) { // See comment block in iterate_over_modules() iterate_over_srcfile_lines(srcfile, linenos, lineno_type, funcs, (void (*)(Dwarf_Addr, int, void*))callback, has_nearest, (void*)data); } template void iterate_over_labels (Dwarf_Die *begin_die, const std::string& sym, const base_func_info& function, const std::vector& linenos, enum lineno_t lineno_type, T *data, void (* callback)(const base_func_info&, const char*, const char*, int, Dwarf_Die*, Dwarf_Addr, T*)) { // See comment block in iterate_over_modules() iterate_over_labels(begin_die, sym, function, linenos, lineno_type, (void*)data, (void (*)(const base_func_info&, const char*, const char*, int, Dwarf_Die*, Dwarf_Addr, void*))callback); } template void iterate_over_callees (Dwarf_Die *begin_die, const std::string& sym, long recursion_depth, T *data, void (* callback)(base_func_info&, base_func_info&, std::stack*, T*), base_func_info& caller, std::stack*callers=NULL) { // See comment block in iterate_over_modules() iterate_over_callees(begin_die, sym, recursion_depth, (void*)data, (void (*)(base_func_info&, base_func_info&, std::stack*, void*))callback, caller, callers); } GElf_Shdr * get_section(std::string section_name, GElf_Shdr *shdr_mem, Elf **elf_ret=NULL); void collect_srcfiles_matching (std::string const & pattern, std::set & filtered_srcfiles); void resolve_prologue_endings (func_info_map_t & funcs); bool function_entrypc (Dwarf_Addr * addr) __attribute__((warn_unused_result)); bool die_entrypc (Dwarf_Die * die, Dwarf_Addr * addr) __attribute__((warn_unused_result)); void function_die (Dwarf_Die *d); void function_file (char const ** c); void function_line (int *linep); bool die_has_pc (Dwarf_Die & die, Dwarf_Addr pc); bool inner_die_containing_pc(Dwarf_Die& scope, Dwarf_Addr addr, Dwarf_Die& result); std::string literal_stmt_for_local (std::vector& scopes, Dwarf_Addr pc, std::string const & local, const target_symbol *e, bool lvalue, Dwarf_Die *die_mem); Dwarf_Die* type_die_for_local (std::vector& scopes, Dwarf_Addr pc, std::string const & local, const target_symbol *e, Dwarf_Die *die_mem); std::string literal_stmt_for_return (Dwarf_Die *scope_die, Dwarf_Addr pc, const target_symbol *e, bool lvalue, Dwarf_Die *die_mem); Dwarf_Die* type_die_for_return (Dwarf_Die *scope_die, Dwarf_Addr pc, const target_symbol *e, Dwarf_Die *die_mem); std::string literal_stmt_for_pointer (Dwarf_Die *type_die, const target_symbol *e, bool lvalue, Dwarf_Die *die_mem); Dwarf_Die* type_die_for_pointer (Dwarf_Die *type_die, const target_symbol *e, Dwarf_Die *die_mem); enum blacklisted_type { blacklisted_none, // not blacklisted blacklisted_section, blacklisted_kprobes, blacklisted_function, blacklisted_function_return, blacklisted_file }; blacklisted_type blacklisted_p(interned_string funcname, interned_string filename, int line, interned_string module, Dwarf_Addr addr, bool has_return); Dwarf_Addr relocate_address(Dwarf_Addr addr, interned_string& reloc_section); void resolve_unqualified_inner_typedie (Dwarf_Die *typedie, Dwarf_Die *innerdie, const target_symbol *e); bool has_gnu_debugdata(); bool has_valid_locs(); private: Dwfl * dwfl; // These are "current" values we focus on. Dwarf * module_dwarf; Dwarf_Die * function; void setup_kernel(const std::string& module_name, systemtap_session &s, bool debuginfo_needed = true); void setup_kernel(const std::vector& modules, bool debuginfo_needed = true); void setup_user(const std::vector& modules, bool debuginfo_needed = true); module_cu_cache_t module_cu_cache; module_tus_read_t module_tus_read; mod_cu_function_cache_t cu_function_cache; mod_function_cache_t mod_function_cache; std::set cu_inl_function_cache_done; // CUs that are already cached cu_inl_function_cache_t cu_inl_function_cache; void cache_inline_instances (Dwarf_Die* die); mod_cu_die_parent_cache_t cu_die_parent_cache; void cache_die_parents(cu_die_parent_cache_t* parents, Dwarf_Die* die); cu_die_parent_cache_t *get_die_parents(); // Cache for cu lines sorted by lineno cu_lines_cache_t cu_lines_cache; Dwarf_Die* get_parent_scope(Dwarf_Die* die); /* The global alias cache is used to resolve any DIE found in a * module that is stubbed out with DW_AT_declaration with a defining * DIE found in a different module. The current assumption is that * this only applies to structures and unions, which have a global * namespace (it deliberately only traverses program scope), so this * cache is indexed by name. If other declaration lookups were * added to it, it would have to be indexed by name and tag */ mod_cu_type_cache_t global_alias_cache; static int global_alias_caching_callback(Dwarf_Die *die, bool has_inner_types, const std::string& prefix, cu_type_cache_t *cache); static int global_alias_caching_callback_cus(Dwarf_Die *die, dwflpp *dw); template static int iterate_over_globals (Dwarf_Die *cu_die, int (* callback)(Dwarf_Die*, bool, const std::string&, T*), T *data) { // See comment block in iterate_over_modules() return iterate_over_globals(cu_die, (int (*)(Dwarf_Die*, bool, const std::string&, void*))callback, (void*)data); } template static int iterate_over_types (Dwarf_Die *top_die, bool has_inner_types, const std::string& prefix, int (* callback)(Dwarf_Die*, bool, const std::string&, T*), T *data) { // See comment block in iterate_over_modules() return iterate_over_types(top_die, has_inner_types, prefix, (int (*)(Dwarf_Die*, bool, const std::string&, void*))callback, (void*)data); } static int mod_function_caching_callback (Dwarf_Die* func, cu_function_cache_t *v); static int cu_function_caching_callback (Dwarf_Die* func, cu_function_cache_t *v); lines_t* get_cu_lines_sorted_by_lineno(const char *srcfile); void collect_lines_for_single_lineno(char const * srcfile, int lineno, bool is_relative, base_func_info_map_t& funcs, lines_t& matching_lines); void collect_all_lines(char const * srcfile, base_func_info_map_t& funcs, lines_t& matching_lines); std::pair get_nearest_linenos(char const * srcfile, int lineno, base_func_info_map_t& funcs); int get_nearest_lineno(char const * srcfile, int lineno, base_func_info_map_t& funcs); void suggest_alternative_linenos(char const * srcfile, int lineno, base_func_info_map_t& funcs); static int external_function_cu_callback (Dwarf_Die* cu, external_function_query *efq); static int external_function_func_callback (Dwarf_Die* func, external_function_query *efq); static void loc2c_error (void *, const char *fmt, ...) __attribute__ ((noreturn)); // This function generates code used for addressing computations of // target variables. void emit_address (struct obstack *pool, Dwarf_Addr address); static void loc2c_emit_address (void *arg, struct obstack *pool, Dwarf_Addr address); void get_locals(std::vector& scopes, std::set& locals); void get_locals_die(Dwarf_Die &die, std::set& locals); void get_members(Dwarf_Die *vardie, std::set& members, std::set &dupes); Dwarf_Attribute *find_variable_and_frame_base (std::vector& scopes, Dwarf_Addr pc, std::string const & local, const target_symbol *e, Dwarf_Die *vardie, Dwarf_Attribute *fb_attr_mem); std::string die_location_as_string(Dwarf_Addr, Dwarf_Die*); std::string die_location_as_function_string(Dwarf_Addr, Dwarf_Die*); std::string pc_die_line_string(Dwarf_Addr, Dwarf_Die*); /* source file name, line and column info for pc in current cu. */ const char *pc_line (Dwarf_Addr, int *, int *); struct location *translate_location(struct obstack *pool, Dwarf_Attribute *attr, Dwarf_Die *die, Dwarf_Addr pc, Dwarf_Attribute *fb_attr, struct location **tail, const target_symbol *e); bool find_struct_member(const target_symbol::component& c, Dwarf_Die *parentdie, Dwarf_Die *memberdie, std::vector& dies, std::vector& locs); void translate_components(struct obstack *pool, struct location **tail, Dwarf_Addr pc, const target_symbol *e, Dwarf_Die *vardie, Dwarf_Die *typedie, unsigned first=0); void translate_final_fetch_or_store (struct obstack *pool, struct location **tail, Dwarf_Addr module_bias, Dwarf_Die *vardie, Dwarf_Die *typedie, bool lvalue, const target_symbol *e, std::string &, std::string &, Dwarf_Die *enddie); std::string express_as_string (std::string prelude, std::string postlude, struct location *head); regex_t blacklist_func; // function/statement probes regex_t blacklist_func_ret; // only for .return probes regex_t blacklist_file; // file name regex_t blacklist_section; // init/exit sections bool blacklist_enabled; void build_kernel_blacklist(); void build_user_blacklist(); std::string get_blacklist_section(Dwarf_Addr addr); // Returns the call frame address operations for the given program counter. Dwarf_Op *get_cfa_ops (Dwarf_Addr pc); Dwarf_Addr vardie_from_symtable(Dwarf_Die *vardie, Dwarf_Addr *addr); static int add_module_build_id_to_hash (Dwfl_Module *m, void **userdata __attribute__ ((unused)), const char *name, Dwarf_Addr base, void *arg); static bool is_gcc_producer(Dwarf_Die *cudie, std::string& producer, std::string& version); public: Dwarf_Addr pr15123_retry_addr (Dwarf_Addr pc, Dwarf_Die* var); }; // Template specializations for iterate_over_* functions template<> void dwflpp::iterate_over_modules(int (*callback)(Dwfl_Module*, void**, const char*, Dwarf_Addr, void*), void *data); template<> void dwflpp::iterate_over_cus(int (*callback)(Dwarf_Die*, void*), void *data, bool want_types); template<> void dwflpp::iterate_over_inline_instances(int (*callback)(Dwarf_Die*, void*), void *data); template<> int dwflpp::iterate_over_functions(int (*callback)(Dwarf_Die*, void*), void *data, const std::string& function); template<> int dwflpp::iterate_single_function(int (*callback)(Dwarf_Die*, void*), void *data, const std::string& function); template<> int dwflpp::iterate_over_globals(Dwarf_Die *cu_die, int (*callback)(Dwarf_Die*, bool, const std::string&, void*), void *data); template<> int dwflpp::iterate_over_types(Dwarf_Die *top_die, bool has_inner_types, const std::string& prefix, int (* callback)(Dwarf_Die*, bool, const std::string&, void*), void *data); template<> int dwflpp::iterate_over_notes(void *object, void (*callback)(void*, const std::string&, const std::string&, int, const char*, size_t)); template<> void dwflpp::iterate_over_libraries(void (*callback)(void*, const char*), void *data); template<> int dwflpp::iterate_over_plt(void *object, void (*callback)(void*, const char*, size_t)); template<> void dwflpp::iterate_over_srcfile_lines(char const * srcfile, const std::vector& linenos, enum lineno_t lineno_type, base_func_info_map_t& funcs, void (* callback) (Dwarf_Addr, int, void*), bool has_nearest, void *data); template<> void dwflpp::iterate_over_labels(Dwarf_Die *begin_die, const std::string& sym, const base_func_info& function, const std::vector& linenos, enum lineno_t lineno_type, void *data, void (* callback)(const base_func_info&, const char*, const char*, int, Dwarf_Die*, Dwarf_Addr, void*)); template<> void dwflpp::iterate_over_callees(Dwarf_Die *begin_die, const std::string& sym, long recursion_depth, void *data, void (* callback)(base_func_info&, base_func_info&, std::stack*, void*), base_func_info& caller, std::stack *callers); #endif // DWFLPP_H /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/elaborate.cxx000066400000000000000000005551511260561570600161230ustar00rootroot00000000000000// elaboration functions // Copyright (C) 2005-2015 Red Hat Inc. // Copyright (C) 2008 Intel Corporation // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #include "config.h" #include "elaborate.h" #include "translate.h" #include "parse.h" #include "tapsets.h" #include "session.h" #include "util.h" #include "task_finder.h" #include "stapregex.h" #include "stringtable.h" extern "C" { #include #include #define __STDC_FORMAT_MACROS #include } #include #include #include #include #include #include #include #include #include using namespace std; // ------------------------------------------------------------------------ // Used in probe_point condition construction. Either argument may be // NULL; if both, return NULL too. Resulting expression is a deep // copy for symbol resolution purposes. expression* add_condition (expression* a, expression* b) { if (!a && !b) return 0; if (! a) return deep_copy_visitor::deep_copy(b); if (! b) return deep_copy_visitor::deep_copy(a); logical_and_expr la; la.op = "&&"; la.left = a; la.right = b; la.tok = a->tok; // or could be b->tok return deep_copy_visitor::deep_copy(& la); } // ------------------------------------------------------------------------ derived_probe::derived_probe (probe *p, probe_point *l, bool rewrite_loc): base (p), base_pp(l), group(NULL), sdt_semaphore_addr(0), session_index((unsigned)-1) { assert (p); this->tok = p->tok; this->privileged = p->privileged; this->body = deep_copy_visitor::deep_copy(p->body); assert (l); // make a copy for subclasses which want to rewrite the location if (rewrite_loc) l = new probe_point(*l); this->locations.push_back (l); } void derived_probe::printsig (ostream& o) const { probe::printsig (o); printsig_nested (o); } void derived_probe::printsig_nested (ostream& o) const { // We'd like to enclose the probe derivation chain in a /* */ // comment delimiter. But just printing /* base->printsig() */ is // not enough, since base might itself be a derived_probe. So we, // er, "cleverly" encode our nesting state as a formatting flag for // the ostream. ios::fmtflags f = o.flags (ios::internal); if (f & ios::internal) { // already nested o << " <- "; base->printsig (o); } else { // outermost nesting o << " /* <- "; base->printsig (o); o << " */"; } // restore flags (void) o.flags (f); } void derived_probe::collect_derivation_chain (std::vector &probes_list) const { probes_list.push_back(const_cast(this)); base->collect_derivation_chain(probes_list); } void derived_probe::collect_derivation_pp_chain (std::vector &pp_list) const { pp_list.push_back(const_cast(this->sole_location())); base->collect_derivation_pp_chain(pp_list); } string derived_probe::derived_locations (bool firstFrom) { ostringstream o; vector reference_point; collect_derivation_pp_chain(reference_point); if (reference_point.size() > 0) for(unsigned i=1; i1) o << " from: "; o << reference_point[i]->str(false); // no ?,!,etc } return o.str(); } probe_point* derived_probe::sole_location () const { if (locations.size() == 0 || locations.size() > 1) throw SEMANTIC_ERROR (_N("derived_probe with no locations", "derived_probe with too many locations", locations.size()), this->tok); else return locations[0]; } probe_point* derived_probe::script_location () const { // This feeds function::pn() in the tapset, which is documented as the // script-level probe point expression, *after wildcard expansion*. vector chain; collect_derivation_pp_chain (chain); // Go backwards until we hit the first well-formed probe point for (int i=chain.size()-1; i>=0; i--) if (chain[i]->well_formed) return chain[i]; // If that didn't work, just fallback to -something-. return sole_location(); } void derived_probe::emit_privilege_assertion (translator_output* o) { // Emit code which will cause compilation to fail if it is compiled in // unprivileged mode. o->newline() << "#if ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPDEV) && \\"; o->newline() << " ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPSYS)"; o->newline() << "#error Internal Error: Probe "; probe::printsig (o->line()); o->line() << " generated in --unprivileged mode"; o->newline() << "#endif"; } void derived_probe::emit_process_owner_assertion (translator_output* o) { // Emit code which will abort should the current target not belong to the // user in unprivileged mode. o->newline() << "#if ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPDEV) && \\"; o->newline() << " ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPSYS)"; o->newline(1) << "if (! is_myproc ()) {"; o->newline(1) << "snprintf(c->error_buffer, sizeof(c->error_buffer),"; o->newline() << " \"Internal Error: Process %d does not belong to user %d in probe %s in --unprivileged mode\","; o->newline() << " current->tgid, _stp_uid, c->probe_point);"; o->newline() << "c->last_error = c->error_buffer;"; // NB: since this check occurs before probe locking, its exit should // not be a "goto out", which would attempt unlocking. o->newline() << "return;"; o->newline(-1) << "}"; o->newline(-1) << "#endif"; } void derived_probe::print_dupe_stamp_unprivileged(ostream& o) { o << _("unprivileged users: authorized") << endl; } void derived_probe::print_dupe_stamp_unprivileged_process_owner(ostream& o) { o << _("unprivileged users: authorized for process owner") << endl; } // ------------------------------------------------------------------------ // Members of derived_probe_builder void derived_probe_builder::build_with_suffix(systemtap_session & sess, probe * use, probe_point * location, literal_map_t const & parameters, std::vector & finished_results, std::vector const & suffix) { // XXX perhaps build the probe if suffix is empty? // if (suffix.empty()) { // build (sess, use, location, parameters, finished_results); // return; // } throw SEMANTIC_ERROR (_("invalid suffix for probe")); } bool derived_probe_builder::get_param (literal_map_t const & params, interned_string key, interned_string& value) { literal_map_t::const_iterator i = params.find (key); if (i == params.end()) return false; literal_string * ls = dynamic_cast(i->second); if (!ls) return false; value = ls->value; return true; } bool derived_probe_builder::get_param (literal_map_t const & params, interned_string key, int64_t& value) { literal_map_t::const_iterator i = params.find (key); if (i == params.end()) return false; if (i->second == NULL) return false; literal_number * ln = dynamic_cast(i->second); if (!ln) return false; value = ln->value; return true; } bool derived_probe_builder::has_null_param (literal_map_t const & params, interned_string key) { literal_map_t::const_iterator i = params.find(key); return (i != params.end() && i->second == NULL); } bool derived_probe_builder::has_param (literal_map_t const & params, interned_string key) { return (params.find(key) != params.end()); } // ------------------------------------------------------------------------ // Members of match_key. match_key::match_key(interned_string n) : name(n), have_parameter(false), parameter_type(pe_unknown) { } match_key::match_key(probe_point::component const & c) : name(c.functor), have_parameter(c.arg != NULL), parameter_type(c.arg ? c.arg->type : pe_unknown) { } match_key & match_key::with_number() { have_parameter = true; parameter_type = pe_long; return *this; } match_key & match_key::with_string() { have_parameter = true; parameter_type = pe_string; return *this; } string match_key::str() const { string n = name; if (have_parameter) switch (parameter_type) { case pe_string: return n + "(string)"; case pe_long: return n + "(number)"; default: return n + "(...)"; } return n; } bool match_key::operator<(match_key const & other) const { return ((name < other.name) || (name == other.name && have_parameter < other.have_parameter) || (name == other.name && have_parameter == other.have_parameter && parameter_type < other.parameter_type)); } // NB: these are only used in the probe point name components, where // only "*" is permitted. // // Within module("bar"), function("foo"), process("baz") strings, real // wildcards are permitted too. See also util.h:contains_glob_chars static bool isglob(interned_string str) { return(str.find('*') != str.npos); } static bool isdoubleglob(interned_string str) { return(str.find("**") != str.npos); } bool match_key::globmatch(match_key const & other) const { const char *other_str = other.name.c_str(); const char *name_str = name.c_str(); return ((fnmatch(name_str, other_str, FNM_NOESCAPE) == 0) && have_parameter == other.have_parameter && parameter_type == other.parameter_type); } // ------------------------------------------------------------------------ // Members of match_node // ------------------------------------------------------------------------ match_node::match_node() : privilege(privilege_t (pr_stapdev | pr_stapsys)) { } match_node * match_node::bind(match_key const & k) { if (k.name == "*") throw SEMANTIC_ERROR(_("invalid use of wildcard probe point component")); map::const_iterator i = sub.find(k); if (i != sub.end()) return i->second; match_node * n = new match_node(); sub.insert(make_pair(k, n)); return n; } void match_node::bind(derived_probe_builder * e) { ends.push_back (e); } match_node * match_node::bind(interned_string k) { return bind(match_key(k)); } match_node * match_node::bind_str(string const & k) { return bind(match_key(k).with_string()); } match_node * match_node::bind_num(string const & k) { return bind(match_key(k).with_number()); } match_node * match_node::bind_privilege(privilege_t p) { privilege = p; return this; } void match_node::find_and_build (systemtap_session& s, probe* p, probe_point *loc, unsigned pos, vector& results) { assert (pos <= loc->components.size()); if (pos == loc->components.size()) // matched all probe point components so far { if (ends.empty()) { string alternatives; for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) alternatives += string(" ") + i->first.str(); throw SEMANTIC_ERROR (_F("probe point truncated (follow: %s)", alternatives.c_str()), loc->components.back()->tok); } if (! pr_contains (privilege, s.privilege)) { throw SEMANTIC_ERROR (_F("probe point is not allowed for --privilege=%s", pr_name (s.privilege)), loc->components.back()->tok); } literal_map_t param_map; for (unsigned i=0; icomponents[i]->functor] = loc->components[i]->arg; // maybe 0 // Iterate over all bound builders for (unsigned k=0; kbuild (s, p, loc, param_map, results); } } else if (isdoubleglob(loc->components[pos]->functor)) // ** wildcard? { unsigned int num_results = results.size(); // When faced with "foo**bar", we try "foo*bar" and "foo*.**bar" const probe_point::component *comp = loc->components[pos]; string functor = comp->functor; size_t glob_start = functor.find("**"); size_t glob_end = functor.find_first_not_of('*', glob_start); string prefix = functor.substr(0, glob_start); string suffix = ((glob_end != string::npos) ? functor.substr(glob_end) : ""); // Synthesize "foo*bar" probe_point *simple_pp = new probe_point(*loc); probe_point::component *simple_comp = new probe_point::component(*comp); simple_comp->functor = prefix + "*" + suffix; simple_comp->from_glob = true; simple_pp->components[pos] = simple_comp; try { find_and_build (s, p, simple_pp, pos, results); } catch (const semantic_error& e) { // Ignore semantic_errors. } // Cleanup if we didn't find anything if (results.size() == num_results) { delete simple_pp; delete simple_comp; } num_results = results.size(); // Synthesize "foo*.**bar" // NB: any component arg should attach to the latter part only probe_point *expanded_pp = new probe_point(*loc); probe_point::component *expanded_comp_pre = new probe_point::component(*comp); expanded_comp_pre->functor = prefix + "*"; expanded_comp_pre->from_glob = true; expanded_comp_pre->arg = NULL; probe_point::component *expanded_comp_post = new probe_point::component(*comp); expanded_comp_post->functor = string("**") + suffix; expanded_pp->components[pos] = expanded_comp_pre; expanded_pp->components.insert(expanded_pp->components.begin() + pos + 1, expanded_comp_post); try { find_and_build (s, p, expanded_pp, pos, results); } catch (const semantic_error& e) { // Ignore semantic_errors. } // Cleanup if we didn't find anything if (results.size() == num_results) { delete expanded_pp; delete expanded_comp_pre; delete expanded_comp_post; } // Try suffix expansion only if no matches found: if (num_results == results.size()) this->try_suffix_expansion (s, p, loc, pos, results); if (! loc->optional && num_results == results.size()) { // We didn't find any wildcard matches (since the size of // the result vector didn't change). Throw an error. string sugs = suggest_functors(s, functor); throw SEMANTIC_ERROR (_F("probe point mismatch: didn't find any wildcard matches%s", sugs.empty() ? "" : (" (similar: " + sugs + ")").c_str()), comp->tok); } } else if (isglob(loc->components[pos]->functor)) // wildcard? { match_key match (* loc->components[pos]); // Call find_and_build for each possible match. Ignore errors - // unless we don't find any match. unsigned int num_results = results.size(); for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) { const match_key& subkey = i->first; match_node* subnode = i->second; assert_no_interrupts(); if (match.globmatch(subkey)) { if (s.verbose > 2) clog << _F("wildcard '%s' matched '%s'", loc->components[pos]->functor.c_str(), subkey.name.c_str()) << endl; // When we have a wildcard, we need to create a copy of // the probe point. Then we'll create a copy of the // wildcard component, and substitute the non-wildcard // functor. probe_point *non_wildcard_pp = new probe_point(*loc); probe_point::component *non_wildcard_component = new probe_point::component(*loc->components[pos]); non_wildcard_component->functor = subkey.name; non_wildcard_component->from_glob = true; non_wildcard_pp->components[pos] = non_wildcard_component; // NB: probe conditions are not attached at the wildcard // (component/functor) level, but at the overall // probe_point level. unsigned int inner_results = results.size(); // recurse (with the non-wildcard probe point) try { subnode->find_and_build (s, p, non_wildcard_pp, pos+1, results); } catch (const semantic_error& e) { // Ignore semantic_errors while expanding wildcards. // If we get done and nothing was expanded, the code // following the loop will complain. } if (results.size() == inner_results) { // If this wildcard didn't match, cleanup. delete non_wildcard_pp; delete non_wildcard_component; } } } // Try suffix expansion only if no matches found: if (num_results == results.size()) this->try_suffix_expansion (s, p, loc, pos, results); if (! loc->optional && num_results == results.size()) { // We didn't find any wildcard matches (since the size of // the result vector didn't change). Throw an error. string sugs = suggest_functors(s, loc->components[pos]->functor); throw SEMANTIC_ERROR (_F("probe point mismatch: didn't find any wildcard matches%s", sugs.empty() ? "" : (" (similar: " + sugs + ")").c_str()), loc->components[pos]->tok); } } else { match_key match (* loc->components[pos]); sub_map_iterator_t i = sub.find (match); if (i != sub.end()) // match found { match_node* subnode = i->second; // recurse subnode->find_and_build (s, p, loc, pos+1, results); return; } unsigned int num_results = results.size(); this->try_suffix_expansion (s, p, loc, pos, results); // XXX: how to correctly report alternatives + position numbers // for alias suffixes? file a separate PR to address the issue if (! loc->optional && num_results == results.size()) { // We didn't find any alias suffixes (since the size of the // result vector didn't change). Throw an error. string sugs = suggest_functors(s, loc->components[pos]->functor); throw SEMANTIC_ERROR (_F("probe point mismatch%s", sugs.empty() ? "" : (" (similar: " + sugs + ")").c_str()), loc->components[pos]->tok); } } } string match_node::suggest_functors(systemtap_session& s, string functor) { // only use prefix if globby (and prefix is non-empty) size_t glob = functor.find('*'); if (glob != string::npos && glob != 0) functor.erase(glob); if (functor.empty()) return ""; // PR18577: There isn't any point in generating a suggestion list if // we're not going to display it. if ((s.dump_mode == systemtap_session::dump_matched_probes || s.dump_mode == systemtap_session::dump_matched_probes_vars) && s.verbose < 2) return ""; set functors; for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) { string ftor = i->first.str(); if (ftor.find('(') != string::npos) // trim any parameter ftor.erase(ftor.find('(')); functors.insert(ftor); } return levenshtein_suggest(functor, functors, 5); // print top 5 } void match_node::try_suffix_expansion (systemtap_session& s, probe *p, probe_point *loc, unsigned pos, vector& results) { // PR12210: match alias suffixes. If the components thus far // have been matched, but there is an additional unknown // suffix, we have a potential alias suffix on our hands. We // need to expand the preceding components as probe aliases, // reattach the suffix, and re-run derive_probes() on the // resulting expansion. This is done by the routine // build_with_suffix(). if (strverscmp(s.compatible.c_str(), "2.0") >= 0) { // XXX: technically, param_map isn't used here. So don't // bother actually assembling it unless some // derived_probe_builder appears that actually takes // suffixes *and* consults parameters (currently no such // builders exist). literal_map_t param_map; // for (unsigned i=0; icomponents[i]->functor] = loc->components[i]->arg; // maybe 0 vector suffix (loc->components.begin()+pos, loc->components.end()); // Multiple derived_probe_builders may be bound at a // match_node due to the possibility of multiply defined // aliases. for (unsigned k=0; k < ends.size(); k++) { derived_probe_builder *b = ends[k]; try { b->build_with_suffix (s, p, loc, param_map, results, suffix); } catch (const recursive_expansion_error &e) { // Re-throw: throw semantic_error(e); } catch (const semantic_error &e) { // Adjust source coordinate and re-throw: if (! loc->optional) throw semantic_error(e.errsrc, e.what(), loc->components[pos]->tok); } } } } void match_node::build_no_more (systemtap_session& s) { for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) i->second->build_no_more (s); for (unsigned k=0; kbuild_no_more (s); } } void match_node::dump (systemtap_session &s, const string &name) { // Dump this node, if it is complete. for (unsigned k=0; kis_alias ()) continue; // In unprivileged mode, don't show the probes which are not allowed for unprivileged // users. if (pr_contains (privilege, s.privilege)) { cout << name << endl; break; // we need only print one instance. } } // Recursively dump the children of this node string dot; if (! name.empty ()) dot = "."; for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) { i->second->dump (s, name + dot + i->first.str()); } } // ------------------------------------------------------------------------ // Alias probes // ------------------------------------------------------------------------ struct alias_derived_probe: public derived_probe { alias_derived_probe (probe* base, probe_point *l, const probe_alias *a, const vector *suffix = 0); ~alias_derived_probe(); void upchuck () { throw SEMANTIC_ERROR (_("inappropriate"), this->tok); } // Alias probes are immediately expanded to other derived_probe // types, and are not themselves emitted or listed in // systemtap_session.probes void join_group (systemtap_session&) { upchuck (); } virtual const probe_alias *get_alias () const { return alias; } virtual probe_point *get_alias_loc () const { return alias_loc; } virtual probe_point *sole_location () const; private: const probe_alias *alias; // Used to check for recursion probe_point *alias_loc; // Hack to recover full probe name }; alias_derived_probe::alias_derived_probe(probe *base, probe_point *l, const probe_alias *a, const vector *suffix): derived_probe (base, l), alias(a) { // XXX pretty nasty -- this was cribbed from printscript() in main.cxx assert (alias->alias_names.size() >= 1); alias_loc = new probe_point(*alias->alias_names[0]); // XXX: [0] is arbitrary; it would make just as much sense to collect all of the names alias_loc->well_formed = true; vector::const_iterator it; for (it = suffix->begin(); it != suffix->end(); ++it) { alias_loc->components.push_back(*it); if (isglob((*it)->functor)) alias_loc->well_formed = false; // needs further derivation } } alias_derived_probe::~alias_derived_probe () { delete alias_loc; } probe_point* alias_derived_probe::sole_location () const { return const_cast(alias_loc); } void alias_expansion_builder::build(systemtap_session & sess, probe * use, probe_point * location, literal_map_t const & parameters, vector & finished_results) { vector empty_suffix; build_with_suffix (sess, use, location, parameters, finished_results, empty_suffix); } void alias_expansion_builder::build_with_suffix(systemtap_session & sess, probe * use, probe_point * location, literal_map_t const &, vector & finished_results, vector const & suffix) { // Don't build the alias expansion if infinite recursion is detected. if (checkForRecursiveExpansion (use)) { stringstream msg; msg << _F("recursive loop in alias expansion of %s at %s", lex_cast(*location).c_str(), lex_cast(location->components.front()->tok->location).c_str()); // semantic_errors thrown here might be ignored, so we need a special class: throw recursive_expansion_error (msg.str()); // XXX The point of throwing this custom error is to suppress a // cascade of "probe mismatch" messages that appear in addition to // the error. The current approach suppresses most of the error // cascade, but leaves one spurious error; in any case, the way // this particular error is reported could be improved. } // We're going to build a new probe and wrap it up in an // alias_expansion_probe so that the expansion loop recognizes it as // such and re-expands its expansion. alias_derived_probe * n = new alias_derived_probe (use, location /* soon overwritten */, this->alias, &suffix); n->body = new block(); // The new probe gets a deep copy of the location list of the alias // (with incoming condition joined) plus the suffix (if any), n->locations.clear(); for (unsigned i=0; ilocations.size(); i++) { probe_point *pp = new probe_point(*alias->locations[i]); pp->components.insert(pp->components.end(), suffix.begin(), suffix.end()); pp->condition = add_condition (pp->condition, location->condition); n->locations.push_back(pp); } // the token location of the alias, n->tok = location->components.front()->tok; // and statements representing the concatenation of the alias' // body with the use's. // // NB: locals are *not* copied forward, from either alias or // use. The expansion should have its locals re-inferred since // there's concatenated code here and we only want one vardecl per // resulting variable. if (alias->epilogue_style) n->body = new block (use->body, alias->body); else n->body = new block (alias->body, use->body); unsigned old_num_results = finished_results.size(); // If expanding for an alias suffix, be sure to pass on any errors // to the caller instead of printing them in derive_probes(): derive_probes (sess, n, finished_results, location->optional, !suffix.empty()); // Check whether we resolved something. If so, put the // whole library into the queue if not already there. if (finished_results.size() > old_num_results) { stapfile *f = alias->tok->location.file; if (find (sess.files.begin(), sess.files.end(), f) == sess.files.end()) sess.files.push_back (f); } } bool alias_expansion_builder::checkForRecursiveExpansion (probe *use) { // Collect the derivation chain of this probe. vectorderivations; use->collect_derivation_chain (derivations); // Check all probe points in the alias expansion against the currently-being-expanded probe point // of each of the probes in the derivation chain, looking for a match. This // indicates infinite recursion. // The first element of the derivation chain will be the derived_probe representing 'use', so // start the search with the second element. assert (derivations.size() > 0); assert (derivations[0] == use); for (unsigned d = 1; d < derivations.size(); ++d) { if (use->get_alias() == derivations[d]->get_alias()) return true; // recursion detected } return false; } // ------------------------------------------------------------------------ // Pattern matching // ------------------------------------------------------------------------ static unsigned max_recursion = 100; struct recursion_guard { unsigned & i; recursion_guard(unsigned & i) : i(i) { if (i > max_recursion) throw SEMANTIC_ERROR(_("recursion limit reached")); ++i; } ~recursion_guard() { --i; } }; // The match-and-expand loop. void derive_probes (systemtap_session& s, probe *p, vector& dps, bool optional, bool rethrow_errors) { // We need a static to track whether the current probe is optional so that // even if we recurse into derive_probes with optional = false, errors will // still be ignored. The undo_parent_optional bool ensures we reset the // static at the same level we had it set. static bool parent_optional = false; bool undo_parent_optional = false; if (optional && !parent_optional) { parent_optional = true; undo_parent_optional = true; } vector optional_errs; for (unsigned i = 0; i < p->locations.size(); ++i) { assert_no_interrupts(); probe_point *loc = p->locations[i]; if (s.verbose > 4) clog << "derive-probes " << *loc << endl; try { unsigned num_atbegin = dps.size(); try { s.pattern_root->find_and_build (s, p, loc, 0, dps); // <-- actual derivation! } catch (const semantic_error& e) { if (!loc->optional && !parent_optional) throw semantic_error(e); else /* tolerate failure for optional probe */ { // remember err, we will print it (in catch block) if any // non-optional loc fails to resolve semantic_error err(ERR_SRC, _("while resolving probe point"), loc->components[0]->tok, NULL, &e); optional_errs.push_back(err); continue; } } unsigned num_atend = dps.size(); if (! (loc->optional||parent_optional) && // something required, but num_atbegin == num_atend) // nothing new derived! throw SEMANTIC_ERROR (_("no match")); if (loc->sufficient && (num_atend > num_atbegin)) { if (s.verbose > 1) { clog << "Probe point "; p->locations[i]->print(clog); clog << " sufficient, skipped"; for (unsigned j = i+1; j < p->locations.size(); ++j) { clog << " "; p->locations[j]->print(clog); } clog << endl; } break; // we need not try to derive for any other locations } } catch (const semantic_error& e) { // The rethrow_errors parameter lets the caller decide an // alternative to printing the error. This is necessary when // calling derive_probes() recursively during expansion of // an alias with suffix -- any message printed here would // point to the alias declaration and not the invalid suffix // usage, so the caller needs to catch the error themselves // and print a more appropriate message. if (rethrow_errors) { throw semantic_error(e); } // Only output in dump mode if -vv is supplied: else if (!s.dump_mode || (s.verbose > 1)) { // print this one manually first because it's more important than // the optional errs semantic_error err(ERR_SRC, _("while resolving probe point"), loc->components[0]->tok, NULL, &e); s.print_error(err); // print optional errs accumulated while visiting other probe points for (vector::const_iterator it = optional_errs.begin(); it != optional_errs.end(); ++it) { s.print_error(*it); } } } } if (undo_parent_optional) parent_optional = false; } // ------------------------------------------------------------------------ // // Indexable usage checks // struct symbol_fetcher : public throwing_visitor { symbol *&sym; symbol_fetcher (symbol *&sym): sym(sym) {} void visit_symbol (symbol* e) { sym = e; } void visit_arrayindex (arrayindex* e) { e->base->visit (this); } void throwone (const token* t) { throw SEMANTIC_ERROR (_("Expecting symbol or array index expression"), t); } }; symbol * get_symbol_within_expression (expression *e) { symbol *sym = NULL; symbol_fetcher fetcher(sym); e->visit (&fetcher); return sym; // NB: may be null! } static symbol * get_symbol_within_indexable (indexable *ix) { symbol *array = NULL; hist_op *hist = NULL; classify_indexable(ix, array, hist); if (array) return array; else return get_symbol_within_expression (hist->stat); } struct mutated_var_collector : public traversing_visitor { set * mutated_vars; mutated_var_collector (set * mm) : mutated_vars (mm) {} void visit_assignment(assignment* e) { if (e->type == pe_stats && e->op == "<<<") { vardecl *vd = get_symbol_within_expression (e->left)->referent; if (vd) mutated_vars->insert (vd); } traversing_visitor::visit_assignment(e); } void visit_arrayindex (arrayindex *e) { if (is_active_lvalue (e)) { symbol *sym; if (e->base->is_symbol (sym)) mutated_vars->insert (sym->referent); else throw SEMANTIC_ERROR(_("Assignment to read-only histogram bucket"), e->tok); } traversing_visitor::visit_arrayindex (e); } }; struct no_var_mutation_during_iteration_check : public traversing_visitor { systemtap_session & session; map *> & function_mutates_vars; vector vars_being_iterated; no_var_mutation_during_iteration_check (systemtap_session & sess, map *> & fmv) : session(sess), function_mutates_vars (fmv) {} void visit_arrayindex (arrayindex *e) { if (is_active_lvalue(e)) { vardecl *vd = get_symbol_within_indexable (e->base)->referent; if (vd) { for (unsigned i = 0; i < vars_being_iterated.size(); ++i) { vardecl *v = vars_being_iterated[i]; if (v == vd) { string err = _F("variable '%s' modified during 'foreach' iteration", v->name.c_str()); session.print_error (SEMANTIC_ERROR (err, e->tok)); } } } } traversing_visitor::visit_arrayindex (e); } void visit_functioncall (functioncall* e) { map *>::const_iterator i = function_mutates_vars.find (e->referent); if (i != function_mutates_vars.end()) { for (unsigned j = 0; j < vars_being_iterated.size(); ++j) { vardecl *m = vars_being_iterated[j]; if (i->second->find (m) != i->second->end()) { string err = _F("function call modifies var '%s' during 'foreach' iteration", m->name.c_str()); session.print_error (SEMANTIC_ERROR (err, e->tok)); } } } traversing_visitor::visit_functioncall (e); } void visit_foreach_loop(foreach_loop* s) { vardecl *vd = get_symbol_within_indexable (s->base)->referent; if (vd) vars_being_iterated.push_back (vd); traversing_visitor::visit_foreach_loop (s); if (vd) vars_being_iterated.pop_back(); } }; // ------------------------------------------------------------------------ struct stat_decl_collector : public traversing_visitor { systemtap_session & session; stat_decl_collector(systemtap_session & sess) : session(sess) {} void visit_stat_op (stat_op* e) { symbol *sym = get_symbol_within_expression (e->stat); if (session.stat_decls.find(sym->name) == session.stat_decls.end()) session.stat_decls[sym->name] = statistic_decl(); } void visit_assignment (assignment* e) { if (e->op == "<<<") { symbol *sym = get_symbol_within_expression (e->left); if (session.stat_decls.find(sym->name) == session.stat_decls.end()) session.stat_decls[sym->name] = statistic_decl(); } else traversing_visitor::visit_assignment(e); } void visit_hist_op (hist_op* e) { symbol *sym = get_symbol_within_expression (e->stat); statistic_decl new_stat; if (e->htype == hist_linear) { new_stat.type = statistic_decl::linear; assert (e->params.size() == 3); new_stat.linear_low = e->params[0]; new_stat.linear_high = e->params[1]; new_stat.linear_step = e->params[2]; } else { assert (e->htype == hist_log); new_stat.type = statistic_decl::logarithmic; assert (e->params.size() == 0); } map::iterator i = session.stat_decls.find(sym->name); if (i == session.stat_decls.end()) session.stat_decls[sym->name] = new_stat; else { statistic_decl & old_stat = i->second; if (!(old_stat == new_stat)) { if (old_stat.type == statistic_decl::none) i->second = new_stat; else { // FIXME: Support multiple co-declared histogram types semantic_error se(ERR_SRC, _F("multiple histogram types declared on '%s'", sym->name.c_str()), e->tok); session.print_error (se); } } } } }; static int semantic_pass_stats (systemtap_session & sess) { stat_decl_collector sdc(sess); for (map::iterator it = sess.functions.begin(); it != sess.functions.end(); it++) it->second->body->visit (&sdc); for (unsigned i = 0; i < sess.probes.size(); ++i) sess.probes[i]->body->visit (&sdc); for (unsigned i = 0; i < sess.globals.size(); ++i) { vardecl *v = sess.globals[i]; if (v->type == pe_stats) { if (sess.stat_decls.find(v->name) == sess.stat_decls.end()) { semantic_error se(ERR_SRC, _F("unable to infer statistic parameters for global '%s'", v->name.c_str())); sess.print_error (se); } } } return sess.num_errors(); } // ------------------------------------------------------------------------ // Enforce variable-related invariants: no modification of // a foreach()-iterated array. static int semantic_pass_vars (systemtap_session & sess) { map *> fmv; no_var_mutation_during_iteration_check chk(sess, fmv); for (map::iterator it = sess.functions.begin(); it != sess.functions.end(); it++) { functiondecl * fn = it->second; if (fn->body) { set * m = new set(); mutated_var_collector mc (m); fn->body->visit (&mc); fmv[fn] = m; } } for (map::iterator it = sess.functions.begin(); it != sess.functions.end(); it++) { functiondecl * fn = it->second; if (fn->body) fn->body->visit (&chk); } for (unsigned i = 0; i < sess.probes.size(); ++i) { if (sess.probes[i]->body) sess.probes[i]->body->visit (&chk); } return sess.num_errors(); } // ------------------------------------------------------------------------ // Rewrite probe condition expressions into probe bodies. Tricky and // exciting business, this. This: // // probe foo if (g1 || g2) { ... } // probe bar { ... g1 ++ ... } // // becomes: // // probe foo { if (! (g1 || g2)) next; ... } // probe bar { ... g1 ++ ...; // if (g1 || g2) %{ enable_probe_foo %} else %{ disable_probe_foo %} // } // // In other words, we perform two transformations: // (1) Inline probe condition into its body. // (2) For each probe that modifies a global var in use in any probe's // condition, re-evaluate those probes' condition at the end of that // probe's body. // // Here, we do all of (1), and half of (2): we simply collect the dependency // info between probes, which the translator will use to emit the affected // probes' condition re-evaluation. The translator will also ensure that the // conditions are evaluated using the globals' starting values prior to any // probes starting. // Adds the condition expression to the front of the probe's body static void derived_probe_condition_inline (derived_probe *p) { expression* e = p->sole_location()->condition; assert(e); if_statement *ifs = new if_statement (); ifs->tok = e->tok; ifs->thenblock = new next_statement (); ifs->thenblock->tok = e->tok; ifs->elseblock = NULL; unary_expression *notex = new unary_expression (); notex->op = "!"; notex->tok = e->tok; notex->operand = e; ifs->condition = notex; p->body = new block (ifs, p->body); } static int semantic_pass_conditions (systemtap_session & sess) { map > vars_read_in_cond; map > vars_written_in_body; // do a first pass through the probes to ensure safety, inline any condition, // and collect var usage for (unsigned i = 0; i < sess.probes.size(); ++i) { derived_probe* p = sess.probes[i]; expression* e = p->sole_location()->condition; if (e) { varuse_collecting_visitor vcv_cond(sess); e->visit (& vcv_cond); if (!vcv_cond.written.empty()) sess.print_error (SEMANTIC_ERROR (_("probe condition must not " "modify any variables"), e->tok)); else if (vcv_cond.embedded_seen) sess.print_error (SEMANTIC_ERROR (_("probe condition must not " "include impure embedded-C"), e->tok)); derived_probe_condition_inline(p); vars_read_in_cond[p].insert(vcv_cond.read.begin(), vcv_cond.read.end()); } varuse_collecting_visitor vcv_body(sess); p->body->visit (& vcv_body); vars_written_in_body[p].insert(vcv_body.written.begin(), vcv_body.written.end()); } // do a second pass to collect affected probes for (unsigned i = 0; i < sess.probes.size(); ++i) { derived_probe *p = sess.probes[i]; // for each variable this probe modifies... set::const_iterator var; for (var = vars_written_in_body[p].begin(); var != vars_written_in_body[p].end(); ++var) { // collect probes which could be affected for (unsigned j = 0; j < sess.probes.size(); ++j) { if (vars_read_in_cond[sess.probes[j]].count(*var)) { if (!p->probes_with_affected_conditions.count(sess.probes[j])) { p->probes_with_affected_conditions.insert(sess.probes[j]); if (sess.verbose > 2) clog << "probe " << i << " can affect condition of " "probe " << j << endl; } } } } } // PR18115: We create a begin probe which is artificially registered as // affecting every other probe. This will serve as the initializer so that // other probe types with false conditions can be skipped (or registered as // disabled) during module initialization. set targets; for (unsigned i = 0; i < sess.probes.size(); ++i) if (!vars_read_in_cond[sess.probes[i]].empty()) targets.insert(sess.probes[i]); if (!targets.empty()) { stringstream ss("probe begin {}"); // no good token to choose here... let's just use the condition expression // of one of the probes as the token const token *tok = (*targets.begin())->sole_location()->condition->tok; probe *p = parse_synthetic_probe(sess, ss, tok); if (!p) throw SEMANTIC_ERROR (_("can't create cond initializer probe"), tok); vector dps; derive_probes(sess, p, dps); // there should only be one assert(dps.size() == 1); derived_probe* dp = dps[0]; dp->probes_with_affected_conditions.insert(targets.begin(), targets.end()); sess.probes.push_back (dp); dp->join_group (sess); // no need to manually do symresolution since body is empty } return sess.num_errors(); } // ------------------------------------------------------------------------ // Simple visitor that just goes through all embedded code blocks that // are available at the end all the optimizations to register any // relevant pragmas or other indicators found, so that session flags can // be set that can be inspected at translation time to trigger any // necessary initialization of code needed by the embedded code functions. // This is only for pragmas that don't have any other side-effect than // needing some initialization at module init time. Currently handles // /* pragma:vma */ /* pragma:unwind */ /* pragma:symbol */ // /* pragma:uprobes */ is handled during the typeresolution_info pass. // /* pure */, /* unprivileged */. /* myproc-unprivileged */ and /* guru */ // are handled by the varuse_collecting_visitor. struct embeddedcode_info: public functioncall_traversing_visitor { protected: systemtap_session& session; public: embeddedcode_info (systemtap_session& s): session(s) { } void visit_embeddedcode (embeddedcode* c) { if (! vma_tracker_enabled(session) && c->code.find("/* pragma:vma */") != string::npos) { if (session.verbose > 2) clog << _F("Turning on task_finder vma_tracker, pragma:vma found in %s", current_function->name.c_str()) << endl; // PR15052: stapdyn doesn't have VMA-tracking yet. if (session.runtime_usermode_p()) throw SEMANTIC_ERROR(_("VMA-tracking is only supported by the kernel runtime (PR15052)"), c->tok); enable_vma_tracker(session); } if (! session.need_unwind && c->code.find("/* pragma:unwind */") != string::npos) { if (session.verbose > 2) clog << _F("Turning on unwind support, pragma:unwind found in %s", current_function->name.c_str()) << endl; session.need_unwind = true; } if (! session.need_symbols && c->code.find("/* pragma:symbols */") != string::npos) { if (session.verbose > 2) clog << _F("Turning on symbol data collecting, pragma:symbols found in %s", current_function->name.c_str()) << endl; session.need_symbols = true; } if (! session.need_lines && c->code.find("/* pragma:lines */") != string::npos) { if (session.verbose > 2) clog << _F("Turning on debug line data collecting, pragma:lines found in %s", current_function->name.c_str()) << endl; session.need_lines = true; } } }; void embeddedcode_info_pass (systemtap_session& s) { embeddedcode_info eci (s); for (unsigned i=0; ibody->visit (& eci); } // ------------------------------------------------------------------------ // Simple visitor that collects all the regular expressions in the // file and adds them to the session DFA table. struct regex_collecting_visitor: public functioncall_traversing_visitor { protected: systemtap_session& session; public: regex_collecting_visitor (systemtap_session& s): session(s) { } void visit_regex_query (regex_query *q) { functioncall_traversing_visitor::visit_regex_query (q); string re = q->right->value; regex_to_stapdfa (&session, re, q->right->tok); } }; // Go through the regex match invocations and generate corresponding DFAs. int gen_dfa_table (systemtap_session& s) { regex_collecting_visitor rcv(s); for (unsigned i=0; ibody->visit (& rcv); if (s.probes[i]->sole_location()->condition) s.probes[i]->sole_location()->condition->visit (& rcv); } catch (const semantic_error& e) { s.print_error (e); } } return s.num_errors(); } // ------------------------------------------------------------------------ static int semantic_pass_symbols (systemtap_session&); static int semantic_pass_optimize1 (systemtap_session&); static int semantic_pass_optimize2 (systemtap_session&); static int semantic_pass_types (systemtap_session&); static int semantic_pass_vars (systemtap_session&); static int semantic_pass_stats (systemtap_session&); static int semantic_pass_conditions (systemtap_session&); struct expression_build_no_more_visitor : public expression_visitor { // Clear extra details from every expression, like DWARF type info, so that // builders can safely release them in build_no_more. From here on out, // we're back to basic types only. void visit_expression(expression *e) { e->type_details.reset(); } }; static void build_no_more (systemtap_session& s) { expression_build_no_more_visitor v; for (unsigned i=0; ibody->visit(&v); for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) it->second->body->visit(&v); // Inform all derived_probe builders that we're done with // all resolution, so it's time to release caches. s.pattern_root->build_no_more (s); } // Link up symbols to their declarations. Set the session's // files/probes/functions/globals vectors from the transitively // reached set of stapfiles in s.library_files, starting from // s.user_file. Perform automatic tapset inclusion and probe // alias expansion. static int semantic_pass_symbols (systemtap_session& s) { symresolution_info sym (s); // If we're listing functions, then we need to include all the files. Probe // aliases won't be visited/derived so all we gain are the functions, global // variables, and any real probes (e.g. begin probes). NB: type resolution for // a specific function arg may fail if it could only be determined from a // function call in one of the skipped aliases. if (s.dump_mode == systemtap_session::dump_functions) { s.files.insert(s.files.end(), s.library_files.begin(), s.library_files.end()); } else if (!s.user_files.empty()) { // Normal run: seed s.files with user_files and let it grow through the // find_* functions. NB: s.files can grow during this iteration, so // size() can return gradually increasing numbers. s.files.insert (s.files.end(), s.user_files.begin(), s.user_files.end()); } for (unsigned i = 0; i < s.files.size(); i++) { assert_no_interrupts(); stapfile* dome = s.files[i]; // Pass 1: add globals and functions to systemtap-session master list, // so the find_* functions find them // // NB: tapset global/function definitions may duplicate or conflict // with those already in s.globals/functions. We need to deconflict // here. for (unsigned i=0; iglobals.size(); i++) { vardecl* g = dome->globals[i]; for (unsigned j=0; jname == g2->name) { s.print_error (SEMANTIC_ERROR (_("conflicting global variables"), g->tok, g2->tok)); } } s.globals.push_back (g); } for (unsigned i=0; ifunctions.size(); i++) { functiondecl* f = dome->functions[i]; functiondecl* f2 = s.functions[f->name]; if (f2 && f != f2) { s.print_error (SEMANTIC_ERROR (_("conflicting functions"), f->tok, f2->tok)); } s.functions[f->name] = f; } // NB: embeds don't conflict with each other for (unsigned i=0; iembeds.size(); i++) s.embeds.push_back (dome->embeds[i]); // Pass 2: derive probes and resolve any further symbols in the // derived results. for (unsigned i=0; iprobes.size(); i++) { assert_no_interrupts(); probe* p = dome->probes [i]; vector dps; // much magic happens here: probe alias expansion, wildcard // matching, low-level derived_probe construction. derive_probes (s, p, dps); for (unsigned j=0; jjoin_group (s); try { for (unsigned k=0; kreplace (dp->body); sym.current_function = 0; sym.current_probe = dp; dp->body->visit (& sym); // Process the probe-point condition expression. sym.current_function = 0; sym.current_probe = 0; if (dp->sole_location()->condition) dp->sole_location()->condition->visit (& sym); } catch (const semantic_error& e) { s.print_error (e); } } } // Pass 3: process functions for (unsigned i=0; ifunctions.size(); i++) { assert_no_interrupts(); functiondecl* fd = dome->functions[i]; try { for (unsigned j=0; jreplace (fd->body); sym.current_function = fd; sym.current_probe = 0; fd->body->visit (& sym); } catch (const semantic_error& e) { s.print_error (e); } } } if(s.systemtap_v_check){ for(unsigned i=0;isystemtap_v_conditional) s.print_warning(_("This global uses tapset constructs that are dependent on systemtap version"), s.globals[i]->tok); } for(map::const_iterator i=s.functions.begin();i != s.functions.end();++i){ if(i->second->systemtap_v_conditional) s.print_warning(_("This function uses tapset constructs that are dependent on systemtap version"), i->second->tok); } for(unsigned i=0;i sysvc; s.probes[i]->collect_derivation_chain(sysvc); for(unsigned j=0;jsystemtap_v_conditional) s.print_warning(_("This probe uses tapset constructs that are dependent on systemtap version"), sysvc[j]->tok); if(sysvc[j]->get_alias() && sysvc[j]->get_alias()->systemtap_v_conditional) s.print_warning(_("This alias uses tapset constructs that are dependent on systemtap version"), sysvc[j]->get_alias()->tok); } } } return s.num_errors(); // all those print_error calls } // Keep unread global variables for probe end value display. void add_global_var_display (systemtap_session& s) { // Don't generate synthetic end probes when in listing mode; it would clutter // up the list of probe points with "end ...". In fact, don't bother in any // dump mode at all, since it'll never be used. if (s.dump_mode) return; varuse_collecting_visitor vut(s); for (unsigned i=0; ibody->visit (& vut); if (s.probes[i]->sole_location()->condition) s.probes[i]->sole_location()->condition->visit (& vut); } for (unsigned g=0; g < s.globals.size(); g++) { vardecl* l = s.globals[g]; if ((vut.read.find (l) != vut.read.end() && vut.used.find (l) != vut.used.end()) || vut.written.find (l) == vut.written.end()) continue; // Don't generate synthetic end probes for unread globals // declared only within tapsets. (RHBZ 468139), but rather // only within the end-user script. bool tapset_global = false; for (size_t m=0; m < s.library_files.size(); m++) { for (size_t n=0; n < s.library_files[m]->globals.size(); n++) { if (l->name == s.library_files[m]->globals[n]->name) {tapset_global = true; break;} } } if (tapset_global) continue; stringstream code; code << "probe end {" << endl; string format = l->name; string indexes; string foreach_value; if (!l->index_types.empty()) { // Add index values to the printf format, and prepare // a simple list of indexes for passing around elsewhere format += "["; for (size_t i = 0; i < l->index_types.size(); ++i) { if (i > 0) { indexes += ","; format += ","; } indexes += "__idx" + lex_cast(i); if (l->index_types[i] == pe_string) format += "\\\"%#s\\\""; else format += "%#d"; } format += "]"; // Iterate over all indexes in the array, sorted by decreasing value code << "foreach ("; if (l->type != pe_stats) { foreach_value = "__val"; code << foreach_value << " = "; } code << "[" << indexes << "] in " << l->name << "-)" << endl; } else if (l->type == pe_stats) { // PR7053: Check scalar globals for empty aggregate code << "if (@count(" << l->name << ") == 0)" << endl; code << "printf(\"" << l->name << " @count=0x0\\n\")" << endl; code << "else" << endl; } static const string stats[] = { "@count", "@min", "@max", "@sum", "@avg" }; const string stats_format = (strverscmp(s.compatible.c_str(), "1.4") >= 0) ? "%#d" : "%#x"; // Fill in the printf format for values if (l->type == pe_stats) for (size_t i = 0; i < sizeof(stats)/sizeof(stats[0]); ++i) format += " " + stats[i] + "=" + stats_format; else if (l->type == pe_string) format += "=\\\"%#s\\\""; else format += "=%#x"; format += "\\n"; // Output the actual printf code << "printf (\"" << format << "\""; // Feed indexes to the printf, and include them in the value string value = !foreach_value.empty() ? foreach_value : (string)l->name; if (!l->index_types.empty()) { code << "," << indexes; if (foreach_value.empty()) value += "[" + indexes + "]"; } // Feed the actual values to the printf if (l->type == pe_stats) for (size_t i = 0; i < sizeof(stats)/sizeof(stats[0]); ++i) code << "," << stats[i] << "(" << value << ")"; else code << "," << value; code << ")" << endl; // End of probe code << "}" << endl; probe *p = parse_synthetic_probe (s, code, l->tok); if (!p) throw SEMANTIC_ERROR (_("can't create global var display"), l->tok); vector dps; derive_probes (s, p, dps); for (unsigned i = 0; i < dps.size(); i++) { derived_probe* dp = dps[i]; s.probes.push_back (dp); dp->join_group (s); // Repopulate symbol and type info symresolution_info sym (s); sym.current_function = 0; sym.current_probe = dp; dp->body->visit (& sym); } semantic_pass_types(s); // Mark that variable is read vut.read.insert (l); } } int semantic_pass (systemtap_session& s) { int rc = 0; try { s.register_library_aliases(); register_standard_tapsets(s); if (rc == 0) rc = semantic_pass_symbols (s); if (rc == 0) rc = semantic_pass_conditions (s); if (rc == 0) rc = semantic_pass_optimize1 (s); if (rc == 0) rc = semantic_pass_types (s); if (rc == 0) rc = gen_dfa_table(s); if (rc == 0) add_global_var_display (s); if (rc == 0) rc = semantic_pass_optimize2 (s); if (rc == 0) rc = semantic_pass_vars (s); if (rc == 0) rc = semantic_pass_stats (s); if (rc == 0) embeddedcode_info_pass (s); } catch (const semantic_error& e) { s.print_error (e); rc ++; } bool no_primary_probes = true; for (unsigned i = 0; i < s.probes.size(); i++) if (s.is_primary_probe(s.probes[i])) no_primary_probes = false; if (s.num_errors() == 0 && no_primary_probes && !s.dump_mode) { s.print_error(SEMANTIC_ERROR(_("no probes found"))); rc ++; } build_no_more (s); // PR11443 // NB: listing mode only cares whether we have any probes, // so all previous error conditions are disregarded. if (s.dump_mode == systemtap_session::dump_matched_probes || s.dump_mode == systemtap_session::dump_matched_probes_vars) rc = no_primary_probes; // If we're dumping functions, only error out if no functions were found if (s.dump_mode == systemtap_session::dump_functions) rc = s.functions.empty(); return rc; } // ------------------------------------------------------------------------ // semantic processing: symbol resolution symresolution_info::symresolution_info (systemtap_session& s): session (s), current_function (0), current_probe (0) { } void symresolution_info::visit_block (block* e) { for (unsigned i=0; istatements.size(); i++) { try { e->statements[i]->visit (this); } catch (const semantic_error& e) { session.print_error (e); } } } void symresolution_info::visit_foreach_loop (foreach_loop* e) { for (unsigned i=0; iindexes.size(); i++) e->indexes[i]->visit (this); for (unsigned i=0; iarray_slice.size(); i++) if (e->array_slice[i]) e->array_slice[i]->visit(this); symbol *array = NULL; hist_op *hist = NULL; classify_indexable (e->base, array, hist); if (array) { if (!array->referent) { vardecl* d = find_var (array->name, e->indexes.size (), array->tok); if (d) array->referent = d; else { stringstream msg; msg << _F("unresolved arity-%zu global array %s, missing global declaration?", e->indexes.size(), array->name.c_str()); throw SEMANTIC_ERROR (msg.str(), array->tok); } } if (!e->array_slice.empty() && e->array_slice.size() != e->indexes.size()) { stringstream msg; msg << _F("unresolved arity-%zu global array %s, missing global declaration?", e->array_slice.size(), array->name.c_str()); throw SEMANTIC_ERROR (msg.str(), array->tok); } } else { assert (hist); hist->visit (this); } if (e->value) e->value->visit (this); if (e->limit) e->limit->visit (this); e->block->visit (this); } struct delete_statement_symresolution_info: public traversing_visitor { symresolution_info *parent; delete_statement_symresolution_info (symresolution_info *p): parent(p) {} void visit_arrayindex (arrayindex* e) { parent->visit_arrayindex(e, true); } void visit_functioncall (functioncall* e) { parent->visit_functioncall (e); } void visit_symbol (symbol* e) { if (e->referent) return; vardecl* d = parent->find_var (e->name, -1, e->tok); if (d) e->referent = d; else throw SEMANTIC_ERROR (_("unresolved array in delete statement"), e->tok); } }; void symresolution_info::visit_delete_statement (delete_statement* s) { delete_statement_symresolution_info di (this); s->value->visit (&di); } void symresolution_info::visit_symbol (symbol* e) { if (e->referent) return; vardecl* d = find_var (e->name, 0, e->tok); if (d) e->referent = d; else { // new local vardecl* v = new vardecl; v->name = e->name; v->tok = e->tok; v->set_arity(0, e->tok); if (current_function) current_function->locals.push_back (v); else if (current_probe) current_probe->locals.push_back (v); else // must be probe-condition expression throw SEMANTIC_ERROR (_("probe condition must not reference undeclared global"), e->tok); e->referent = v; } } void symresolution_info::visit_arrayindex (arrayindex* e) { visit_arrayindex(e, false); } void symresolution_info::visit_arrayindex (arrayindex* e, bool wildcard_ok) { for (unsigned i=0; iindexes.size(); i++) { // assuming that if NULL, it was originally a wildcard (*) if (e->indexes[i] == NULL) { if (!wildcard_ok) throw SEMANTIC_ERROR(_("wildcard not allowed in array index"), e->tok); } else e->indexes[i]->visit (this); } symbol *array = NULL; hist_op *hist = NULL; classify_indexable(e->base, array, hist); if (array) { if (array->referent) return; vardecl* d = find_var (array->name, e->indexes.size (), array->tok); if (d) array->referent = d; else { stringstream msg; msg << _F("unresolved arity-%zu global array %s, missing global declaration?", e->indexes.size(), array->name.c_str()); throw SEMANTIC_ERROR (msg.str(), e->tok); } } else { assert (hist); hist->visit (this); } } void symresolution_info::visit_array_in (array_in* e) { visit_arrayindex(e->operand, true); } void symresolution_info::visit_functioncall (functioncall* e) { // XXX: we could relax this, if we're going to examine the // vartracking data recursively. See testsuite/semko/fortytwo.stp. if (! (current_function || current_probe)) { // must be probe-condition expression throw SEMANTIC_ERROR (_("probe condition must not reference function"), e->tok); } for (unsigned i=0; iargs.size(); i++) e->args[i]->visit (this); if (e->referent) return; functiondecl* d = find_function (e->function, e->args.size (), e->tok); if (d) e->referent = d; else { string sugs = levenshtein_suggest(e->function, collect_functions(), 5); // print 5 funcs throw SEMANTIC_ERROR(_F("unresolved function%s", sugs.empty() ? "" : (_(" (similar: ") + sugs + ")").c_str()), e->tok); } } /*find_var will return an argument other than zero if the name matches the var * name ie, if the current local name matches the name passed to find_var*/ vardecl* symresolution_info::find_var (interned_string name, int arity, const token* tok) { if (current_function || current_probe) { // search locals vector& locals = (current_function ? current_function->locals : current_probe->locals); for (unsigned i=0; iname == name) { locals[i]->set_arity (arity, tok); return locals[i]; } } // search function formal parameters (for scalars) if (arity == 0 && current_function) for (unsigned i=0; iformal_args.size(); i++) if (current_function->formal_args[i]->name == name) { // NB: no need to check arity here: formal args always scalar current_function->formal_args[i]->set_arity (0, tok); return current_function->formal_args[i]; } // search processed globals for (unsigned i=0; iname == name) { if (! session.suppress_warnings) { vardecl* v = session.globals[i]; stapfile* f = tok->location.file; // clog << "resolved " << *tok << " to global " << *v->tok << endl; if (v->tok->location.file != f && !f->synthetic) { session.print_warning (_F("cross-file global variable reference to %s from", lex_cast(*v->tok).c_str()), tok); } } session.globals[i]->set_arity (arity, tok); return session.globals[i]; } // search library globals for (unsigned i=0; iglobals.size(); j++) { vardecl* g = f->globals[j]; if (g->name == name) { g->set_arity (arity, tok); // put library into the queue if not already there if (find (session.files.begin(), session.files.end(), f) == session.files.end()) session.files.push_back (f); return g; } } } return 0; } functiondecl* symresolution_info::find_function (const string& name, unsigned arity, const token *tok) { // the common path if (session.functions.find(name) != session.functions.end()) { functiondecl* fd = session.functions[name]; assert (fd->name == name); if (fd->formal_args.size() == arity) return fd; throw SEMANTIC_ERROR(_F("arity mismatch found (function '%s' takes %zu args)", name.c_str(), fd->formal_args.size()), tok, fd->tok); } // search library functions for (unsigned i=0; ifunctions.size(); j++) if (f->functions[j]->name == name) { if (f->functions[j]->formal_args.size() == arity) { // put library into the queue if not already there if (0) // session.verbose_resolution cerr << _F(" function %s is defined from %s", name.c_str(), f->name.c_str()) << endl; if (find (session.files.begin(), session.files.end(), f) == session.files.end()) session.files.push_back (f); // else .. print different message? return f->functions[j]; } throw SEMANTIC_ERROR(_F("arity mismatch found (function '%s' takes %zu args)", name.c_str(), f->functions[j]->formal_args.size()), tok, f->functions[j]->tok); } } return 0; } set symresolution_info::collect_functions(void) { set funcs; for (map::const_iterator it = session.functions.begin(); it != session.functions.end(); ++it) funcs.insert(it->first); // search library functions for (unsigned i=0; ifunctions.size(); j++) funcs.insert(f->functions[j]->name); } return funcs; } // ------------------------------------------------------------------------ // optimization // Do away with functiondecls that are never (transitively) called // from probes. void semantic_pass_opt1 (systemtap_session& s, bool& relaxed_p) { functioncall_traversing_visitor ftv; for (unsigned i=0; ibody->visit (& ftv); if (s.probes[i]->sole_location()->condition) s.probes[i]->sole_location()->condition->visit (& ftv); } vector new_unused_functions; for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { functiondecl* fd = it->second; if (ftv.seen.find(fd) == ftv.seen.end()) { if (! fd->synthetic && s.is_user_file(fd->tok->location.file->name)) s.print_warning (_F("Eliding unused function '%s'", fd->name.c_str()), fd->tok); // s.functions.erase (it); // NB: can't, since we're already iterating upon it new_unused_functions.push_back (fd); relaxed_p = false; } } for (unsigned i=0; i::iterator where = s.functions.find (new_unused_functions[i]->name); assert (where != s.functions.end()); s.functions.erase (where); if (s.tapset_compile_coverage) s.unused_functions.push_back (new_unused_functions[i]); } } // ------------------------------------------------------------------------ // Do away with local & global variables that are never // written nor read. void semantic_pass_opt2 (systemtap_session& s, bool& relaxed_p, unsigned iterations) { varuse_collecting_visitor vut(s); for (unsigned i=0; ibody->visit (& vut); if (s.probes[i]->sole_location()->condition) s.probes[i]->sole_location()->condition->visit (& vut); } // NB: Since varuse_collecting_visitor also traverses down // actually called functions, we don't need to explicitly // iterate over them. Uncalled ones should have been pruned // in _opt1 above. // // for (unsigned i=0; ibody->visit (& vut); // Now in vut.read/written, we have a mixture of all locals, globals for (unsigned i=0; ilocals.size(); /* see below */) { vardecl* l = s.probes[i]->locals[j]; // skip over "special" locals if (l->synthetic) { j++; continue; } if (vut.read.find (l) == vut.read.end() && vut.written.find (l) == vut.written.end()) { if (s.is_user_file(l->tok->location.file->name)) s.print_warning (_F("Eliding unused variable '%s'", l->name.c_str()), l->tok); if (s.tapset_compile_coverage) { s.probes[i]->unused_locals.push_back (s.probes[i]->locals[j]); } s.probes[i]->locals.erase(s.probes[i]->locals.begin() + j); relaxed_p = false; // don't increment j } else { if (vut.written.find (l) == vut.written.end()) if (iterations == 0 && ! s.suppress_warnings) { set vars; vector::iterator it; for (it = s.probes[i]->locals.begin(); it != s.probes[i]->locals.end(); it++) vars.insert((*it)->name); for (it = s.globals.begin(); it != s.globals.end(); it++) vars.insert((*it)->name); vars.erase(l->name); string sugs = levenshtein_suggest(l->name, vars, 5); // suggest top 5 vars s.print_warning (_F("never-assigned local variable '%s'%s", l->name.c_str(), (sugs.empty() ? "" : (_(" (similar: ") + sugs + ")")).c_str()), l->tok); } j++; } } for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { functiondecl *fd = it->second; for (unsigned j=0; jlocals.size(); /* see below */) { vardecl* l = fd->locals[j]; if (vut.read.find (l) == vut.read.end() && vut.written.find (l) == vut.written.end()) { if (s.is_user_file(l->tok->location.file->name)) s.print_warning (_F("Eliding unused variable '%s'", l->name.c_str()), l->tok); if (s.tapset_compile_coverage) { fd->unused_locals.push_back (fd->locals[j]); } fd->locals.erase(fd->locals.begin() + j); relaxed_p = false; // don't increment j } else { if (vut.written.find (l) == vut.written.end()) if (iterations == 0 && ! s.suppress_warnings) { set vars; vector::iterator it; for (it = fd->formal_args.begin() ; it != fd->formal_args.end(); it++) vars.insert((*it)->name); for (it = fd->locals.begin(); it != fd->locals.end(); it++) vars.insert((*it)->name); for (it = s.globals.begin(); it != s.globals.end(); it++) vars.insert((*it)->name); vars.erase(l->name); string sugs = levenshtein_suggest(l->name, vars, 5); // suggest top 5 vars s.print_warning (_F("never-assigned local variable '%s'%s", l->name.c_str(), (sugs.empty() ? "" : (_(" (similar: ") + sugs + ")")).c_str()), l->tok); } j++; } } } for (unsigned i=0; itok->location.file->name)) s.print_warning (_F("Eliding unused variable '%s'", l->name.c_str()), l->tok); if (s.tapset_compile_coverage) { s.unused_globals.push_back(s.globals[i]); } s.globals.erase(s.globals.begin() + i); relaxed_p = false; // don't increment i } else { if (vut.written.find (l) == vut.written.end() && ! l->init) // no initializer if (iterations == 0 && ! s.suppress_warnings) { set vars; vector::iterator it; for (it = s.globals.begin(); it != s.globals.end(); it++) if (l->name != (*it)->name) vars.insert((*it)->name); string sugs = levenshtein_suggest(l->name, vars, 5); // suggest top 5 vars s.print_warning (_F("never-assigned global variable '%s'%s", l->name.c_str(), (sugs.empty() ? "" : (_(" (similar: ") + sugs + ")")).c_str()), l->tok); } i++; } } } // ------------------------------------------------------------------------ struct dead_assignment_remover: public update_visitor { systemtap_session& session; bool& relaxed_p; const varuse_collecting_visitor& vut; dead_assignment_remover(systemtap_session& s, bool& r, const varuse_collecting_visitor& v): session(s), relaxed_p(r), vut(v) {} void visit_assignment (assignment* e); void visit_try_block (try_block *s); }; // symbol_fetcher augmented to allow target-symbol types, but NULLed. struct assignment_symbol_fetcher : public symbol_fetcher { assignment_symbol_fetcher (symbol *&sym): symbol_fetcher(sym) {} void visit_target_symbol (target_symbol* e) { sym = NULL; } void visit_atvar_op (atvar_op *e) { sym = NULL; } void visit_cast_op (cast_op* e) { sym = NULL; } void visit_autocast_op (autocast_op* e) { sym = NULL; } void throwone (const token* t) { if (t->type == tok_operator && t->content == ".") // guess someone misused . in $foo->bar.baz expression // XXX why are we only checking this in lvalues? throw SEMANTIC_ERROR (_("Expecting lvalue expression, try -> instead"), t); else throw SEMANTIC_ERROR (_("Expecting lvalue expression"), t); } }; symbol * get_assignment_symbol_within_expression (expression *e) { symbol *sym = NULL; assignment_symbol_fetcher fetcher(sym); e->visit (&fetcher); return sym; // NB: may be null! } void dead_assignment_remover::visit_assignment (assignment* e) { replace (e->left); replace (e->right); symbol* left = get_assignment_symbol_within_expression (e->left); if (left) // not unresolved $target, so intended sideeffect may be elided { vardecl* leftvar = left->referent; if (vut.read.find(leftvar) == vut.read.end()) // var never read? { // NB: Not so fast! The left side could be an array whose // index expressions may have side-effects. This would be // OK if we could replace the array assignment with a // statement-expression containing all the index expressions // and the rvalue... but we can't. // Another possibility is that we have an unread global variable // which are kept for probe end value display. bool is_global = false; vector::iterator it; for (it = session.globals.begin(); it != session.globals.end(); it++) if (leftvar->name == (*it)->name) { is_global = true; break; } varuse_collecting_visitor lvut(session); e->left->visit (& lvut); if (lvut.side_effect_free () && !is_global // XXX: use _wrt() once we track focal_vars && !leftvar->synthetic) // don't elide assignment to synthetic $context variables { /* PR 1119: NB: This is not necessary here. A write-only variable will also be elided soon at the next _opt2 iteration. if (e->left->tok->location.file->name == session.user_file->name) // !tapset session.print_warning("eliding write-only ", *e->left->tok); else */ if (session.is_user_file(e->left->tok->location.file->name)) session.print_warning(_F("Eliding assignment to '%s'", leftvar->name.c_str()), e->tok); provide (e->right); // goodbye assignment* relaxed_p = false; return; } } } provide (e); } void dead_assignment_remover::visit_try_block (try_block *s) { replace (s->try_block); if (s->catch_error_var) { vardecl* errvar = s->catch_error_var->referent; if (vut.read.find(errvar) == vut.read.end()) // never read? { if (session.verbose>2) clog << _F("Eliding unused error string catcher %s at %s", errvar->name.c_str(), lex_cast(*s->tok).c_str()) << endl; s->catch_error_var = 0; } } replace (s->catch_block); provide (s); } // Let's remove assignments to variables that are never read. We // rewrite "(foo = expr)" as "(expr)". This makes foo a candidate to // be optimized away as an unused variable, and expr a candidate to be // removed as a side-effect-free statement expression. Wahoo! void semantic_pass_opt3 (systemtap_session& s, bool& relaxed_p) { // Recompute the varuse data, which will probably match the opt2 // copy of the computation, except for those totally unused // variables that opt2 removed. varuse_collecting_visitor vut(s); for (unsigned i=0; ibody->visit (& vut); // includes reachable functions too dead_assignment_remover dar (s, relaxed_p, vut); // This instance may be reused for multiple probe/function body trims. for (unsigned i=0; ibody); for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) dar.replace (it->second->body); // The rewrite operation is performed within the visitor. // XXX: we could also zap write-only globals here } // ------------------------------------------------------------------------ struct dead_stmtexpr_remover: public update_visitor { systemtap_session& session; bool& relaxed_p; set focal_vars; // vars considered subject to side-effects dead_stmtexpr_remover(systemtap_session& s, bool& r): session(s), relaxed_p(r) {} void visit_block (block *s); void visit_try_block (try_block *s); void visit_null_statement (null_statement *s); void visit_if_statement (if_statement* s); void visit_foreach_loop (foreach_loop *s); void visit_for_loop (for_loop *s); // XXX: and other places where stmt_expr's might be nested void visit_expr_statement (expr_statement *s); }; void dead_stmtexpr_remover::visit_null_statement (null_statement *s) { // easy! if (session.verbose>2) clog << _("Eliding side-effect-free null statement ") << *s->tok << endl; s = 0; provide (s); } void dead_stmtexpr_remover::visit_block (block *s) { vector new_stmts; for (unsigned i=0; istatements.size(); i++ ) { statement* new_stmt = require (s->statements[i], true); if (new_stmt != 0) { // flatten nested blocks into this one block *b = dynamic_cast(new_stmt); if (b) { if (session.verbose>2) clog << _("Flattening nested block ") << *b->tok << endl; new_stmts.insert(new_stmts.end(), b->statements.begin(), b->statements.end()); relaxed_p = false; } else new_stmts.push_back (new_stmt); } } if (new_stmts.size() == 0) { if (session.verbose>2) clog << _("Eliding side-effect-free empty block ") << *s->tok << endl; s = 0; } else if (new_stmts.size() == 1) { if (session.verbose>2) clog << _("Eliding side-effect-free singleton block ") << *s->tok << endl; provide (new_stmts[0]); return; } else s->statements = new_stmts; provide (s); } void dead_stmtexpr_remover::visit_try_block (try_block *s) { replace (s->try_block, true); replace (s->catch_block, true); // null catch{} is ok and useful if (s->try_block == 0) { if (session.verbose>2) clog << _("Eliding empty try {} block ") << *s->tok << endl; s = 0; } provide (s); } void dead_stmtexpr_remover::visit_if_statement (if_statement *s) { replace (s->thenblock, true); replace (s->elseblock, true); if (s->thenblock == 0) { if (s->elseblock == 0) { // We may be able to elide this statement, if the condition // expression is side-effect-free. varuse_collecting_visitor vct(session); s->condition->visit(& vct); if (vct.side_effect_free ()) { if (session.verbose>2) clog << _("Eliding side-effect-free if statement ") << *s->tok << endl; s = 0; // yeah, baby } else { // We can still turn it into a simple expr_statement though... if (session.verbose>2) clog << _("Creating simple evaluation from if statement ") << *s->tok << endl; expr_statement *es = new expr_statement; es->value = s->condition; es->tok = es->value->tok; provide (es); return; } } else { // For an else without a then, we can invert the condition logic to // avoid having a null statement in the thenblock if (session.verbose>2) clog << _("Inverting the condition of if statement ") << *s->tok << endl; unary_expression *ue = new unary_expression; ue->operand = s->condition; ue->tok = ue->operand->tok; ue->op = "!"; s->condition = ue; s->thenblock = s->elseblock; s->elseblock = 0; } } provide (s); } void dead_stmtexpr_remover::visit_foreach_loop (foreach_loop *s) { replace (s->block, true); if (s->block == 0) { // XXX what if s->limit has side effects? // XXX what about s->indexes or s->value used outside the loop? if(session.verbose > 2) clog << _("Eliding side-effect-free foreach statement ") << *s->tok << endl; s = 0; // yeah, baby } provide (s); } void dead_stmtexpr_remover::visit_for_loop (for_loop *s) { replace (s->block, true); if (s->block == 0) { // We may be able to elide this statement, if the condition // expression is side-effect-free. varuse_collecting_visitor vct(session); if (s->init) s->init->visit(& vct); s->cond->visit(& vct); if (s->incr) s->incr->visit(& vct); if (vct.side_effect_free ()) { if (session.verbose>2) clog << _("Eliding side-effect-free for statement ") << *s->tok << endl; s = 0; // yeah, baby } else { // Can't elide this whole statement; put a null in there. s->block = new null_statement(s->tok); } } provide (s); } void dead_stmtexpr_remover::visit_expr_statement (expr_statement *s) { // Run a varuse query against the operand expression. If it has no // side-effects, replace the entire statement expression by a null // statement with the provide() call. // // Unlike many other visitors, we do *not* traverse this outermost // one into the expression subtrees. There is no need - no // expr_statement nodes will be found there. (Function bodies // need to be visited explicitly by our caller.) // // NB. While we don't share nodes in the parse tree, let's not // deallocate *s anyway, just in case... varuse_collecting_visitor vut(session); s->value->visit (& vut); if (vut.side_effect_free_wrt (focal_vars)) { /* PR 1119: NB: this message is not a good idea here. It can name some arbitrary RHS expression of an assignment. if (s->value->tok->location.file->name == session.user_file->name) // not tapset session.print_warning("eliding never-assigned ", *s->value->tok); else */ if (session.is_user_file(s->value->tok->location.file->name)) session.print_warning("Eliding side-effect-free expression ", s->tok); // NB: this 0 pointer is invalid to leave around for any length of // time, but the parent parse tree objects above handle it. s = 0; relaxed_p = false; } provide (s); } void semantic_pass_opt4 (systemtap_session& s, bool& relaxed_p) { // Finally, let's remove some statement-expressions that have no // side-effect. These should be exactly those whose private varuse // visitors come back with an empty "written" and "embedded" lists. dead_stmtexpr_remover duv (s, relaxed_p); // This instance may be reused for multiple probe/function body trims. for (unsigned i=0; ilocals.begin(), p->locals.end()); duv.replace (p->body, true); if (p->body == 0) { if (! s.timing && // PR10070 !(p->base->tok->location.file->synthetic)) // don't warn for synthetic probes s.print_warning (_F("side-effect-free probe '%s'", p->name.c_str()), p->tok); p->body = new null_statement(p->tok); // XXX: possible duplicate warnings; see below } } for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { assert_no_interrupts(); functiondecl* fn = it->second; duv.focal_vars.clear (); duv.focal_vars.insert (fn->locals.begin(), fn->locals.end()); duv.focal_vars.insert (fn->formal_args.begin(), fn->formal_args.end()); duv.focal_vars.insert (s.globals.begin(), s.globals.end()); duv.replace (fn->body, true); if (fn->body == 0) { s.print_warning (_F("side-effect-free function '%s'", fn->name.c_str()), fn->tok); fn->body = new null_statement(fn->tok); // XXX: the next iteration of the outer optimization loop may // take this new null_statement away again, and thus give us a // fresh warning. It would be better if this fixup was performed // only after the relaxation iterations. // XXX: or else see bug #6469. } } } // ------------------------------------------------------------------------ // The goal of this visitor is to reduce top-level expressions in void context // into separate statements that evaluate each subcomponent of the expression. // The dead-statement-remover can later remove some parts if they have no side // effects. // // All expressions must be overridden here so we never visit their subexpressions // accidentally. Thus, the only visited expressions should be value of an // expr_statement. // // For an expression to replace its expr_statement with something else, it will // let the new statement provide(), and then provide(0) for itself. The // expr_statement will take this as a sign that it's been replaced. struct void_statement_reducer: public update_visitor { systemtap_session& session; bool& relaxed_p; set focal_vars; // vars considered subject to side-effects void_statement_reducer(systemtap_session& s, bool& r): session(s), relaxed_p(r) {} void visit_expr_statement (expr_statement* s); // expressions in conditional / loop controls are definitely a side effect, // but still recurse into the child statements void visit_if_statement (if_statement* s); void visit_for_loop (for_loop* s); void visit_foreach_loop (foreach_loop* s); // these expressions get rewritten into their statement equivalents void visit_logical_or_expr (logical_or_expr* e); void visit_logical_and_expr (logical_and_expr* e); void visit_ternary_expression (ternary_expression* e); // all of these can (usually) be reduced into simpler statements void visit_binary_expression (binary_expression* e); void visit_unary_expression (unary_expression* e); void visit_regex_query (regex_query* e); // XXX depends on subexpr extraction void visit_comparison (comparison* e); void visit_concatenation (concatenation* e); void visit_functioncall (functioncall* e); void visit_print_format (print_format* e); void visit_target_symbol (target_symbol* e); void visit_atvar_op (atvar_op* e); void visit_cast_op (cast_op* e); void visit_autocast_op (autocast_op* e); void visit_defined_op (defined_op* e); // these are a bit hairy to grok due to the intricacies of indexables and // stats, so I'm chickening out and skipping them... void visit_array_in (array_in* e) { provide (e); } void visit_arrayindex (arrayindex* e) { provide (e); } void visit_stat_op (stat_op* e) { provide (e); } void visit_hist_op (hist_op* e) { provide (e); } // these can't be reduced because they always have an effect void visit_return_statement (return_statement* s) { provide (s); } void visit_delete_statement (delete_statement* s) { provide (s); } void visit_pre_crement (pre_crement* e) { provide (e); } void visit_post_crement (post_crement* e) { provide (e); } void visit_assignment (assignment* e) { provide (e); } private: void reduce_target_symbol (target_symbol* e, expression* operand=NULL); }; void void_statement_reducer::visit_expr_statement (expr_statement* s) { replace (s->value, true); // if the expression provides 0, that's our signal that a new // statement has been provided, so we shouldn't provide this one. if (s->value != 0) provide(s); } void void_statement_reducer::visit_if_statement (if_statement* s) { // s->condition is never void replace (s->thenblock); replace (s->elseblock); provide (s); } void void_statement_reducer::visit_for_loop (for_loop* s) { // s->init/cond/incr are never void replace (s->block); provide (s); } void void_statement_reducer::visit_foreach_loop (foreach_loop* s) { // s->indexes/base/value/limit are never void replace (s->block); provide (s); } void void_statement_reducer::visit_logical_or_expr (logical_or_expr* e) { // In void context, the evaluation of "a || b" is exactly like // "if (!a) b", so let's do that instead. if (session.verbose>2) clog << _("Creating if statement from unused logical-or ") << *e->tok << endl; if_statement *is = new if_statement; is->tok = e->tok; is->elseblock = 0; unary_expression *ue = new unary_expression; ue->operand = e->left; ue->tok = e->tok; ue->op = "!"; is->condition = ue; expr_statement *es = new expr_statement; es->value = e->right; es->tok = es->value->tok; is->thenblock = es; is->visit(this); relaxed_p = false; e = 0; provide (e); } void void_statement_reducer::visit_logical_and_expr (logical_and_expr* e) { // In void context, the evaluation of "a && b" is exactly like // "if (a) b", so let's do that instead. if (session.verbose>2) clog << _("Creating if statement from unused logical-and ") << *e->tok << endl; if_statement *is = new if_statement; is->tok = e->tok; is->elseblock = 0; is->condition = e->left; expr_statement *es = new expr_statement; es->value = e->right; es->tok = es->value->tok; is->thenblock = es; is->visit(this); relaxed_p = false; e = 0; provide (e); } void void_statement_reducer::visit_ternary_expression (ternary_expression* e) { // In void context, the evaluation of "a ? b : c" is exactly like // "if (a) b else c", so let's do that instead. if (session.verbose>2) clog << _("Creating if statement from unused ternary expression ") << *e->tok << endl; if_statement *is = new if_statement; is->tok = e->tok; is->condition = e->cond; expr_statement *es = new expr_statement; es->value = e->truevalue; es->tok = es->value->tok; is->thenblock = es; es = new expr_statement; es->value = e->falsevalue; es->tok = es->value->tok; is->elseblock = es; is->visit(this); relaxed_p = false; e = 0; provide (e); } void void_statement_reducer::visit_binary_expression (binary_expression* e) { // When the result of a binary operation isn't needed, it's just as good to // evaluate the operands as sequential statements in a block. if (session.verbose>2) clog << _("Eliding unused binary ") << *e->tok << endl; block *b = new block; b->tok = e->tok; expr_statement *es = new expr_statement; es->value = e->left; es->tok = es->value->tok; b->statements.push_back(es); es = new expr_statement; es->value = e->right; es->tok = es->value->tok; b->statements.push_back(es); b->visit(this); relaxed_p = false; e = 0; provide (e); } void void_statement_reducer::visit_unary_expression (unary_expression* e) { // When the result of a unary operation isn't needed, it's just as good to // evaluate the operand directly if (session.verbose>2) clog << _("Eliding unused unary ") << *e->tok << endl; relaxed_p = false; e->operand->visit(this); } void void_statement_reducer::visit_regex_query (regex_query* e) { // TODOXXX After subexpression extraction is implemented, // regular expression matches *may* have side-effects in // terms of producing matched subexpressions, e.g.: // // str =~ "pat"; println(matched(0)); // // It's debatable if we want to actually allow this, though. // Treat e as a unary expression on the left operand -- since the // right hand side must be a literal (as verified by the parser), // evaluating it never has side effects. if (session.verbose>2) clog << _("Eliding regex query ") << *e->tok << endl; relaxed_p = false; e->left->visit(this); } void void_statement_reducer::visit_comparison (comparison* e) { visit_binary_expression(e); } void void_statement_reducer::visit_concatenation (concatenation* e) { visit_binary_expression(e); } void void_statement_reducer::visit_functioncall (functioncall* e) { // If a function call is pure and its result ignored, we can elide the call // and just evaluate the arguments in sequence if (!e->args.size()) { provide (e); return; } varuse_collecting_visitor vut(session); vut.seen.insert (e->referent); vut.current_function = e->referent; e->referent->body->visit (& vut); if (!vut.side_effect_free_wrt (focal_vars)) { provide (e); return; } if (session.verbose>2) clog << _("Eliding side-effect-free function call ") << *e->tok << endl; block *b = new block; b->tok = e->tok; for (unsigned i=0; iargs.size(); i++ ) { expr_statement *es = new expr_statement; es->value = e->args[i]; es->tok = es->value->tok; b->statements.push_back(es); } b->visit(this); relaxed_p = false; e = 0; provide (e); } void void_statement_reducer::visit_print_format (print_format* e) { // When an sprint's return value is ignored, we can simply evaluate the // arguments in sequence if (e->print_to_stream || !e->args.size()) { provide (e); return; } if (session.verbose>2) clog << _("Eliding unused print ") << *e->tok << endl; block *b = new block; b->tok = e->tok; for (unsigned i=0; iargs.size(); i++ ) { expr_statement *es = new expr_statement; es->value = e->args[i]; es->tok = es->value->tok; b->statements.push_back(es); } b->visit(this); relaxed_p = false; e = 0; provide (e); } void void_statement_reducer::reduce_target_symbol (target_symbol* e, expression* operand) { // When the result of any target_symbol isn't needed, it's just as good to // evaluate the operand and any array indexes directly block *b = new block; b->tok = e->tok; if (operand) { expr_statement *es = new expr_statement; es->value = operand; es->tok = es->value->tok; b->statements.push_back(es); } for (unsigned i=0; icomponents.size(); i++ ) { if (e->components[i].type != target_symbol::comp_expression_array_index) continue; expr_statement *es = new expr_statement; es->value = e->components[i].expr_index; es->tok = es->value->tok; b->statements.push_back(es); } b->visit(this); relaxed_p = false; e = 0; provide (e); } void void_statement_reducer::visit_atvar_op (atvar_op* e) { if (session.verbose>2) clog << _("Eliding unused target symbol ") << *e->tok << endl; reduce_target_symbol (e); } void void_statement_reducer::visit_target_symbol (target_symbol* e) { if (session.verbose>2) clog << _("Eliding unused target symbol ") << *e->tok << endl; reduce_target_symbol (e); } void void_statement_reducer::visit_cast_op (cast_op* e) { if (session.verbose>2) clog << _("Eliding unused typecast ") << *e->tok << endl; reduce_target_symbol (e, e->operand); } void void_statement_reducer::visit_autocast_op (autocast_op* e) { if (session.verbose>2) clog << _("Eliding unused autocast ") << *e->tok << endl; reduce_target_symbol (e, e->operand); } void void_statement_reducer::visit_defined_op (defined_op* e) { // When the result of a @defined operation isn't needed, just elide // it entirely. Its operand $expression must already be // side-effect-free. if (session.verbose>2) clog << _("Eliding unused check ") << *e->tok << endl; relaxed_p = false; e = 0; provide (e); } void semantic_pass_opt5 (systemtap_session& s, bool& relaxed_p) { // Let's simplify statements with unused computed values. void_statement_reducer vuv (s, relaxed_p); // This instance may be reused for multiple probe/function body trims. vuv.focal_vars.insert (s.globals.begin(), s.globals.end()); for (unsigned i=0; ibody); for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) vuv.replace (it->second->body); } struct const_folder: public update_visitor { systemtap_session& session; bool& relaxed_p; const_folder(systemtap_session& s, bool& r): session(s), relaxed_p(r), last_number(0), last_string(0) {} literal_number* last_number; literal_number* get_number(expression*& e); void visit_literal_number (literal_number* e); literal_string* last_string; literal_string* get_string(expression*& e); void visit_literal_string (literal_string* e); void get_literal(expression*& e, literal_number*& n, literal_string*& s); void visit_if_statement (if_statement* s); void visit_for_loop (for_loop* s); void visit_foreach_loop (foreach_loop* s); void visit_binary_expression (binary_expression* e); void visit_unary_expression (unary_expression* e); void visit_logical_or_expr (logical_or_expr* e); void visit_logical_and_expr (logical_and_expr* e); // void visit_regex_query (regex_query* e); // XXX: would require executing dfa at compile-time void visit_comparison (comparison* e); void visit_concatenation (concatenation* e); void visit_ternary_expression (ternary_expression* e); void visit_defined_op (defined_op* e); void visit_target_symbol (target_symbol* e); }; void const_folder::get_literal(expression*& e, literal_number*& n, literal_string*& s) { replace (e); n = (e == last_number) ? last_number : NULL; s = (e == last_string) ? last_string : NULL; } literal_number* const_folder::get_number(expression*& e) { replace (e); return (e == last_number) ? last_number : NULL; } void const_folder::visit_literal_number (literal_number* e) { last_number = e; provide (e); } literal_string* const_folder::get_string(expression*& e) { replace (e); return (e == last_string) ? last_string : NULL; } void const_folder::visit_literal_string (literal_string* e) { last_string = e; provide (e); } void const_folder::visit_if_statement (if_statement* s) { literal_number* cond = get_number (s->condition); if (!cond) { replace (s->thenblock); replace (s->elseblock); provide (s); } else { if (session.verbose>2) clog << _F("Collapsing constant-%" PRIi64 " if-statement %s", cond->value, lex_cast(*s->tok).c_str()) << endl; relaxed_p = false; statement* n = cond->value ? s->thenblock : s->elseblock; if (n) n->visit (this); else provide (new null_statement (s->tok)); } } void const_folder::visit_for_loop (for_loop* s) { literal_number* cond = get_number (s->cond); if (!cond || cond->value) { replace (s->init); replace (s->incr); replace (s->block); provide (s); } else { if (session.verbose>2) clog << _("Collapsing constantly-false for-loop ") << *s->tok << endl; relaxed_p = false; if (s->init) s->init->visit (this); else provide (new null_statement (s->tok)); } } void const_folder::visit_foreach_loop (foreach_loop* s) { literal_number* limit = get_number (s->limit); if (!limit || limit->value > 0) { for (unsigned i = 0; i < s->indexes.size(); ++i) replace (s->indexes[i]); replace (s->base); replace (s->value); replace (s->block); provide (s); } else { if (session.verbose>2) clog << _("Collapsing constantly-limited foreach-loop ") << *s->tok << endl; relaxed_p = false; provide (new null_statement (s->tok)); } } void const_folder::visit_binary_expression (binary_expression* e) { int64_t value; literal_number* left = get_number (e->left); literal_number* right = get_number (e->right); if (right && !right->value && (e->op == "/" || e->op == "%")) { // Give divide-by-zero a chance to be optimized out elsewhere, // and if not it will be a runtime error anyway... provide (e); return; } if (left && right) { if (e->op == "+") value = left->value + right->value; else if (e->op == "-") value = left->value - right->value; else if (e->op == "*") value = left->value * right->value; else if (e->op == "&") value = left->value & right->value; else if (e->op == "|") value = left->value | right->value; else if (e->op == "^") value = left->value ^ right->value; else if (e->op == ">>") value = left->value >> max(min(right->value, (int64_t)64), (int64_t)0); else if (e->op == "<<") value = left->value << max(min(right->value, (int64_t)64), (int64_t)0); else if (e->op == "/") value = (left->value == LLONG_MIN && right->value == -1) ? LLONG_MIN : left->value / right->value; else if (e->op == "%") value = (left->value == LLONG_MIN && right->value == -1) ? 0 : left->value % right->value; else throw SEMANTIC_ERROR (_("unsupported binary operator ") + (string)e->op); } else if ((left && ((left->value == 0 && (e->op == "*" || e->op == "&" || e->op == ">>" || e->op == "<<" )) || (left->value ==-1 && (e->op == "|" || e->op == ">>")))) || (right && ((right->value == 0 && (e->op == "*" || e->op == "&")) || (right->value == 1 && (e->op == "%")) || (right->value ==-1 && (e->op == "%" || e->op == "|"))))) { expression* other = left ? e->right : e->left; varuse_collecting_visitor vu(session); other->visit(&vu); if (!vu.side_effect_free()) { provide (e); return; } // we'll pass on type=pe_long inference to the expression if (other->type == pe_unknown) other->type = pe_long; else if (other->type != pe_long) { // this mismatch was not caught in the initial type resolution pass, // generate a mismatch (left doesn't match right) error typeresolution_info ti(session); ti.assert_resolvability = true; // need this to get it throw errors ti.mismatch_complexity = 1; // also needed to throw errors ti.mismatch(e); } if (left) value = left->value; else if (e->op == "%") value = 0; else value = right->value; } else if ((left && ((left->value == 0 && (e->op == "+" || e->op == "|" || e->op == "^")) || (left->value == 1 && (e->op == "*")) || (left->value ==-1 && (e->op == "&")))) || (right && ((right->value == 0 && (e->op == "+" || e->op == "-" || e->op == "|" || e->op == "^")) || (right->value == 1 && (e->op == "*" || e->op == "/")) || (right->value ==-1 && (e->op == "&")) || (right->value <= 0 && (e->op == ">>" || e->op == "<<"))))) { if (session.verbose>2) clog << _("Collapsing constant-identity binary operator ") << *e->tok << endl; relaxed_p = false; // we'll pass on type=pe_long inference to the expression expression* other = left ? e->right : e->left; if (other->type == pe_unknown) other->type = pe_long; else if (other->type != pe_long) { // this mismatch was not caught in the initial type resolution pass, // generate a mismatch (left doesn't match right) error typeresolution_info ti(session); ti.assert_resolvability = true; // need this to get it throw errors ti.mismatch_complexity = 1; // also needed to throw errors ti.mismatch(e); } provide (other); return; } else { provide (e); return; } if (session.verbose>2) clog << _F("Collapsing constant-%" PRIi64 " binary operator %s", value, lex_cast(*e->tok).c_str()) << endl; relaxed_p = false; literal_number* n = new literal_number(value); n->tok = e->tok; n->visit (this); } void const_folder::visit_unary_expression (unary_expression* e) { literal_number* operand = get_number (e->operand); if (!operand) provide (e); else { if (session.verbose>2) clog << _("Collapsing constant unary ") << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number (*operand); n->tok = e->tok; if (e->op == "+") ; // nothing to do else if (e->op == "-") n->value = -n->value; else if (e->op == "!") n->value = !n->value; else if (e->op == "~") n->value = ~n->value; else throw SEMANTIC_ERROR (_("unsupported unary operator ") + (string)e->op); n->visit (this); } } void const_folder::visit_logical_or_expr (logical_or_expr* e) { int64_t value; literal_number* left = get_number (e->left); literal_number* right = get_number (e->right); if (left && right) value = left->value || right->value; else if ((left && left->value) || (right && right->value)) { // If the const is on the left, we get to short-circuit the right // immediately. Otherwise, we can only eliminate the LHS if it's pure. if (right) { varuse_collecting_visitor vu(session); e->left->visit(&vu); if (!vu.side_effect_free()) { provide (e); return; } } value = 1; } // We might also get rid of useless "0||x" and "x||0", except it does // normalize x to 0 or 1. We could change it to "!!x", but it's not clear // that this would gain us much. else { provide (e); return; } if (session.verbose>2) clog << _("Collapsing constant logical-OR ") << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number(value); n->tok = e->tok; n->visit (this); } void const_folder::visit_logical_and_expr (logical_and_expr* e) { int64_t value; literal_number* left = get_number (e->left); literal_number* right = get_number (e->right); if (left && right) value = left->value && right->value; else if ((left && !left->value) || (right && !right->value)) { // If the const is on the left, we get to short-circuit the right // immediately. Otherwise, we can only eliminate the LHS if it's pure. if (right) { varuse_collecting_visitor vu(session); e->left->visit(&vu); if (!vu.side_effect_free()) { provide (e); return; } } value = 0; } // We might also get rid of useless "1&&x" and "x&&1", except it does // normalize x to 0 or 1. We could change it to "!!x", but it's not clear // that this would gain us much. else { provide (e); return; } if (session.verbose>2) clog << _("Collapsing constant logical-AND ") << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number(value); n->tok = e->tok; n->visit (this); } void const_folder::visit_comparison (comparison* e) { int comp; literal_number *left_num, *right_num; literal_string *left_str, *right_str; get_literal(e->left, left_num, left_str); get_literal(e->right, right_num, right_str); if (left_str && right_str) comp = left_str->value.compare(right_str->value); else if (left_num && right_num) comp = left_num->value < right_num->value ? -1 : left_num->value > right_num->value ? 1 : 0; else if ((left_num && ((left_num->value == LLONG_MIN && (e->op == "<=" || e->op == ">")) || (left_num->value == LLONG_MAX && (e->op == ">=" || e->op == "<")))) || (right_num && ((right_num->value == LLONG_MIN && (e->op == ">=" || e->op == "<")) || (right_num->value == LLONG_MAX && (e->op == "<=" || e->op == ">"))))) { expression* other = left_num ? e->right : e->left; varuse_collecting_visitor vu(session); other->visit(&vu); if (!vu.side_effect_free()) provide (e); else { if (session.verbose>2) clog << _("Collapsing constant-boundary comparison ") << *e->tok << endl; relaxed_p = false; // ops <= and >= are true, < and > are false literal_number* n = new literal_number( e->op.length() == 2 ); n->tok = e->tok; n->visit (this); } return; } else { provide (e); return; } if (session.verbose>2) clog << _("Collapsing constant comparison ") << *e->tok << endl; relaxed_p = false; int64_t value; if (e->op == "==") value = comp == 0; else if (e->op == "!=") value = comp != 0; else if (e->op == "<") value = comp < 0; else if (e->op == ">") value = comp > 0; else if (e->op == "<=") value = comp <= 0; else if (e->op == ">=") value = comp >= 0; else throw SEMANTIC_ERROR (_("unsupported comparison operator ") + (string)e->op); literal_number* n = new literal_number(value); n->tok = e->tok; n->visit (this); } void const_folder::visit_concatenation (concatenation* e) { literal_string* left = get_string (e->left); literal_string* right = get_string (e->right); if (left && right) { if (session.verbose>2) clog << _("Collapsing constant concatenation ") << *e->tok << endl; relaxed_p = false; literal_string* n = new literal_string (*left); n->tok = e->tok; n->value = (string)n->value + (string)right->value; n->visit (this); } else if ((left && left->value.empty()) || (right && right->value.empty())) { if (session.verbose>2) clog << _("Collapsing identity concatenation ") << *e->tok << endl; relaxed_p = false; provide(left ? e->right : e->left); } else provide (e); } void const_folder::visit_ternary_expression (ternary_expression* e) { literal_number* cond = get_number (e->cond); if (!cond) { replace (e->truevalue); replace (e->falsevalue); provide (e); } else { if (session.verbose>2) clog << _F("Collapsing constant-%" PRIi64 " ternary %s", cond->value, lex_cast(*e->tok).c_str()) << endl; relaxed_p = false; expression* n = cond->value ? e->truevalue : e->falsevalue; n->visit (this); } } void const_folder::visit_defined_op (defined_op* e) { // If a @defined makes it this far, then it is, de facto, undefined. if (session.verbose>2) clog << _("Collapsing untouched @defined check ") << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number (0); n->tok = e->tok; n->visit (this); } void const_folder::visit_target_symbol (target_symbol* e) { if (session.skip_badvars) { // Upon user request for ignoring context, the symbol is replaced // with a literal 0 and a warning message displayed // XXX this ignores possible side-effects, e.g. in array indexes literal_number* ln_zero = new literal_number (0); ln_zero->tok = e->tok; provide (ln_zero); session.print_warning (_("Bad $context variable being substituted with literal 0"), e->tok); relaxed_p = false; } else update_visitor::visit_target_symbol (e); } static int initial_typeres_pass(systemtap_session& s); static int semantic_pass_const_fold (systemtap_session& s, bool& relaxed_p) { // attempt an initial type resolution pass to see if there are any type // mismatches before we starting whisking away vars that get switched out // with a const. // return if the initial type resolution pass reported errors (type mismatches) int rc = initial_typeres_pass(s); if (rc) { relaxed_p = true; return rc; } // Let's simplify statements with constant values. const_folder cf (s, relaxed_p); // This instance may be reused for multiple probe/function body trims. for (unsigned i=0; ibody); for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) cf.replace (it->second->body); return 0; } struct dead_control_remover: public traversing_visitor { systemtap_session& session; bool& relaxed_p; statement* control; dead_control_remover(systemtap_session& s, bool& r): session(s), relaxed_p(r), control(NULL) {} void visit_block (block *b); // When a block contains any of these, the following statements are dead. void visit_return_statement (return_statement* s) { control = s; } void visit_next_statement (next_statement* s) { control = s; } void visit_break_statement (break_statement* s) { control = s; } void visit_continue_statement (continue_statement* s) { control = s; } }; void dead_control_remover::visit_block (block* b) { vector& vs = b->statements; if (vs.size() == 0) /* else (size_t) size()-1 => very big */ return; for (size_t i = 0; i < vs.size() - 1; ++i) { vs[i]->visit (this); if (vs[i] == control) { session.print_warning(_("statement will never be reached"), vs[i + 1]->tok); vs.erase(vs.begin() + i + 1, vs.end()); relaxed_p = false; break; } } } static void semantic_pass_dead_control (systemtap_session& s, bool& relaxed_p) { // Let's remove code that follow unconditional control statements dead_control_remover dc (s, relaxed_p); for (unsigned i=0; ibody->visit(&dc); for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) it->second->body->visit(&dc); } struct duplicate_function_remover: public functioncall_traversing_visitor { systemtap_session& s; map& duplicate_function_map; duplicate_function_remover(systemtap_session& sess, map&dfm): s(sess), duplicate_function_map(dfm) {}; void visit_functioncall (functioncall* e); }; void duplicate_function_remover::visit_functioncall (functioncall *e) { functioncall_traversing_visitor::visit_functioncall (e); // If the current function call reference points to a function that // is a duplicate, replace it. if (duplicate_function_map.count(e->referent) != 0) { if (s.verbose>2) clog << _F("Changing %s reference to %s reference\n", e->referent->name.c_str(), duplicate_function_map[e->referent]->name.c_str()); e->tok = duplicate_function_map[e->referent]->tok; e->function = duplicate_function_map[e->referent]->name; e->referent = duplicate_function_map[e->referent]; } } static string get_functionsig (functiondecl* f) { ostringstream s; // Get the "name:args body" of the function in s. We have to // include the args since the function 'x1(a, b)' is different than // the function 'x2(b, a)' even if the bodies of the two functions // are exactly the same. f->printsig(s); f->body->print(s); // printsig puts f->name + ':' on the front. Remove this // (otherwise, functions would never compare equal). string str = s.str().erase(0, f->name.size() + 1); // Return the function signature. return str; } void semantic_pass_opt6 (systemtap_session& s, bool& relaxed_p) { // Walk through all the functions, looking for duplicates. map functionsig_map; map duplicate_function_map; vector newly_zapped_functions; for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { functiondecl *fd = it->second; string functionsig = get_functionsig(fd); if (functionsig_map.count(functionsig) == 0) { // This function is unique. Remember it. functionsig_map[functionsig] = fd; } else { // This function is a duplicate. duplicate_function_map[fd] = functionsig_map[functionsig]; newly_zapped_functions.push_back (fd); relaxed_p = false; } } for (unsigned i=0; i::iterator where = s.functions.find (newly_zapped_functions[i]->name); assert (where != s.functions.end()); s.functions.erase (where); } // If we have duplicate functions, traverse down the tree, replacing // the appropriate function calls. // duplicate_function_remover::visit_functioncall() handles the // details of replacing the function calls. if (duplicate_function_map.size() != 0) { duplicate_function_remover dfr (s, duplicate_function_map); for (unsigned i=0; i < s.probes.size(); i++) s.probes[i]->body->visit(&dfr); } } struct stable_analysis: public embedded_tags_visitor { bool stable; stable_analysis(): embedded_tags_visitor(true), stable(false) {}; void visit_embeddedcode (embeddedcode* s); void visit_functioncall (functioncall* e); }; void stable_analysis::visit_embeddedcode (embeddedcode* s) { embedded_tags_visitor::visit_embeddedcode(s); if (tagged_p("/* stable */")) stable = true; if (stable && !tagged_p("/* pure */")) throw SEMANTIC_ERROR(_("stable function must also be /* pure */"), s->tok); } void stable_analysis::visit_functioncall (functioncall* e) { } // Examines entire subtree for any stable functioncalls. struct stable_finder: public traversing_visitor { bool stable; set& stable_fcs; stable_finder(set&s): stable(false), stable_fcs(s) {}; void visit_functioncall (functioncall* e); }; void stable_finder::visit_functioncall (functioncall* e) { if (stable_fcs.find(e->function) != stable_fcs.end()) stable = true; traversing_visitor::visit_functioncall(e); } // Examines current level of block for stable functioncalls. // Does not descend into sublevels. struct level_check: public traversing_visitor { bool stable; set& stable_fcs; level_check(set& s): stable(false), stable_fcs(s) {}; void visit_block (block* s); void visit_try_block (try_block *s); void visit_if_statement (if_statement* s); void visit_for_loop (for_loop* s); void visit_foreach_loop (foreach_loop* s); void visit_functioncall (functioncall* s); }; void level_check::visit_block (block* s) { } void level_check::visit_try_block (try_block* s) { if (s->catch_error_var) s->catch_error_var->visit(this); } void level_check::visit_if_statement (if_statement* s) { s->condition->visit(this); } void level_check::visit_for_loop (for_loop* s) { if (s->init) s->init->visit(this); s->cond->visit(this); if (s->incr) s->incr->visit(this); } void level_check::visit_foreach_loop (foreach_loop* s) { s->base->visit(this); for (unsigned i=0; iindexes.size(); i++) s->indexes[i]->visit(this); if (s->value) s->value->visit(this); if (s->limit) s->limit->visit(this); } void level_check::visit_functioncall (functioncall* e) { if (stable_fcs.find(e->function) != stable_fcs.end()) stable = true; traversing_visitor::visit_functioncall(e); } struct stable_functioncall_visitor: public update_visitor { systemtap_session& session; functiondecl* current_function; derived_probe* current_probe; set& stable_fcs; set scope_vars; map new_vars; vector > new_stmts; unsigned loop_depth; block* top_scope; block* curr_scope; stable_functioncall_visitor(systemtap_session& s, set& sfc): session(s), current_function(0), current_probe(0), stable_fcs(sfc), loop_depth(0), top_scope(0) {}; statement* convert_stmt(statement* s); void visit_block (block* s); void visit_try_block (try_block* s); void visit_if_statement (if_statement* s); void visit_for_loop (for_loop* s); void visit_foreach_loop (foreach_loop* s); void visit_functioncall (functioncall* e); }; statement* stable_functioncall_visitor::convert_stmt (statement* s) { if (top_scope == 0 && (dynamic_cast(s) || dynamic_cast(s))) { stable_finder sf(stable_fcs); s->visit(&sf); if (sf.stable) { block* b = new block; b->tok = s->tok; b->statements.push_back(s); return b; } } else if (top_scope == 0 && !dynamic_cast(s)) { level_check lc(stable_fcs); s->visit(&lc); if (lc.stable) { block* b = new block; b->tok = s->tok; b->statements.push_back(s); return b; } } return s; } void stable_functioncall_visitor::visit_block (block* s) { block* prev_top_scope = top_scope; block* prev_scope = curr_scope; if (loop_depth == 0) top_scope = s; curr_scope = s; set current_vars = scope_vars; update_visitor::visit_block(s); if (loop_depth == 0) top_scope = prev_top_scope; curr_scope = prev_scope; scope_vars = current_vars; } void stable_functioncall_visitor::visit_try_block (try_block* s) { if (s->try_block) s->try_block = convert_stmt(s->try_block); replace(s->try_block); replace(s->catch_error_var); if (s->catch_block) s->catch_block = convert_stmt(s->catch_block); replace(s->catch_block); provide(s); } void stable_functioncall_visitor::visit_if_statement (if_statement* s) { block* prev_top_scope = top_scope; if (loop_depth == 0) top_scope = 0; replace(s->condition); s->thenblock = convert_stmt(s->thenblock); replace(s->thenblock); if (loop_depth == 0) top_scope = 0; if (s->elseblock) s->elseblock = convert_stmt(s->elseblock); replace(s->elseblock); provide(s); top_scope = prev_top_scope; } void stable_functioncall_visitor::visit_for_loop (for_loop* s) { replace(s->init); replace(s->cond); replace(s->incr); loop_depth++; s->block = convert_stmt(s->block); replace(s->block); loop_depth--; provide(s); } void stable_functioncall_visitor::visit_foreach_loop (foreach_loop* s) { for (unsigned i = 0; i < s->indexes.size(); ++i) replace(s->indexes[i]); replace(s->base); replace(s->value); replace(s->limit); loop_depth++; s->block = convert_stmt(s->block); replace(s->block); loop_depth--; provide(s); } void stable_functioncall_visitor::visit_functioncall (functioncall* e) { for (unsigned i = 0; i < e->args.size(); ++i) replace (e->args[i]); if (stable_fcs.find(e->function) != stable_fcs.end()) { string name("__stable_"); name.append(e->function).append("_value"); // Variable potentially not in scope since it is in a sibling block if (scope_vars.find(e->function) == scope_vars.end()) { if (new_vars.find(e->function) == new_vars.end()) { // New variable declaration to store result of function call vardecl* v = new vardecl; v->name = name; v->tok = e->tok; v->set_arity(0, e->tok); v->type = e->type; if (current_function) current_function->locals.push_back(v); else current_probe->locals.push_back(v); new_vars[e->function] = v; } symbol* sym = new symbol; sym->name = name; sym->tok = e->tok; sym->referent = new_vars[e->function]; sym->type = e->type; functioncall* fc = new functioncall; fc->tok = e->tok; fc->function = e->function; fc->referent = e->referent; fc->type = e->type; assignment* a = new assignment; a->tok = e->tok; a->op = "="; a->left = sym; a->right = fc; a->type = e->type; expr_statement* es = new expr_statement; es->tok = e->tok; es->value = a; // Store location of the block to put new declaration. if (loop_depth != 0) { assert(top_scope); new_stmts.push_back(make_pair(es,top_scope)); } else { assert(curr_scope); new_stmts.push_back(make_pair(es,curr_scope)); } scope_vars.insert(e->function); provide(sym); } else { symbol* sym = new symbol; sym->name = name; sym->tok = e->tok; sym->referent = new_vars[e->function]; sym->type = e->type; provide(sym); } return; } provide(e); } // Cache stable embedded-c functioncall results and replace // all calls with same name using that value to reduce duplicate // functioncall overhead. Functioncalls are pulled out of any // top-level loops and put into if/try blocks. void semantic_pass_opt7(systemtap_session& s) { set stable_fcs; for (map::iterator it = s.functions.begin(); it != s.functions.end(); ++it) { functiondecl* fn = (*it).second; stable_analysis sa; fn->body->visit(&sa); if (sa.stable) stable_fcs.insert(fn->name); } for (vector::iterator it = s.probes.begin(); it != s.probes.end(); ++it) { stable_functioncall_visitor t(s, stable_fcs); t.current_probe = *it; (*it)->body = t.convert_stmt((*it)->body); t.replace((*it)->body); for (vector >::iterator st = t.new_stmts.begin(); st != t.new_stmts.end(); ++st) st->second->statements.insert(st->second->statements.begin(), st->first); } for (map::iterator it = s.functions.begin(); it != s.functions.end(); ++it) { functiondecl* fn = (*it).second; stable_functioncall_visitor t(s, stable_fcs); t.current_function = fn; fn->body = t.convert_stmt(fn->body); t.replace(fn->body); for (vector >::iterator st = t.new_stmts.begin(); st != t.new_stmts.end(); ++st) st->second->statements.insert(st->second->statements.begin(), st->first); } } static int semantic_pass_optimize1 (systemtap_session& s) { // In this pass, we attempt to rewrite probe/function bodies to // eliminate some blatantly unnecessary code. This is run before // type inference, but after symbol resolution and derived_probe // creation. We run an outer "relaxation" loop that repeats the // optimizations until none of them find anything to remove. int rc = 0; // Save the old value of suppress_warnings, as we will be changing // it below. save_and_restore suppress_warnings(& s.suppress_warnings); bool relaxed_p = false; unsigned iterations = 0; while (! relaxed_p) { assert_no_interrupts(); relaxed_p = true; // until proven otherwise // If the verbosity is high enough, always print warnings (overrides -w), // or if not, always suppress warnings for every itteration after the first. if(s.verbose > 2) s.suppress_warnings = false; else if (iterations > 0) s.suppress_warnings = true; if (!s.unoptimized) { semantic_pass_opt1 (s, relaxed_p); semantic_pass_opt2 (s, relaxed_p, iterations); // produce some warnings only on iteration=0 semantic_pass_opt3 (s, relaxed_p); semantic_pass_opt4 (s, relaxed_p); semantic_pass_opt5 (s, relaxed_p); } // For listing mode, we need const-folding regardless of optimization so // that @defined expressions can be properly resolved. PR11360 // We also want it in case variables are used in if/case expressions, // so enable always. PR11366 // rc is incremented if there is an error that got reported. rc += semantic_pass_const_fold (s, relaxed_p); if (!s.unoptimized) semantic_pass_dead_control (s, relaxed_p); iterations ++; } return rc; } static int semantic_pass_optimize2 (systemtap_session& s) { // This is run after type inference. We run an outer "relaxation" // loop that repeats the optimizations until none of them find // anything to remove. int rc = 0; // Save the old value of suppress_warnings, as we will be changing // it below. save_and_restore suppress_warnings(& s.suppress_warnings); bool relaxed_p = false; unsigned iterations = 0; while (! relaxed_p) { assert_no_interrupts(); relaxed_p = true; // until proven otherwise // If the verbosity is high enough, always print warnings (overrides -w), // or if not, always suppress warnings for every itteration after the first. if(s.verbose > 2) s.suppress_warnings = false; else if (iterations > 0) s.suppress_warnings = true; if (!s.unoptimized) semantic_pass_opt6 (s, relaxed_p); iterations++; } if (!s.unoptimized) semantic_pass_opt7(s); return rc; } // ------------------------------------------------------------------------ // type resolution struct autocast_expanding_visitor: public var_expanding_visitor { typeresolution_info& ti; autocast_expanding_visitor (typeresolution_info& ti): ti(ti) {} void resolve_functioncall (functioncall* fc) { // This is a very limited version of semantic_pass_symbols, but we're // late in the game at this point. We won't get a chance to optimize, // but for now the only functions we expect are kernel/user_string from // pretty-printing, which don't need optimization. systemtap_session& s = ti.session; size_t nfiles = s.files.size(); symresolution_info sym (s); sym.current_function = ti.current_function; sym.current_probe = ti.current_probe; fc->visit (&sym); // NB: synthetic functions get tacked onto the origin file, so we won't // see them growing s.files[]. Traverse it directly. if (fc->referent) { functiondecl* fd = fc->referent; sym.current_function = fd; sym.current_probe = 0; fd->body->visit (&sym); } while (nfiles < s.files.size()) { stapfile* dome = s.files[nfiles++]; for (size_t i = 0; i < dome->functions.size(); ++i) { functiondecl* fd = dome->functions[i]; sym.current_function = fd; sym.current_probe = 0; fd->body->visit (&sym); // NB: not adding to s.functions just yet... } } // Add only the direct functions we need. functioncall_traversing_visitor ftv; fc->visit (&ftv); for (set::iterator it = ftv.seen.begin(); it != ftv.seen.end(); ++it) { functiondecl* fd = *it; pair::iterator,bool> inserted = s.functions.insert (make_pair (fd->name, fd)); if (!inserted.second && inserted.first->second != fd) throw SEMANTIC_ERROR (_F("resolved function '%s' conflicts with an existing function", fd->name.c_str()), fc->tok); } } void visit_autocast_op (autocast_op* e) { const bool lvalue = is_active_lvalue (e); const exp_type_ptr& details = e->operand->type_details; if (details && !e->saved_conversion_error) { functioncall* fc = details->expand (e, lvalue); if (fc) { ti.num_newly_resolved++; resolve_functioncall (fc); if (lvalue) provide_lvalue_call (fc); fc->visit (this); return; } } var_expanding_visitor::visit_autocast_op (e); } }; struct initial_typeresolution_info : public typeresolution_info { initial_typeresolution_info (systemtap_session& s): typeresolution_info(s) {} // these expressions are not supposed to make its way to the typeresolution // pass. they probably get substituted/replaced, but since this is an initial pass // and not all substitutions are done, replace the functions that throw errors. void visit_target_symbol (target_symbol* e) {} void visit_atvar_op (atvar_op* e) {} void visit_defined_op (defined_op* e) {} void visit_entry_op (entry_op* e) {} void visit_cast_op (cast_op* e) {} }; static int initial_typeres_pass(systemtap_session& s) { // minimal type resolution based off of semantic_pass_types(), without // checking for complete type resolutions or autocast expanding initial_typeresolution_info ti(s); // Globals never have detailed types. // If we null them now, then all remaining vardecls can be detailed. for (unsigned j=0; jtype_details) gd->type_details = ti.null_type; } ti.assert_resolvability = false; while (1) { assert_no_interrupts(); ti.num_newly_resolved = 0; ti.num_still_unresolved = 0; ti.num_available_autocasts = 0; for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { assert_no_interrupts(); functiondecl* fd = it->second; ti.current_probe = 0; ti.current_function = fd; ti.t = pe_unknown; fd->body->visit (& ti); } for (unsigned j=0; jbody->visit (& ti); probe_point* pp = pn->sole_location(); if (pp->condition) { ti.current_function = 0; ti.current_probe = 0; ti.t = pe_long; // NB: expected type pp->condition->visit (& ti); } } if (ti.num_newly_resolved == 0) // converged { // take into account that if there are mismatches, we'd want to know // about them incase they get whisked away, later in this process if (!ti.assert_resolvability && ti.mismatch_complexity > 0) // found a mismatch!! { ti.assert_resolvability = true; // report errors if (s.verbose > 0) ti.mismatch_complexity = 1; // print out mismatched but not unresolved type mismatches } else break; } else ti.mismatch_complexity = 0; } return s.num_errors(); } static int semantic_pass_types (systemtap_session& s) { int rc = 0; // next pass: type inference unsigned iterations = 0; typeresolution_info ti (s); // Globals never have detailed types. // If we null them now, then all remaining vardecls can be detailed. for (unsigned j=0; jtype_details) gd->type_details = ti.null_type; } ti.assert_resolvability = false; while (1) { assert_no_interrupts(); iterations ++; ti.num_newly_resolved = 0; ti.num_still_unresolved = 0; ti.num_available_autocasts = 0; for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) try { assert_no_interrupts(); functiondecl* fd = it->second; ti.current_probe = 0; ti.current_function = fd; ti.t = pe_unknown; fd->body->visit (& ti); // NB: we don't have to assert a known type for // functions here, to permit a "void" function. // The translator phase will omit the "retvalue". // // if (fd->type == pe_unknown) // ti.unresolved (fd->tok); for (unsigned i=0; i < fd->locals.size(); ++i) ti.check_local (fd->locals[i]); // Check and run the autocast expanding visitor. if (ti.num_available_autocasts > 0) { autocast_expanding_visitor aev (ti); aev.replace (fd->body); ti.num_available_autocasts = 0; } } catch (const semantic_error& e) { throw SEMANTIC_ERROR(_F("while processing function %s", it->second->name.c_str())).set_chain(e); } for (unsigned j=0; jbody->visit (& ti); for (unsigned i=0; i < pn->locals.size(); ++i) ti.check_local (pn->locals[i]); // Check and run the autocast expanding visitor. if (ti.num_available_autocasts > 0) { autocast_expanding_visitor aev (ti); aev.replace (pn->body); ti.num_available_autocasts = 0; } probe_point* pp = pn->sole_location(); if (pp->condition) { ti.current_function = 0; ti.current_probe = 0; ti.t = pe_long; // NB: expected type pp->condition->visit (& ti); } } catch (const semantic_error& e) { throw SEMANTIC_ERROR(_F("while processing probe %s", s.probes[j]->derived_locations(false).c_str())).set_chain(e); } for (unsigned j=0; jtype == pe_unknown) ti.unresolved (gd->tok); if(gd->arity == 0 && gd->wrap == true) { throw SEMANTIC_ERROR(_("wrapping not supported for scalars"), gd->tok); } } if (ti.num_newly_resolved == 0) // converged { if (ti.num_still_unresolved == 0) break; // successfully else if (! ti.assert_resolvability) { ti.assert_resolvability = true; // last pass, with error msgs if (s.verbose > 0) ti.mismatch_complexity = 0; // print every kind of mismatch } else { // unsuccessful conclusion rc ++; break; } } else ti.mismatch_complexity = 0; // reset for next pass } return rc + s.num_errors(); } struct exp_type_null : public exp_type_details { uintptr_t id () const { return 0; } bool expandable() const { return false; } functioncall *expand(autocast_op*, bool) { return NULL; } }; typeresolution_info::typeresolution_info (systemtap_session& s): session(s), num_newly_resolved(0), num_still_unresolved(0), num_available_autocasts(0), assert_resolvability(false), mismatch_complexity(0), current_function(0), current_probe(0), t(pe_unknown), null_type(new exp_type_null()) { } void typeresolution_info::visit_literal_number (literal_number* e) { assert (e->type == pe_long); if ((t == e->type) || (t == pe_unknown)) return; mismatch (e->tok, t, e->type); } void typeresolution_info::visit_literal_string (literal_string* e) { assert (e->type == pe_string); if ((t == e->type) || (t == pe_unknown)) return; mismatch (e->tok, t, e->type); } void typeresolution_info::visit_logical_or_expr (logical_or_expr *e) { visit_binary_expression (e); } void typeresolution_info::visit_logical_and_expr (logical_and_expr *e) { visit_binary_expression (e); } void typeresolution_info::visit_regex_query (regex_query *e) { // NB: result of regex query is an integer! if (t == pe_stats || t == pe_string) invalid (e->tok, t); t = pe_string; e->left->visit (this); t = pe_string; e->right->visit (this); // parser ensures this is a literal known at compile time if (e->type == pe_unknown) { e->type = pe_long; resolved (e->tok, e->type); } } void typeresolution_info::visit_comparison (comparison *e) { // NB: result of any comparison is an integer! if (t == pe_stats || t == pe_string) invalid (e->tok, t); t = (e->right->type != pe_unknown) ? e->right->type : pe_unknown; e->left->visit (this); t = (e->left->type != pe_unknown) ? e->left->type : pe_unknown; e->right->visit (this); if (e->left->type != pe_unknown && e->right->type != pe_unknown && e->left->type != e->right->type) mismatch (e); if (e->type == pe_unknown) { e->type = pe_long; resolved (e->tok, e->type); } } void typeresolution_info::visit_concatenation (concatenation *e) { if (t != pe_unknown && t != pe_string) invalid (e->tok, t); t = pe_string; e->left->visit (this); t = pe_string; e->right->visit (this); if (e->type == pe_unknown) { e->type = pe_string; resolved (e->tok, e->type); } } void typeresolution_info::visit_assignment (assignment *e) { if (t == pe_stats) invalid (e->tok, t); if (e->op == "<<<") // stats aggregation { if (t == pe_string) invalid (e->tok, t); t = pe_stats; e->left->visit (this); t = pe_long; e->right->visit (this); if (e->type == pe_unknown || e->type == pe_stats) { e->type = pe_long; resolved (e->tok, e->type); } } else if (e->left->type == pe_stats) invalid (e->left->tok, e->left->type); else if (e->right->type == pe_stats) invalid (e->right->tok, e->right->type); else if (e->op == "+=" || // numeric only e->op == "-=" || e->op == "*=" || e->op == "/=" || e->op == "%=" || e->op == "&=" || e->op == "^=" || e->op == "|=" || e->op == "<<=" || e->op == ">>=" || false) { visit_binary_expression (e); } else if (e->op == ".=" || // string only false) { if (t == pe_long || t == pe_stats) invalid (e->tok, t); t = pe_string; e->left->visit (this); t = pe_string; e->right->visit (this); if (e->type == pe_unknown) { e->type = pe_string; resolved (e->tok, e->type); } } else if (e->op == "=") // overloaded = for string & numeric operands { // logic similar to ternary_expression exp_type sub_type = t; // Infer types across the l/r values if (sub_type == pe_unknown && e->type != pe_unknown) sub_type = e->type; t = (sub_type != pe_unknown) ? sub_type : (e->right->type != pe_unknown) ? e->right->type : pe_unknown; e->left->visit (this); t = (sub_type != pe_unknown) ? sub_type : (e->left->type != pe_unknown) ? e->left->type : pe_unknown; e->right->visit (this); if ((sub_type != pe_unknown) && (e->type == pe_unknown)) { e->type = sub_type; resolved (e->tok, e->type); } if ((sub_type == pe_unknown) && (e->left->type != pe_unknown)) { e->type = e->left->type; resolved (e->tok, e->type); } if (e->left->type != pe_unknown && e->right->type != pe_unknown && e->left->type != e->right->type) mismatch (e); // Propagate type details from the RHS to the assignment if (e->type == e->right->type && e->right->type_details && !e->type_details) resolved_details(e->right->type_details, e->type_details); // Propagate type details from the assignment to the LHS if (e->type == e->left->type && e->type_details) { if (e->left->type_details && *e->left->type_details != *e->type_details && *e->left->type_details != *null_type) resolved_details(null_type, e->left->type_details); else if (!e->left->type_details) resolved_details(e->type_details, e->left->type_details); } } else throw SEMANTIC_ERROR (_("unsupported assignment operator ") + (string)e->op); } void typeresolution_info::visit_embedded_expr (embedded_expr *e) { if (e->type == pe_unknown) { if (e->code.find ("/* string */") != string::npos) e->type = pe_string; else // if (e->code.find ("/* long */") != string::npos) e->type = pe_long; resolved (e->tok, e->type); } } void typeresolution_info::visit_binary_expression (binary_expression* e) { if (t == pe_stats || t == pe_string) invalid (e->tok, t); t = pe_long; e->left->visit (this); t = pe_long; e->right->visit (this); if (e->left->type != pe_unknown && e->right->type != pe_unknown && e->left->type != e->right->type) mismatch (e); if (e->type == pe_unknown) { e->type = pe_long; resolved (e->tok, e->type); } } void typeresolution_info::visit_pre_crement (pre_crement *e) { visit_unary_expression (e); } void typeresolution_info::visit_post_crement (post_crement *e) { visit_unary_expression (e); } void typeresolution_info::visit_unary_expression (unary_expression* e) { if (t == pe_stats || t == pe_string) invalid (e->tok, t); t = pe_long; e->operand->visit (this); if (e->type == pe_unknown) { e->type = pe_long; resolved (e->tok, e->type); } } void typeresolution_info::visit_ternary_expression (ternary_expression* e) { exp_type sub_type = t; t = pe_long; e->cond->visit (this); // Infer types across the true/false arms of the ternary expression. if (sub_type == pe_unknown && e->type != pe_unknown) sub_type = e->type; t = sub_type; e->truevalue->visit (this); t = sub_type; e->falsevalue->visit (this); if ((sub_type == pe_unknown) && (e->type != pe_unknown)) ; // already resolved else if ((sub_type != pe_unknown) && (e->type == pe_unknown)) { e->type = sub_type; resolved (e->tok, e->type); } else if ((sub_type == pe_unknown) && (e->truevalue->type != pe_unknown)) { e->type = e->truevalue->type; resolved (e->tok, e->type); } else if ((sub_type == pe_unknown) && (e->falsevalue->type != pe_unknown)) { e->type = e->falsevalue->type; resolved (e->tok, e->type); } else if (e->type != sub_type) mismatch (e->tok, sub_type, e->type); // Propagate type details from both true/false branches if (!e->type_details && e->type == e->truevalue->type && e->type == e->falsevalue->type && e->truevalue->type_details && e->falsevalue->type_details && *e->truevalue->type_details == *e->falsevalue->type_details) resolved_details(e->truevalue->type_details, e->type_details); } template void resolve_2types (Referrer* referrer, Referent* referent, typeresolution_info* r, exp_type t, bool accept_unknown = false) { exp_type& re_type = referrer->type; const token* re_tok = referrer->tok; exp_type& te_type = referent->type; if (t != pe_unknown && re_type == t && re_type == te_type) ; // do nothing: all three e->types in agreement else if (t == pe_unknown && re_type != pe_unknown && re_type == te_type) ; // do nothing: two known e->types in agreement else if (re_type != pe_unknown && te_type != pe_unknown && re_type != te_type) r->mismatch (re_tok, re_type, referent); // referrer-referent else if (re_type != pe_unknown && t != pe_unknown && re_type != t) r->mismatch (re_tok, t, referent); // referrer-t else if (te_type != pe_unknown && t != pe_unknown && te_type != t) r->mismatch (re_tok, t, referent); // referent-t else if (re_type == pe_unknown && t != pe_unknown) { // propagate from upstream re_type = t; r->resolved (re_tok, re_type); // catch re_type/te_type mismatch later } else if (re_type == pe_unknown && te_type != pe_unknown) { // propagate from referent re_type = te_type; r->resolved (re_tok, re_type); // catch re_type/t mismatch later } else if (re_type != pe_unknown && te_type == pe_unknown) { // propagate to referent te_type = re_type; r->resolved (re_tok, re_type, referent); // catch re_type/t mismatch later } else if (! accept_unknown) r->unresolved (re_tok); } void typeresolution_info::visit_symbol (symbol* e) { if (e->referent == 0) throw SEMANTIC_ERROR (_F("internal error: unresolved symbol '%s'", e->name.c_str()), e->tok); resolve_2types (e, e->referent, this, t); if (e->type == e->referent->type) { // If both have type details, then they either must agree; // otherwise force them both to null. if (e->type_details && e->referent->type_details && *e->type_details != *e->referent->type_details) { resolved_details(null_type, e->type_details); resolved_details(null_type, e->referent->type_details); } else if (e->type_details && !e->referent->type_details) resolved_details(e->type_details, e->referent->type_details); else if (!e->type_details && e->referent->type_details) resolved_details(e->referent->type_details, e->type_details); } } void typeresolution_info::visit_target_symbol (target_symbol* e) { // This occurs only if a target symbol was not resolved over in // tapset.cxx land, that error was properly suppressed, and the // later unused-expression-elimination pass didn't get rid of it // either. So we have a target symbol that is believed to be of // genuine use, yet unresolved by the provider. if (session.verbose > 2) { clog << _("Resolution problem with "); if (current_function) { clog << "function " << current_function->name << endl; current_function->body->print (clog); clog << endl; } else if (current_probe) { clog << "probe " << *current_probe->sole_location() << endl; current_probe->body->print (clog); clog << endl; } else //TRANSLATORS: simply saying not an issue with a probe or function clog << _("other") << endl; } if (e->saved_conversion_error) throw (* (e->saved_conversion_error)); else throw SEMANTIC_ERROR(_("unresolved target-symbol expression"), e->tok); } void typeresolution_info::visit_atvar_op (atvar_op* e) { // This occurs only if an @var() was not resolved over in // tapset.cxx land, that error was properly suppressed, and the // later unused-expression-elimination pass didn't get rid of it // either. So we have an @var() that is believed to be of // genuine use, yet unresolved by the provider. if (session.verbose > 2) { clog << _("Resolution problem with "); if (current_function) { clog << "function " << current_function->name << endl; current_function->body->print (clog); clog << endl; } else if (current_probe) { clog << "probe " << *current_probe->sole_location() << endl; current_probe->body->print (clog); clog << endl; } else //TRANSLATORS: simply saying not an issue with a probe or function clog << _("other") << endl; } if (e->saved_conversion_error) throw (* (e->saved_conversion_error)); else throw SEMANTIC_ERROR(_("unresolved @var() expression"), e->tok); } void typeresolution_info::visit_defined_op (defined_op* e) { throw SEMANTIC_ERROR(_("unexpected @defined"), e->tok); } void typeresolution_info::visit_entry_op (entry_op* e) { throw SEMANTIC_ERROR(_("@entry is only valid in .return probes"), e->tok); } void typeresolution_info::visit_cast_op (cast_op* e) { // Like target_symbol, a cast_op shouldn't survive this far // unless it was not resolved and its value is really needed. if (e->saved_conversion_error) throw (* (e->saved_conversion_error)); else throw SEMANTIC_ERROR(_F("type definition '%s' not found in '%s'", e->type_name.c_str(), e->module.c_str()), e->tok); } void typeresolution_info::visit_autocast_op (autocast_op* e) { // Like cast_op, a implicit autocast_op shouldn't survive this far // unless it was not resolved and its value is really needed. if (assert_resolvability && e->saved_conversion_error) throw (* (e->saved_conversion_error)); else if (assert_resolvability) throw SEMANTIC_ERROR(_("unknown type in dereference"), e->tok); t = pe_long; e->operand->visit (this); num_still_unresolved++; if (e->operand->type_details && e->operand->type_details->expandable()) num_available_autocasts++; } void typeresolution_info::visit_perf_op (perf_op* e) { // A perf_op should already be resolved if (t == pe_stats || t == pe_string) invalid (e->tok, t); e->type = pe_long; // (There is no real need to visit our operand - by parser // construction, it's always a string literal, with its type already // set.) t = pe_string; e->operand->visit (this); } void typeresolution_info::visit_arrayindex (arrayindex* e) { symbol *array = NULL; hist_op *hist = NULL; classify_indexable(e->base, array, hist); // Every hist_op has type [int]:int, that is to say, every hist_op // is a pseudo-one-dimensional integer array type indexed by // integers (bucket numbers). if (hist) { if (e->indexes.size() != 1) unresolved (e->tok); t = pe_long; e->indexes[0]->visit (this); if (e->indexes[0]->type != pe_long) unresolved (e->tok); hist->visit (this); if (e->type != pe_long) { e->type = pe_long; resolved (e->tok, e->type); } return; } // Now we are left with "normal" map inference and index checking. assert (array); assert (array->referent != 0); resolve_2types (e, array->referent, this, t); // now resolve the array indexes // if (e->referent->index_types.size() == 0) // // redesignate referent as array // e->referent->set_arity (e->indexes.size ()); if (e->indexes.size() != array->referent->index_types.size()) unresolved (e->tok); // symbol resolution should prevent this else for (unsigned i=0; iindexes.size(); i++) { if (e->indexes[i]) { expression* ee = e->indexes[i]; exp_type& ft = array->referent->index_types [i]; t = ft; ee->visit (this); exp_type at = ee->type; if ((at == pe_string || at == pe_long) && ft == pe_unknown) { // propagate to formal type ft = at; resolved (ee->tok, ft, array->referent, i); } if (at == pe_stats) invalid (ee->tok, at); if (ft == pe_stats) invalid (ee->tok, ft); if (at != pe_unknown && ft != pe_unknown && ft != at) mismatch (ee->tok, ee->type, array->referent, i); if (at == pe_unknown) unresolved (ee->tok); } } } void typeresolution_info::visit_functioncall (functioncall* e) { if (e->referent == 0) throw SEMANTIC_ERROR (_F("internal error: unresolved function call to '%s'", e->function.c_str()), e->tok); resolve_2types (e, e->referent, this, t, true); // accept unknown type if (e->type == pe_stats) invalid (e->tok, e->type); const exp_type_ptr& func_type = e->referent->type_details; if (func_type && e->referent->type == e->type && (!e->type_details || *func_type != *e->type_details)) resolved_details(e->referent->type_details, e->type_details); // now resolve the function parameters if (e->args.size() != e->referent->formal_args.size()) unresolved (e->tok); // symbol resolution should prevent this else for (unsigned i=0; iargs.size(); i++) { expression* ee = e->args[i]; exp_type& ft = e->referent->formal_args[i]->type; const token* fe_tok = e->referent->formal_args[i]->tok; t = ft; ee->visit (this); exp_type at = ee->type; if (((at == pe_string) || (at == pe_long)) && ft == pe_unknown) { // propagate to formal arg ft = at; resolved (ee->tok, ft, e->referent->formal_args[i], i); } if (at == pe_stats) invalid (ee->tok, at); if (ft == pe_stats) invalid (fe_tok, ft); if (at != pe_unknown && ft != pe_unknown && ft != at) mismatch (ee->tok, ee->type, e->referent->formal_args[i], i); if (at == pe_unknown) unresolved (ee->tok); } } void typeresolution_info::visit_block (block* e) { for (unsigned i=0; istatements.size(); i++) { t = pe_unknown; e->statements[i]->visit (this); } } void typeresolution_info::visit_try_block (try_block* e) { if (e->try_block) e->try_block->visit (this); if (e->catch_error_var) { t = pe_string; e->catch_error_var->visit (this); } if (e->catch_block) e->catch_block->visit (this); } void typeresolution_info::visit_embeddedcode (embeddedcode* s) { // PR11573. If we have survived thus far with a piece of embedded // code that requires uprobes, we need to track this. // // This is an odd place for this check, as opposed // to a separate 'optimization' pass, or c_unparser::visit_embeddedcode // over yonder in pass 3. However, we want to do it during pass 2 so // that cached sessions also get the uprobes treatment. if (! session.need_uprobes && s->code.find("/* pragma:uprobes */") != string::npos) { if (session.verbose > 2) clog << _("Activating uprobes support because /* pragma:uprobes */ seen.") << endl; session.need_uprobes = true; } // PR15065. Likewise, we need to detect /* pragma:tagged_dfa */ // before the gen_dfa_table pass. Again, the typechecking part of // pass 2 is a good place for this. if (! session.need_tagged_dfa && s->code.find("/* pragma:tagged_dfa */") != string::npos) { // if (session.verbose > 2) // clog << _F("Turning on DFA subexpressions, pragma:tagged_dfa found in %s", // current_function->name.c_str()) << endl; // session.need_tagged_dfa = true; throw SEMANTIC_ERROR (_("Tagged DFA support is not yet available"), s->tok); } } void typeresolution_info::visit_if_statement (if_statement* e) { t = pe_long; e->condition->visit (this); t = pe_unknown; e->thenblock->visit (this); if (e->elseblock) { t = pe_unknown; e->elseblock->visit (this); } } void typeresolution_info::visit_for_loop (for_loop* e) { t = pe_unknown; if (e->init) e->init->visit (this); t = pe_long; e->cond->visit (this); t = pe_unknown; if (e->incr) e->incr->visit (this); t = pe_unknown; e->block->visit (this); } void typeresolution_info::visit_foreach_loop (foreach_loop* e) { // See also visit_arrayindex. // This is different in that, being a statement, we can't assign // a type to the outer array, only propagate to/from the indexes // if (e->referent->index_types.size() == 0) // // redesignate referent as array // e->referent->set_arity (e->indexes.size ()); exp_type wanted_value = pe_unknown; symbol *array = NULL; hist_op *hist = NULL; classify_indexable(e->base, array, hist); if (hist) { if (e->indexes.size() != 1) unresolved (e->tok); t = pe_long; e->indexes[0]->visit (this); if (e->indexes[0]->type != pe_long) unresolved (e->tok); hist->visit (this); wanted_value = pe_long; } else { assert (array); if (e->indexes.size() != array->referent->index_types.size()) unresolved (e->tok); // symbol resolution should prevent this else { for (unsigned i=0; iindexes.size(); i++) { expression* ee = e->indexes[i]; exp_type& ft = array->referent->index_types [i]; t = ft; ee->visit (this); exp_type at = ee->type; if ((at == pe_string || at == pe_long) && ft == pe_unknown) { // propagate to formal type ft = at; resolved (ee->tok, ee->type, array->referent, i); } if (at == pe_stats) invalid (ee->tok, at); if (ft == pe_stats) invalid (ee->tok, ft); if (at != pe_unknown && ft != pe_unknown && ft != at) mismatch (ee->tok, ee->type, array->referent, i); if (at == pe_unknown) unresolved (ee->tok); } for (unsigned i=0; iarray_slice.size(); i++) if (e->array_slice[i]) { expression* ee = e->array_slice[i]; exp_type& ft = array->referent->index_types [i]; t = ft; ee->visit (this); exp_type at = ee->type; if ((at == pe_string || at == pe_long) && ft == pe_unknown) { // propagate to formal type ft = at; resolved (ee->tok, ee->type, array->referent, i); } if (at == pe_stats) invalid (ee->tok, at); if (ft == pe_stats) invalid (ee->tok, ft); if (at != pe_unknown && ft != pe_unknown && ft != at) mismatch (ee->tok, ee->type, array->referent, i); if (at == pe_unknown) unresolved (ee->tok); } } t = pe_unknown; array->visit (this); wanted_value = array->type; } if (e->value) { if (wanted_value == pe_stats) invalid(e->value->tok, wanted_value); else if (wanted_value != pe_unknown) check_arg_type(wanted_value, e->value); else { t = pe_unknown; e->value->visit (this); } } /* Prevent @sum etc. aggregate sorting on non-statistics arrays. */ if (wanted_value != pe_unknown) if (e->sort_aggr != sc_none && wanted_value != pe_stats) invalid (array->tok, wanted_value); if (e->limit) { t = pe_long; e->limit->visit (this); } t = pe_unknown; e->block->visit (this); } void typeresolution_info::visit_null_statement (null_statement*) { } void typeresolution_info::visit_expr_statement (expr_statement* e) { t = pe_unknown; e->value->visit (this); } struct delete_statement_typeresolution_info: public throwing_visitor { typeresolution_info *parent; delete_statement_typeresolution_info (typeresolution_info *p): throwing_visitor (_("invalid operand of delete expression")), parent (p) {} void visit_arrayindex (arrayindex* e) { parent->visit_arrayindex (e); } void visit_symbol (symbol* e) { exp_type ignored = pe_unknown; assert (e->referent != 0); resolve_2types (e, e->referent, parent, ignored); } }; void typeresolution_info::visit_delete_statement (delete_statement* e) { delete_statement_typeresolution_info di (this); t = pe_unknown; e->value->visit (&di); } void typeresolution_info::visit_next_statement (next_statement*) { } void typeresolution_info::visit_break_statement (break_statement*) { } void typeresolution_info::visit_continue_statement (continue_statement*) { } void typeresolution_info::visit_array_in (array_in* e) { // all unary operators only work on numerics exp_type t1 = t; t = pe_unknown; // array value can be anything e->operand->visit (this); if (t1 == pe_unknown && e->type != pe_unknown) ; // already resolved else if (t1 == pe_string || t1 == pe_stats) mismatch (e->tok, t1, pe_long); else if (e->type == pe_unknown) { e->type = pe_long; resolved (e->tok, e->type); } } void typeresolution_info::visit_return_statement (return_statement* e) { // This is like symbol, where the referent is // the return value of the function. // translation pass will print error if (current_function == 0) return; exp_type& e_type = current_function->type; t = current_function->type; e->value->visit (this); if (e_type != pe_unknown && e->value->type != pe_unknown && e_type != e->value->type) mismatch (e->value->tok, e->value->type, current_function); if (e_type == pe_unknown && (e->value->type == pe_long || e->value->type == pe_string)) { // propagate non-statistics from value e_type = e->value->type; resolved (e->value->tok, e_type, current_function); } if (e->value->type == pe_stats) invalid (e->value->tok, e->value->type); const exp_type_ptr& value_type = e->value->type_details; if (value_type && current_function->type == e->value->type) { exp_type_ptr& func_type = current_function->type_details; if (!func_type) // The function can take on the type details of the return value. resolved_details(value_type, func_type); else if (*func_type != *value_type && *func_type != *null_type) // Conflicting return types? NO TYPE FOR YOU! resolved_details(null_type, func_type); } } void typeresolution_info::visit_print_format (print_format* e) { size_t unresolved_args = 0; if (e->hist) { e->hist->visit(this); } else if (e->print_with_format) { // If there's a format string, we can do both inference *and* // checking. // First we extract the subsequence of formatting components // which are conversions (not just literal string components) unsigned expected_num_args = 0; std::vector components; for (size_t i = 0; i < e->components.size(); ++i) { if (e->components[i].type == print_format::conv_unspecified) throw SEMANTIC_ERROR (_("Unspecified conversion in print operator format string"), e->tok); else if (e->components[i].type == print_format::conv_literal) continue; components.push_back(e->components[i]); ++expected_num_args; if (e->components[i].widthtype == print_format::width_dynamic) ++expected_num_args; if (e->components[i].prectype == print_format::prec_dynamic) ++expected_num_args; } // Then we check that the number of conversions and the number // of args agree. if (expected_num_args != e->args.size()) throw SEMANTIC_ERROR (_("Wrong number of args to formatted print operator"), e->tok); // Then we check that the types of the conversions match the types // of the args. unsigned argno = 0; for (size_t i = 0; i < components.size(); ++i) { // Check the dynamic width, if specified if (components[i].widthtype == print_format::width_dynamic) { check_arg_type (pe_long, e->args[argno]); ++argno; } // Check the dynamic precision, if specified if (components[i].prectype == print_format::prec_dynamic) { check_arg_type (pe_long, e->args[argno]); ++argno; } exp_type wanted = pe_unknown; switch (components[i].type) { case print_format::conv_unspecified: case print_format::conv_literal: assert (false); break; case print_format::conv_pointer: case print_format::conv_number: case print_format::conv_binary: case print_format::conv_char: case print_format::conv_memory: case print_format::conv_memory_hex: wanted = pe_long; break; case print_format::conv_string: wanted = pe_string; break; } assert (wanted != pe_unknown); check_arg_type (wanted, e->args[argno]); ++argno; } } else { // Without a format string, the best we can do is require that // each argument resolve to a concrete type. for (size_t i = 0; i < e->args.size(); ++i) { t = pe_unknown; e->args[i]->visit (this); if (e->args[i]->type == pe_unknown) { unresolved (e->args[i]->tok); ++unresolved_args; } } } if (unresolved_args == 0) { if (e->type == pe_unknown) { if (e->print_to_stream) e->type = pe_long; else e->type = pe_string; resolved (e->tok, e->type); } } else { e->type = pe_unknown; unresolved (e->tok); } } void typeresolution_info::visit_stat_op (stat_op* e) { t = pe_stats; e->stat->visit (this); if (e->type == pe_unknown) { e->type = pe_long; resolved (e->tok, e->type); } else if (e->type != pe_long) mismatch (e->tok, pe_long, e->type); } void typeresolution_info::visit_hist_op (hist_op* e) { t = pe_stats; e->stat->visit (this); } void typeresolution_info::check_arg_type (exp_type wanted, expression* arg) { t = wanted; arg->visit (this); if (arg->type == pe_unknown) { arg->type = wanted; resolved (arg->tok, arg->type); } else if (arg->type != wanted) { mismatch (arg->tok, wanted, arg->type); } } void typeresolution_info::check_local (vardecl* v) { if (v->arity != 0) { num_still_unresolved ++; if (assert_resolvability) session.print_error (SEMANTIC_ERROR (_("array locals not supported, missing global declaration? "), v->tok)); } if (v->type == pe_unknown) unresolved (v->tok); else if (v->type == pe_stats) { num_still_unresolved ++; if (assert_resolvability) session.print_error (SEMANTIC_ERROR (_("stat locals not supported, missing global declaration? "), v->tok)); } else if (!(v->type == pe_long || v->type == pe_string)) invalid (v->tok, v->type); } void typeresolution_info::unresolved (const token* tok) { num_still_unresolved ++; if (assert_resolvability && mismatch_complexity <= 0) { stringstream msg; msg << _("unresolved type "); session.print_error (SEMANTIC_ERROR (msg.str(), tok)); } } void typeresolution_info::invalid (const token* tok, exp_type pe) { num_still_unresolved ++; if (assert_resolvability) { stringstream msg; if (tok && tok->type == tok_operator) msg << _("invalid operator"); else msg << _("invalid type ") << pe; session.print_error (SEMANTIC_ERROR (msg.str(), tok)); } } void typeresolution_info::mismatch (const binary_expression* e) { num_still_unresolved ++; if (assert_resolvability && mismatch_complexity <= 1) { stringstream msg; msg << _F("type mismatch: left and right sides don't agree (%s vs %s)", lex_cast(e->left->type).c_str(), lex_cast(e->right->type).c_str()); session.print_error (SEMANTIC_ERROR (msg.str(), e->tok)); } else if (!assert_resolvability) mismatch_complexity = max(1, mismatch_complexity); } /* tok token where mismatch occurred * t1 type we expected (the 'good' type) * t2 type we received (the 'bad' type) * */ void typeresolution_info::mismatch (const token* tok, exp_type t1, exp_type t2) { num_still_unresolved ++; if (assert_resolvability && mismatch_complexity <= 2) { stringstream msg; msg << _F("type mismatch: expected %s", lex_cast(t1).c_str()); if (t2 != pe_unknown) msg << _F(" but found %s", lex_cast(t2).c_str()); session.print_error (SEMANTIC_ERROR (msg.str(), tok)); } else if (!assert_resolvability) mismatch_complexity = max(2, mismatch_complexity); } /* tok token where the mismatch happened * type type we received (the 'bad' type) * decl declaration of mismatched symbol * index if index-based (array index or function arg) * */ void typeresolution_info::mismatch (const token *tok, exp_type type, const symboldecl* decl, int index) { num_still_unresolved ++; if (assert_resolvability && mismatch_complexity <= 3) { assert(decl != NULL); // If mismatch is against a function parameter from within the function // itself (rather than a function call), then the index will be -1. We // check here if the decl corresponds to one of the params and if so, // adjust the index. if (current_function != NULL && index == -1) { vector& args = current_function->formal_args; for (unsigned i = 0; i < args.size() && index < 0; i++) if (args[i] == decl) index = i; } // get the declaration's original type and token const resolved_type *original = NULL; for (vector::const_iterator it = resolved_types.begin(); it != resolved_types.end() && original == NULL; ++it) { if (it->decl == decl && it->index == index) original = &(*it); } // print basic mismatch msg if we couldn't find the decl (this can happen // for explicitly typed decls e.g. myvar:long or for fabricated (already // resolved) decls e.g. __perf_read_*) if (original == NULL) { session.print_error (SEMANTIC_ERROR ( _F("type mismatch: expected %s but found %s", lex_cast(type).c_str(), lex_cast(decl->type).c_str()), tok)); return; } // print where mismatch happened and chain with origin of decl type // resolution stringstream msg; if (index >= 0) msg << _F("index %d ", index); msg << _F("type mismatch (%s)", lex_cast(type).c_str()); semantic_error err(ERR_SRC, msg.str(), tok); stringstream chain_msg; chain_msg << _("type"); if (index >= 0) chain_msg << _F(" of index %d", index); chain_msg << _F(" was first inferred here (%s)", lex_cast(decl->type).c_str()); semantic_error chain(ERR_SRC, chain_msg.str(), original->tok); err.set_chain(chain); session.print_error (err); } else if (!assert_resolvability) mismatch_complexity = max(3, mismatch_complexity); } /* tok token where resolution occurred * type type to which we resolved * decl declaration of resolved symbol * index if index-based (array index or function arg) * */ void typeresolution_info::resolved (const token *tok, exp_type type, const symboldecl* decl, int index) { num_newly_resolved ++; // We only use the resolved_types vector to give better mismatch messages // involving symbols. So don't bother adding it if we're not given a decl if (decl != NULL) { // As a fail-safe, if the decl & index is already in the vector, then // modify it instead of adding another one to ensure uniqueness. This // should never happen since we only call resolved once for each decl & // index, but better safe than sorry. (IE. if it does happen, better have // the latest resolution info for better mismatch reporting later). for (unsigned i = 0; i < resolved_types.size(); i++) { if (resolved_types[i].decl == decl && resolved_types[i].index == index) { resolved_types[i].tok = tok; return; } } resolved_type res(tok, decl, index); resolved_types.push_back(res); } } void typeresolution_info::resolved_details (const exp_type_ptr& src, exp_type_ptr& dest) { num_newly_resolved ++; dest = src; } /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/elaborate.h000066400000000000000000000414561260561570600155460ustar00rootroot00000000000000// -*- C++ -*- // Copyright (C) 2005-2015 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. #ifndef ELABORATE_H #define ELABORATE_H #include "staptree.h" #include "parse.h" #include "stringtable.h" #include #include //#include #include #include #include #include extern "C" { #include } #include "privilege.h" struct recursive_expansion_error : public semantic_error { ~recursive_expansion_error () throw () {} recursive_expansion_error (const std::string& msg, const token* t1=0): SEMANTIC_ERROR (msg, t1) {} recursive_expansion_error (const std::string& msg, const token* t1, const token* t2): SEMANTIC_ERROR (msg, t1, t2) {} }; // ------------------------------------------------------------------------ struct derived_probe; class match_node; struct symresolution_info: public traversing_visitor { protected: systemtap_session& session; public: functiondecl* current_function; derived_probe* current_probe; symresolution_info (systemtap_session& s); vardecl* find_var (interned_string name, int arity, const token *tok); functiondecl* find_function (const std::string& name, unsigned arity, const token *tok); std::set collect_functions(void); void visit_block (block *s); void visit_symbol (symbol* e); void visit_foreach_loop (foreach_loop* e); void visit_arrayindex (arrayindex* e); void visit_arrayindex (arrayindex *e, bool wildcard_ok); void visit_functioncall (functioncall* e); void visit_delete_statement (delete_statement* s); void visit_array_in (array_in *e); }; struct typeresolution_info: public visitor { typeresolution_info (systemtap_session& s); systemtap_session& session; unsigned num_newly_resolved; unsigned num_still_unresolved; unsigned num_available_autocasts; bool assert_resolvability; int mismatch_complexity; functiondecl* current_function; derived_probe* current_probe; // Holds information about a type we resolved (see PR16097) struct resolved_type { const token *tok; const symboldecl *decl; int index; resolved_type(const token *ct, const symboldecl *cdecl, int cindex): tok(ct), decl(cdecl), index(cindex) {} }; // Holds an element each time we resolve a decl. Unique by decl & index. // Possible values: // - resolved function type -> decl = functiondecl, index = -1 // - resolved function arg type -> decl = vardecl, index = index of arg // - resolved array/var type -> decl = vardecl, index = -1 // - resolved array index type -> decl = vardecl, index = index of type std::vector resolved_types; // see PR16097 void check_arg_type (exp_type wanted, expression* arg); void check_local (vardecl* v); void unresolved (const token* tok); void invalid (const token* tok, exp_type t); void mismatch (const binary_expression* e); void mismatch (const token* tok, exp_type t1, exp_type t2); void mismatch (const token* tok, exp_type type, const symboldecl* decl, int index = -1); void resolved (const token* tok, exp_type type, const symboldecl* decl = NULL, int index = -1); void resolved_details (const exp_type_ptr& src, exp_type_ptr& dest); exp_type t; // implicit parameter for nested visit call; may clobber // Upon entry to one of the visit_* calls, the incoming // `t' value is the type inferred for that node from // context. It may match or conflict with the node's // preexisting type, or it may be unknown. // Expressions with NULL type_details may be as-yet-unknown. // If they have this null_type, they're explicitly *not* a rich type. const exp_type_ptr null_type; void visit_block (block* s); void visit_try_block (try_block* s); void visit_embeddedcode (embeddedcode* s); void visit_null_statement (null_statement* s); void visit_expr_statement (expr_statement* s); void visit_if_statement (if_statement* s); void visit_for_loop (for_loop* s); void visit_foreach_loop (foreach_loop* s); void visit_return_statement (return_statement* s); void visit_delete_statement (delete_statement* s); void visit_next_statement (next_statement* s); void visit_break_statement (break_statement* s); void visit_continue_statement (continue_statement* s); void visit_literal_string (literal_string* e); void visit_literal_number (literal_number* e); void visit_embedded_expr (embedded_expr* e); void visit_binary_expression (binary_expression* e); void visit_unary_expression (unary_expression* e); void visit_pre_crement (pre_crement* e); void visit_post_crement (post_crement* e); void visit_logical_or_expr (logical_or_expr* e); void visit_logical_and_expr (logical_and_expr* e); void visit_array_in (array_in* e); void visit_regex_query (regex_query* e); void visit_comparison (comparison* e); void visit_concatenation (concatenation* e); void visit_ternary_expression (ternary_expression* e); void visit_assignment (assignment* e); void visit_symbol (symbol* e); void visit_target_symbol (target_symbol* e); void visit_arrayindex (arrayindex* e); void visit_functioncall (functioncall* e); void visit_print_format (print_format* e); void visit_stat_op (stat_op* e); void visit_hist_op (hist_op* e); void visit_cast_op (cast_op* e); void visit_autocast_op (autocast_op* e); void visit_atvar_op (atvar_op* e); void visit_defined_op (defined_op* e); void visit_entry_op (entry_op* e); void visit_perf_op (perf_op* e); }; // ------------------------------------------------------------------------ // A derived_probe is a probe that has been elaborated by // binding to a matching provider. The locations std::vector // may be smaller or larger than the base probe, since a // provider may transform it. class translator_output; struct derived_probe_group; struct derived_probe: public probe { derived_probe (probe* b, probe_point* l, bool rewrite_loc=false); probe* base; // the original parsed probe probe_point* base_pp; // the probe_point that led to this derivation derived_probe_group* group; // the group we belong to virtual ~derived_probe () {} virtual void join_group (systemtap_session& s) = 0; virtual probe_point* sole_location () const; virtual probe_point* script_location () const; virtual void printsig (std::ostream &o) const; // return arguments of probe if there virtual void getargs (std::list &) const {} void printsig_nested (std::ostream &o) const; virtual void collect_derivation_chain (std::vector &probes_list) const; virtual void collect_derivation_pp_chain (std::vector &pp_list) const; std::string derived_locations (bool firstFrom = true); virtual void print_dupe_stamp(std::ostream&) {} // To aid duplication elimination, print a stamp which uniquely identifies // the code that will be added to the probe body. (Doesn't need to be the // actual code...) virtual void initialize_probe_context_vars (translator_output*) {} // From within unparser::emit_probe, initialized any extra variables // in this probe's context locals. virtual void emit_probe_local_init (systemtap_session& s, translator_output*) {} // From within unparser::emit_probe, emit any extra processing block // for this probe. virtual void emit_privilege_assertion (translator_output*); // From within unparser::emit_probe, emit any unprivileged mode // checking for this probe. public: static void emit_common_header (translator_output* o); // from c_unparser::emit_common_header // XXX: probably can move this stuff to a probe_group::emit_module_decls static void emit_process_owner_assertion (translator_output*); // From within unparser::emit_probe, emit a check that the current // process belongs to the user. static void print_dupe_stamp_unprivileged(std::ostream& o); static void print_dupe_stamp_unprivileged_process_owner(std::ostream& o); virtual bool needs_global_locks () { return true; } // by default, probes need locks around global variables // Location of semaphores to activate sdt probes Dwarf_Addr sdt_semaphore_addr; // perf.counter probes that this probe references std::set perf_counter_refs; // index into session.probes[], set and used during translation unsigned session_index; // List of other derived probes whose conditions may be affected by // this probe. std::set probes_with_affected_conditions; }; // ------------------------------------------------------------------------ struct unparser; // Various derived classes derived_probe_group manage the // registration/invocation/unregistration of sibling probes. struct derived_probe_group { virtual ~derived_probe_group () {} virtual void emit_kernel_module_init (systemtap_session& s) {} // Similar to emit_module_init(), but code emitted here gets run // with root access. The _init-generated code may assume that it is // called only once. If that code fails at run time, it must set // rc=1 and roll back any partial initializations, for its _exit // friend will NOT be invoked. The generated code may use // pre-declared "int i, j;". Note that the message transport isn't // available, so printk()/errk() is the only output option. virtual void emit_kernel_module_exit (systemtap_session& s) {} // Similar to emit_module_exit(), but code emitted here gets run // with root access. The _exit-generated code may assume that it is // executed exactly zero times (if the _init-generated code failed) // or once. (_exit itself may be called a few times, to generate // the code in a few different places in the probe module.) The // generated code may use pre-declared "int i, j;". Note that the // message transport isn't available, so printk()/errk() is the only // output option. virtual void emit_module_decls (systemtap_session& s) = 0; // The _decls-generated code may assume that declarations such as // the context, embedded-C code, function and probe handler bodies // are all already generated. That is, _decls is called near the // end of the code generation process. It should minimize the // number of separate variables (and to a lesser extent, their // size). virtual void emit_module_init (systemtap_session& s) = 0; // The _init-generated code may assume that it is called only once. // If that code fails at run time, it must set rc=1 and roll back // any partial initializations, for its _exit friend will NOT be // invoked. The generated code may use pre-declared "int i, j;" // and set "const char* probe_point;". virtual void emit_module_post_init (systemtap_session& s) {} // The emit_module_post_init() code is called once session_state is // set to running. virtual void emit_module_refresh (systemtap_session& s) {} // The _refresh-generated code may be called multiple times during // a session run, bracketed by _init and _exit calls. // Upon failure, it must set enough state so that // a subsequent _exit call will clean up everything. // The generated code may use pre-declared "int i, j;". virtual void emit_module_exit (systemtap_session& s) = 0; // The _exit-generated code may assume that it is executed exactly // zero times (if the _init-generated code failed) or once. (_exit // itself may be called a few times, to generate the code in a few // different places in the probe module.) // The generated code may use pre-declared "int i, j;". // Support for on-the-fly operations is implemented in the runtime using a // workqueue which calls module_refresh(). Depending on the probe type, it may // not be safe to manipulate the workqueue in the context of the probe handler // (otf_safe_context() = false). In this case, we rely on a background timer // to schedule the work. Otherwise, if the probe context is safe // (otf_safe_context() = true), we can directly schedule the work. virtual bool otf_supported (systemtap_session& s) { return false; } // Support for on-the-fly arming/disarming depends on probe type virtual bool otf_safe_context (systemtap_session& s) { return false; } // Whether this probe type occurs in a safe context. To be safe, we default to // no, which means we'll rely on a background timer. }; // ------------------------------------------------------------------------ typedef std::map literal_map_t; struct derived_probe_builder { virtual void build(systemtap_session & sess, probe* base, probe_point* location, literal_map_t const & parameters, std::vector & finished_results) = 0; virtual void build_with_suffix(systemtap_session & sess, probe * use, probe_point * location, literal_map_t const & parameters, std::vector & finished_results, std::vector const & suffix); virtual ~derived_probe_builder() {} virtual void build_no_more (systemtap_session &) {} virtual bool is_alias () const { return false; } static bool has_null_param (literal_map_t const & parameters, interned_string key); static bool get_param (literal_map_t const & parameters, interned_string key, interned_string& value); static bool get_param (literal_map_t const & parameters, interned_string key, int64_t& value); static bool has_param (literal_map_t const & parameters, interned_string key); }; struct match_key { interned_string name; bool have_parameter; exp_type parameter_type; match_key(interned_string n); match_key(probe_point::component const & c); match_key & with_number(); match_key & with_string(); std::string str() const; bool operator<(match_key const & other) const; bool globmatch(match_key const & other) const; }; class match_node { typedef std::map sub_map_t; typedef std::map::iterator sub_map_iterator_t; sub_map_t sub; std::vector ends; public: match_node(); void find_and_build (systemtap_session& s, probe* p, probe_point *loc, unsigned pos, std::vector& results); std::string suggest_functors(systemtap_session& s, std::string functor); void try_suffix_expansion (systemtap_session& s, probe *p, probe_point *loc, unsigned pos, std::vector& results); void build_no_more (systemtap_session &s); void dump (systemtap_session &s, const std::string &name = ""); match_node* bind(match_key const & k); match_node* bind(interned_string k); match_node* bind_str(std::string const & k); match_node* bind_num(std::string const & k); match_node* bind_privilege(privilege_t p = privilege_t (pr_stapdev | pr_stapsys)); void bind(derived_probe_builder* e); private: privilege_t privilege; }; // ------------------------------------------------------------------------ struct alias_expansion_builder : public derived_probe_builder { probe_alias * alias; alias_expansion_builder(probe_alias * a) : alias(a) {} virtual void build(systemtap_session & sess, probe * use, probe_point * location, literal_map_t const &, std::vector & finished_results); virtual void build_with_suffix(systemtap_session & sess, probe * use, probe_point * location, literal_map_t const &, std::vector & finished_results, std::vector const & suffix); virtual bool is_alias () const { return true; } bool checkForRecursiveExpansion (probe *use); }; // ------------------------------------------------------------------------ /* struct systemtap_session moved to session.h */ int semantic_pass (systemtap_session& s); void derive_probes (systemtap_session& s, probe *p, std::vector& dps, bool optional = false, bool rethrow_errors = false); // A helper we use here and in translate, for pulling symbols out of lvalue // expressions. symbol * get_symbol_within_expression (expression *e); struct unparser; #endif // ELABORATE_H /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ systemtap-2.9/emacs/000077500000000000000000000000001260561570600145155ustar00rootroot00000000000000systemtap-2.9/emacs/systemtap-init.el000066400000000000000000000003201260561570600200240ustar00rootroot00000000000000(autoload 'systemtap-mode "systemtap-mode.el") (setq auto-mode-alist (append '(("\\.stp$" . systemtap-mode)) auto-mode-alist)) (setq auto-mode-alist (append '(("\\.stpm$" . systemtap-mode)) auto-mode-alist)) systemtap-2.9/emacs/systemtap-mode.el000066400000000000000000000133201260561570600200110ustar00rootroot00000000000000;;; systemtap-mode.el --- A mode for SystemTap ;; Copyright (C) 2008 Tomoki Sekiyama ;; Copyright (C) 2012 Rüdiger Sonderfeld ;; Authors: 2008 Tomoki Sekiyama ;; 2012 Rüdiger Sonderfeld ;; Maintainer: ruediger@c-plusplus.de ;; Keywords: tools languages ;; Version: 0.02 ;; URL: https://github.com/ruediger/systemtap-mode ;; This file is NOT part of GNU Emacs. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; This code is based on the original systemtap-mode.el written by ;; Tomoki Sekiyama. It can be found at ;; http://coderepos.org/share/browser/lang/elisp/systemtap-mode/systemtap-mode.el?format=txt ;; TODO: ;; - indent embedded-C %{ ... %} correctly ;; - add parameter for indentation ;; - ... ;;; Code: (defconst systemtap-mode-version "0.02" "SystemTap Mode version number.") (defgroup systemtap-mode nil "A mode for SystemTap." :prefix "systemtap-" :group 'tools :group 'languages) (require 'cc-mode) (require 'cc-awk) (eval-when-compile (require 'cc-langs) (require 'cc-fonts) (require 'cl)) (eval-and-compile (c-add-language 'systemtap-mode 'awk-mode)) ;; Syntax definitions for SystemTap (c-lang-defconst c-primitive-type-kwds systemtap '("string" "long" "global")) (c-lang-defconst c-modifier-kwds systemtap (append '("probe" "function") (c-lang-const c-modifier-kwds))) (c-lang-defconst c-block-stmt-2-kwds systemtap '("else" "for" "foreach" "if" "while")) (c-lang-defconst c-simple-stmt-kwds systemtap '("break" "continue" "delete" "next" "return")) (c-lang-defconst c-identifier-syntax-modifications systemtap '((?. . "_") (?' . "."))) (defcustom systemtap-font-lock-extra-types nil "Font-lock extra types for SystemTap mode." :group 'systemtap-mode) (defconst systemtap-font-lock-keywords-1 (c-lang-const c-matchers-1 systemtap) "Minimal highlighting for SystemTap mode.") (defconst systemtap-font-lock-keywords-2 (c-lang-const c-matchers-2 systemtap) "Fast normal highlighting for SystemTap mode.") (defconst systemtap-font-lock-keywords-3 (c-lang-const c-matchers-3 systemtap) "Accurate normal highlighting for SystemTap mode.") (defvar systemtap-font-lock-keywords systemtap-font-lock-keywords-3 "Default expressions to highlight in SystemTap mode.") (defvar systemtap-mode-syntax-table nil "Syntax table used in systemtap-mode buffers.") (unless systemtap-mode-syntax-table (setq systemtap-mode-syntax-table (funcall (c-lang-const c-make-mode-syntax-table systemtap)))) (defvar systemtap-mode-abbrev-table nil "Abbreviation table used in systemtap-mode buffers.") (defvar systemtap-mode-map (let ((map (c-make-inherited-keymap))) (define-key map "\C-ce" 'systemtap-execute-script) (define-key map "\C-cc" 'systemtap-interrupt-script) map) "Keymap used in systemtap-mode buffers.") (easy-menu-define systemtap-menu systemtap-mode-map "SystemTap Mode Commands" (cons "SystemTap" (append '(["Execute This Script" systemtap-execute-script t] ["Interrupt Execution of Script" systemtap-interrupt-script (get-process "systemtap-script")] "----") (c-lang-const c-mode-menu systemtap)))) ;; Execution function of Current Script (defvar systemtap-buffer-name "*SystemTap*" "Name of the SystemTap execution buffer.") (defcustom systemtap-stap-program "stap" "SystemTap's stap program to execute scripts." :type 'file :group 'systemtap-mode) (defcustom systemtap-stap-options '("-v") "A list of options to give to stap." :type '(repeat string) :group 'systemtap-mode) (defun systemtap-execute-script () "Execute current SystemTap script." (interactive) (when (get-buffer systemtap-buffer-name) (kill-buffer systemtap-buffer-name)) (get-buffer-create systemtap-buffer-name) (display-buffer systemtap-buffer-name) (let* ((file-name (buffer-file-name)) (options (append systemtap-stap-options (list file-name)))) (apply #'start-process "systemtap-script" systemtap-buffer-name systemtap-stap-program options)) (message "Execution of SystemTap script started.")) (defun systemtap-interrupt-script () "Interrupt running SystemTap script." (interactive) (interrupt-process "systemtap-script") (message "SystemTap script is interrupted.")) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.stp\\'" . systemtap-mode)) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.stpm\\'" . systemtap-mode)) (require 'simple) ;;;###autoload ; prog-mode is newer than emacs 23 (define-derived-mode systemtap-mode fundamental-mode "SystemTap" "Major mode for editing SystemTap scripts. Key bindings: \\{systemtap-mode-map}" :group 'systemtap :syntax-table systemtap-mode-syntax-table :abbrev-table systemtap-mode-abbrev-table (c-initialize-cc-mode t) (use-local-map systemtap-mode-map) (c-init-language-vars systemtap-mode) (c-common-init 'systemtap-mode) (easy-menu-add systemtap-menu) (c-run-mode-hooks 'c-mode-common-hook) (c-update-modeline)) (provide 'systemtap-mode) ;;; systemtap-mode.el ends here systemtap-2.9/git_version.sh000077500000000000000000000270231260561570600163200ustar00rootroot00000000000000#!/bin/sh # # Generate some basic versioning information which can be piped to a header. # # Copyright (c) 2006-2007 Luc Verhaegen # Copyright (C) 2007 Hans Ulrich Niedermann # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # # This script is based on the one written for xf86-video-unichrome by # Luc Verhaegen, but was rewritten almost completely by Hans Ulrich # Niedermann. The script contains a few bug fixes from Egbert Eich, # Matthias Hopf, Joerg Sonnenberger, and possibly others. # # The author thanks the nice people on #git for the assistance. # # Simple testing of this script: # /sbin/busybox sh git_version.sh --example > moo.c \ # && gcc -Wall -Wextra -Wno-unused -o moo moo.c \ # && ./moo # (bash should also do) # # For how to hook this up to your automake- and/or imake-based build # system, best take a look at how the RadeonHD.am and/or RadeonHD.tmpl # work in the xf86-video-radeonhd build system. For non-recursive make, # you can probably make things a little bit simpler. # # KNOWN BUGS: # * Uses hyphenated ("git-foo-bar") program names, which git upstream # have declared deprecated. # # Help messages USAGE="[