New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
commit "replace many SvTYPE assertions with lookup tables" adds unused on non-DEBUGGING tables #13976
Comments
From @bulk88Created by @bulk88f1fb874 added a bunch of tables that are exported/extern in 5.15.0 . These tables are only used on DEBUGGING builds. The declarations need to be ifdefed away on non-DEBUGGING and a skip added to makedef.pl. Removing the tables will save 0x10*6 bytes of C tables/arrays from the image+exporting/symbol name string overhead. Perl Info
|
From @bulk880001-static-misc-things-in-dist-threads-threads.xs.patch>From c16920bcbecb9e90f35c8bcac8dd88a7058c39c5 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Sun, 6 Jul 2014 02:59:02 -0400
Subject: [PATCH] static misc things in /dist/threads/threads.xs
there is no reason for these functions to be exported on a linux build,
since they aren't exported on Win32, also consting ithread_vtbl allows
more memory to be shared between perl procs
---
dist/threads/lib/threads.pm | 2 +-
dist/threads/threads.xs | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm
index c395d7b..ff41a20 100644
--- a/dist/threads/lib/threads.pm
+++ b/dist/threads/lib/threads.pm
@@ -5,7 +5,7 @@ use 5.008;
use strict;
use warnings;
-our $VERSION = '1.94';
+our $VERSION = '1.95';
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
diff --git a/dist/threads/threads.xs b/dist/threads/threads.xs
index 6175ba7..5b44a38 100644
--- a/dist/threads/threads.xs
+++ b/dist/threads/threads.xs
@@ -346,7 +346,7 @@ S_exit_warning(pTHX)
/* Called from perl_destruct() in each thread. If it's the main thread,
* stop it from freeing everything if there are other threads still running.
*/
-int
+STATIC int
Perl_ithread_hook(pTHX)
{
dMY_POOL;
@@ -356,7 +356,7 @@ Perl_ithread_hook(pTHX)
/* MAGIC (in mg.h sense) hooks */
-int
+STATIC int
ithread_mg_get(pTHX_ SV *sv, MAGIC *mg)
{
ithread *thread = (ithread *)mg->mg_ptr;
@@ -365,7 +365,7 @@ ithread_mg_get(pTHX_ SV *sv, MAGIC *mg)
return (0);
}
-int
+STATIC int
ithread_mg_free(pTHX_ SV *sv, MAGIC *mg)
{
ithread *thread = (ithread *)mg->mg_ptr;
@@ -375,7 +375,7 @@ ithread_mg_free(pTHX_ SV *sv, MAGIC *mg)
return (0);
}
-int
+STATIC int
ithread_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
{
PERL_UNUSED_ARG(param);
@@ -383,7 +383,7 @@ ithread_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
-MGVTBL ithread_vtbl = {
+STATIC const MGVTBL ithread_vtbl = {
ithread_mg_get, /* get */
0, /* set */
0, /* len */
--
1.7.9.msysgit.0
|
From @tonycozOn Wed Jul 09 21:35:32 2014, bulk88 wrote:
You attached the following patch:
there is no reason for these functions to be exported on a linux build, which was applied as e45636e. Was there meant to be another patch? Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88On Wed Jul 09 22:12:11 2014, tonyc wrote:
Whoops. There is no patch. I dont have the time ATM to pursue this, so I'm making it a plain old ticket/report. -- |
From @tonycozOn Wed Jul 09 21:35:32 2014, bulk88 wrote:
Unfortunately parts of re (ext/re/) are built with DEBUGGING defined, so these arrays are uses there. |
From @tonycozOn Tue Oct 21 16:41:36 2014, tonyc wrote:
Maybe, one day, I'll read what I type. Tony |
From @bulk88On Tue Oct 21 16:41:36 2014, tonyc wrote:
I tried to move the PL_valid* tables to be per module static on non-DEBUGGING core but DEBUGGING module modules (cough cough re::*) but I discovered if core is non-DEBUGGING, re.dll doesn't import PL_valid_* and assert(). Is that a bug? Is it a Win32 specific bug? should re:: on non-DEBUGGING core have assert() on? It probably has something to do with the -DNDEBUG that Win32 builds do but Unix dont. -- |
Given the submitted patch in this case is applied, I am closing this case. @bulk88 please submit a pull request if you have further changes. Thanks! |
Migrated from rt.perl.org#122262 (status was 'open')
Searchable as RT122262$
The text was updated successfully, but these errors were encountered: