summaryrefslogtreecommitdiff
path: root/run.c
Commit message (Collapse)AuthorAgeFilesLines
* rename and function-ise dtrace macrosDavid Mitchell2016-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit: 1. Renames the various dtrace probe macros into a consistent and self-documenting pattern, e.g. ENTRY_PROBE => PERL_DTRACE_PROBE_ENTRY RETURN_PROBE => PERL_DTRACE_PROBE_RETURN Since they're supposed to be defined only under PERL_CORE, this shouldn't break anything that's not being naughty. 2. Implement the main body of these macros using a real function. They were formerly defined along the lines of if (PERL_SUB_ENTRY_ENABLED()) PERL_SUB_ENTRY(...); The PERL_SUB_ENTRY() part is a macro generated by the dtrace system, which for example on linux expands to a large bunch of assembly directives. Replace the direct macro with a function wrapper, e.g. if (PERL_SUB_ENTRY_ENABLED()) Perl_dtrace_probe_call(aTHX_ cv, TRUE); This reduces to once the number of times the macro is expanded. The new functions also take simpler args and then process the values they need using intermediate temporary vars to avoid huge macro expansions. For example ENTRY_PROBE(CvNAMED(cv) ? HEK_KEY(CvNAME_HEK(cv)) : GvENAME(CvGV(cv)), CopFILE((const COP *)CvSTART(cv)), CopLINE((const COP *)CvSTART(cv)), CopSTASHPV((const COP *)CvSTART(cv))); is now PERL_DTRACE_PROBE_ENTRY(cv); This reduces the executable size by 1K on -O2 -Dusedtrace builds, and by 45K on -DDEBUGGING -Dusedtrace builds.
* Replace common Emacs file-local variables with dir-localsDagfinn Ilmari Mannsåker2015-03-221-6/+0
| | | | | | | | | | | | | | | | An empty cpan/.dir-locals.el stops Emacs using the core defaults for code imported from CPAN. Committer's work: To keep t/porting/cmp_version.t and t/porting/utils.t happy, $VERSION needed to be incremented in many files, including throughout dist/PathTools. perldelta entry for module updates. Add two Emacs control files to MANIFEST; re-sort MANIFEST. For: RT #124119.
* Remove or downgrade unnecessary dVAR.Jarkko Hietaniemi2014-06-251-1/+0
| | | | | | | | You need to configure with g++ *and* -Accflags=-DPERL_GLOBAL_STRUCT or -Accflags=-DPERL_GLOBAL_STRUCT_PRIVATE to see any difference. (g++ does not do the "post-annotation" form of "unused".) The version code has some of these issues, reported upstream.
* Remove PERL_ASYNC_CHECK() from Perl_leave_scope().Nicholas Clark2013-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PERL_ASYNC_CHECK() was added to Perl_leave_scope() as part of commit f410a2119920dd04, which moved signal dispatch from the runloop to control flow ops, to mitigate nearly all of the speed cost of safe signals. The assumption was that scope exit was a safe place to dispatch signals. However, this is not true, as parts of the regex engine call leave_scope(), the regex engine stores some state in per-interpreter variables, and code called within signal handlers can change these values. Hence remove the call to PERL_ASYNC_CHECK() from Perl_leave_scope(), and add it explicitly in the various OPs which were relying on their call to leave_scope() to dispatch any pending signals. Also add a PERL_ASYNC_CHECK() to the exit of the runloop, which ensures signals still dispatch from S_sortcv() and S_sortcv_stacked(), as well as addressing one of the concerns in the commit message of f410a2119920dd04: Subtle bugs might remain - there might be constructions that enter the runloop (where signals used to be dispatched) but don't contain any PERL_ASYNC_CHECK() calls themselves. Finally, move the PERL_ASYNC_CHECK(); added by that commit to pp_goto to the end of the function, to be consistent with the positioning of all other PERL_ASYNC_CHECK() calls - at the beginning or end of OP functions, hence just before the return to or just after the call from the runloop, and hence effectively at the same point as the previous location of PERL_ASYNC_CHECK() in the runloop.
* "op-entry" DTrace probeShawn M Moore2012-08-281-0/+2
|
* Omnibus removal of register declarationsKarl Williamson2012-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes most register declarations in C code (and accompanying documentation) in the Perl core. Retained are those in the ext directory, Configure, and those that are associated with assembly language. See: http://stackoverflow.com/questions/314994/whats-a-good-example-of-register-variable-usage-in-c which says, in part: There is no good example of register usage when using modern compilers (read: last 10+ years) because it almost never does any good and can do some bad. When you use register, you are telling the compiler "I know how to optimize my code better than you do" which is almost never the case. One of three things can happen when you use register: The compiler ignores it, this is most likely. In this case the only harm is that you cannot take the address of the variable in the code. The compiler honors your request and as a result the code runs slower. The compiler honors your request and the code runs faster, this is the least likely scenario. Even if one compiler produces better code when you use register, there is no reason to believe another will do the same. If you have some critical code that the compiler is not optimizing well enough your best bet is probably to use assembler for that part anyway but of course do the appropriate profiling to verify the generated code is really a problem first.
* update the editor hints for spaces, not tabsRicardo Signes2012-05-291-2/+2
| | | | | This updates the editor hints in our files for Emacs and vim to request that tabs be inserted as spaces.
* Convert some files from Latin-1 to UTF-8Keith Thompson2011-09-071-1/+1
|
* Remove CALL_FPTR and CPERLscope.Ben Morrow2010-08-201-1/+1
| | | | | | | | | | | | | | | | These are left from PERL_OBJECT, which was an implementation of multiplicity using C++ objects. PERL_OBJECT was removed in 5.8, but the macros seem to have been cargo-culted all over the core (including in places where they would have been inappropriate originally). Since they now do exactly nothing, it's cleaner to remove them. I have left the definitions in perl.h, under #ifndef PERL_CORE, since some CPAN XS code uses them (also often incorrectly). I have also left STATIC alone, since it seems potentially more useful and is much more ingrained. The only appearance of these macros this patch doesn't touch is in Devel-PPPort, because that's a CPAN module.
* Avoid redundant reload of PL_op in the runloop.Hugo van der Sanden2010-04-151-1/+2
| | | | (gcc, at least, generates suboptimal code without this dirty great hint)
* Move PERL_ASYNC_CHECK() from the runloop to control flow OPs.Nicholas Clark2010-04-151-1/+0
| | | | | | | | | For the typical code this gives a 5% speedup, and removes the cost of "safe signals". Tight looping code will show less gains, but should never be slower. Subtle bugs might remain - there might be constructions that enter the runloop (where signals used to be dispatched) but don't contain any PERL_ASYNC_CHECK() calls themselves.
* PATCH: Large omnibus patch to clean up the JRRT quotesTom Christiansen2008-11-021-3/+5
| | | | | | Message-ID: <25940.1225611819@chthon> Date: Sun, 02 Nov 2008 01:43:39 -0600 p4raw-id: //depot/perl@34698
* Update copyright years (including some years where we made changes butNicholas Clark2006-01-081-1/+1
| | | | | did not update) p4raw-id: //depot/perl@26732
* sprinkle dVARJarkko Hietaniemi2006-01-061-0/+1
| | | | | Message-ID: <43BE7C4D.1010302@gmail.com> p4raw-id: //depot/perl@26675
* Include vim/emacs modelines in generated files to open themRafael Garcia-Suarez2005-05-111-2/+2
| | | | | | in read-only mode. Make vi modelines compatible with non-vim vi versions. p4raw-id: //depot/perl@24445
* Add editor boilerplates to all C filesRafael Garcia-Suarez2005-05-101-0/+9
| | | | | (except the generated ones) p4raw-id: //depot/perl@24440
* more typo fixes for change 3176 (comments at top of .c files)Dave Mitchell2004-08-031-1/+1
| | | p4raw-id: //depot/perl@23187
* Add comment to the top of most .c files explaining their purposeDave Mitchell2004-07-311-0/+13
| | | p4raw-id: //depot/perl@23176
* Fix up Larry's copyright statements to my best knowledge.Jarkko Hietaniemi2003-04-161-1/+2
| | | | | | | (Lots of Perl 5 source code archaeology was involved.) Larry didn't make strangled noises when I showed him the patch, either :-) p4raw-id: //depot/perl@19242
* Reverse copyright update (#18801) for files not changed in 2003.Hugo van der Sanden2003-03-021-1/+1
| | | p4raw-id: //depot/perl@18807
* Update all copyrights to 2003, from JarkkoHugo van der Sanden2003-03-021-1/+1
| | | p4raw-id: //depot/perl@18801
* Copyright++. (Not all the toplevel *.h have one, it seems.)Jarkko Hietaniemi2002-01-231-1/+1
| | | p4raw-id: //depot/perl@14391
* runtime runops switchIlya Zakharevich2001-11-161-137/+0
| | | | | Message-ID: <20011116004809.A934@math.ohio-state.edu> p4raw-id: //depot/perl@13044
* Custom OpsSimon Cozens2001-08-271-1/+1
| | | | | | Message-ID: <20010825174509.A5752@netthink.co.uk> I also added a fix to Opcode.pm to quite test cases. p4raw-id: //depot/perl@11756
* -Wall cleanup continues.Jarkko Hietaniemi2001-06-021-6/+8
| | | p4raw-id: //depot/perl@10392
* Simplify deb_curcv() a bitBenjamin Sugars2001-05-091-2/+0
| | | | | Message-ID: <Pine.LNX.4.21.0105091811340.1160-100000@marmot.rim.canoe.ca> p4raw-id: //depot/perl@10062
* MULTIPLICITY/DEBUGGING build fix.Nick Ing-Simmons2001-05-091-1/+1
| | | p4raw-id: //depot/perlio@10045
* Re: [PATCH] Find the last of the missing pad variables Benjamin Sugars2001-05-081-3/+4
| | | | | Message-ID: <Pine.LNX.4.21.0105080912370.1930-100000@marmot.rim.canoe.ca> p4raw-id: //depot/perl@10033
* Help -Dt show correct pad variablesBenjamin Sugars2001-05-071-6/+34
| | | | | Message-ID: <Pine.LNX.4.21.0105061142040.12858-100000@localhost.localdomain> p4raw-id: //depot/perl@10015
* Integrate changes #9259,9260 from maintperl into mainline.Jarkko Hietaniemi2001-03-201-1/+1
| | | | | | | | | | | | | Subject: [MacPerl-Porters] [PATCH] POSIX, File::Path (Mac OS) for 5.6.1 and 5.7 Subject: [PATCH perl-5.6.1-TRIAL3/run.c] printf warning p4raw-link: @9260 on //depot/maint-5.6/perl: b83ee361c1b8f0045f0125bffa546780643848c4 p4raw-link: @9259 on //depot/maint-5.6/perl: 5a271d91b72f558a378756b049d1040c9ff0a63c p4raw-id: //depot/perl@9261 p4raw-integrated: from //depot/maint-5.6/perl@9258 'copy in' lib/File/Path.pm (@8175..) 'merge in' ext/POSIX/POSIX.xs (@8885..) run.c (@8987..)
* -Dt padsv($var)Dave Mitchell2001-02-261-0/+11
| | | | | Message-Id: <200102261101.LAA12915@tiree.fdgroup.co.uk> p4raw-id: //depot/perl@8947
* Bump up Larry's copyright.Jarkko Hietaniemi2001-01-011-1/+1
| | | p4raw-id: //depot/perl@8289
* dTHR is a nop in 5.6.0 onwards. Ergo, it can go.Jarkko Hietaniemi2000-12-051-4/+0
| | | p4raw-id: //depot/perl@7984
* fixes for most warnings identified by gcc -WallGurusamy Sarathy2000-03-051-2/+2
| | | p4raw-id: //depot/perl@5540
* set SvUTF8 on vectors only if there are chars > 127; update copyrightGurusamy Sarathy2000-02-061-1/+1
| | | | | years (from Gisle Aas) p4raw-id: //depot/perl@5009
* minor USE_ITHREADS tweaksGurusamy Sarathy1999-12-011-2/+2
| | | p4raw-id: //depot/perl@4603
* more complete pseudo-fork() support for WindowsGurusamy Sarathy1999-12-011-1/+1
| | | p4raw-id: //depot/perl@4602
* fix problem pointer castsGurusamy Sarathy1999-11-141-1/+2
| | | p4raw-id: //depot/perl@4583
* Integrate with Sarathy.Jarkko Hietaniemi1999-11-111-2/+2
|\ | | | | p4raw-id: //depot/cfgperl@4549
| * preliminary support for GVOP indirection via padGurusamy Sarathy1999-11-081-2/+2
| | | | | | p4raw-id: //depot/perl@4539
* | Incremental Mac integration from Matthias.Jarkko Hietaniemi1999-11-041-6/+2
| | | | | | p4raw-id: //depot/cfgperl@4512
* | Initial integration of the MacPerl changes form Matthias.Jarkko Hietaniemi1999-11-021-1/+8
|/ | | p4raw-id: //depot/cfgperl@4508
* usurp GVOP slot for new PADOP (one small step to making optreeGurusamy Sarathy1999-10-291-2/+2
| | | | | shareable across interpreters) p4raw-id: //depot/perl@4484
* More printf-fixes (see also #4426).Jarkko Hietaniemi1999-10-231-4/+5
| | | p4raw-id: //depot/cfgperl@4429
* deadcode removalGurusamy Sarathy1999-08-291-8/+2
| | | p4raw-id: //depot/perl@4034
* fixes for logical bugs in the lexwarn patch; other tweaks to avoidGurusamy Sarathy1999-07-081-2/+3
| | | | | type mismatch problems p4raw-id: //depot/perl@3658
* lexical warnings update (warning.t fails one testPaul Marquess1999-07-071-2/+2
| | | | | | | due to leaked scalar, investigation pending) Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB29C6C8E@mbtlipnt02.btlabs.bt.co.uk> Subject: [PATCH 5.005_57] Lexical Warnings - mandatory warning are now default warnings p4raw-id: //depot/perl@3640
* fix small nitsGurusamy Sarathy1999-06-101-2/+2
| | | p4raw-id: //depot/perl@3526
* more complete support for implicit thread/interpreter pointer,Gurusamy Sarathy1999-06-091-3/+3
| | | | | | | | | | | | | | | | | | | | | enabled via -DPERL_IMPLICIT_CONTEXT (all changes are noops without that enabled): - USE_THREADS now enables PERL_IMPLICIT_CONTEXT, so dTHR is a noop; tests pass on Solaris; should be faster now! - MULTIPLICITY has been tested with and without PERL_IMPLICIT_CONTEXT on Solaris - improved function database now merged with embed.pl - everything except the varargs functions have foo(a,b,c) macros to provide compatibility - varargs functions default to compatibility variants that get the context pointer using dTHX - there should be almost no source compatibility issues as a result of all this - dl_foo.xs changes other than dl_dlopen.xs untested - still needs documentation, fixups for win32 etc Next step: migrate most non-mutex variables from perlvars.h to intrpvar.h p4raw-id: //depot/perl@3524
* initial stub implementation of implicit thread/thisGurusamy Sarathy1999-06-071-13/+7
| | | | | | | | | | | | pointer argument; builds/tests on Solaris, win32 hasn't been fixed up yet; proto.h, global.sym and static function decls are now generated from a common database in proto.pl; some inconsistently named perl_foo() things are now Perl_foo(), compatibility #defines provided; perl_foo() (lowercase 'p') reserved for functions that take an explicit context argument; next step: generate #define foo(a,b) Perl_foo(aTHX_ a,b) p4raw-id: //depot/perl@3522