ly works in a specific time zone. I have
committed (rev 29938) an alteration to this patch, which calculates the
date/time corresponding to -1.
This should now be self-adjusting for various time zones.
Regards
Peter Gibbs
these implementions to our
version of sprintf.
Regards
Peter Gibbs
- Original Message -
From: "Will Coleda" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 25, 2008 10:31 PM
Subject: Re: [perl #57260] [BUG] Segfaults in sprintf opcode
On Fri, Jul 25, 2008 at 4:23 PM, Peter Gibbs via RT
<[EMAIL PROTECTED]
ry to do the perl-specific stuff.
Regards
Peter Gibbs
- Original Message -
From: "Geoffrey Broadwell" <[EMAIL PROTECTED]>
To: "Peter Gibbs" <[EMAIL PROTECTED]>
Cc: "Christoph Otto" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 25, 2008 6:09 PM
Subject: Re: [perl #57260] [
negative field length is equivalent to a
minus option and the absolute length. The following patch has been
applied in revision 29735.
Appropriate tests to be added later.
Regards
Peter Gibbs
Index: src/spf_render.c
===
---
89)
+++ src/gc/dod.c(working copy)
@@ -883,6 +883,10 @@
lo_var_ptr = tmp_ptr;
}
+# ifdef VALGRIND
+VALGRIND_MAKE_READABLE(hi_var_ptr, lo_var_ptr - hi_var_ptr);
+# endif
+
/* Get the expected prefix */
prefix = mask & buffer_min;
--
Peter Gibbs
- Original Message -
From: "chromatic" <[EMAIL PROTECTED]>
Sent: Saturday, March 15, 2008 10:45 PM
On Saturday 15 March 2008 13:40:13 Peter Gibbs wrote:
Incidentally, I found the following useful to stop valgrind
complaining
about uninitialized values causes by w
- Original Message -
From: "Will Coleda" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Perl6 Internals"
<[EMAIL PROTECTED]>
Sent: Monday, February 25, 2008 4:00 AM
Subject: Re: [perl #51136] [BUG] Segfault in Parrot_Ref_morph
On Sun, Feb 2
This calls the generic object morph function, which uses the aforementioned
guts to dispatch to the appropriate class function - oops!
As a workaround for now, I suggest commenting out the call to
VTABLE_destroy, which will cause memory leaks but not segfaults. I will work
on a proper solution lat
http://rgrjr.dyndns.org/
Hi Bob
Please try revision 26025. This should be a full fix for the problem I
started working on in r25990.
Regards
Peter Gibbs
Removing the setting of the flag breaks assertions in
Parrot_register_HLL*, but these need to be fixed.
Peter Gibbs
nt, and
behaves accordingly. I strongly suspect that most, if not all, the other
failures stem from the same logic.
There are two apparent solutions: check all notnull arguments before
calling the functions or remove the nonnull attribute where it is not
true.
Regards
Peter Gibbs
> +if (p && *p != '#') {
Patch applied.
Many thanks
Peter Gibbs
EmKel Systems
n32 is now just plain broken,
as I do not have facilities to test it)
Regards
Peter Gibbs
EmKel Systems
hether exec-shield is active, only that
there is an mprotect function with the appropriate attribute constants.
Regards
Peter Gibbs
EmKel Systems
alized function, e.g.:
> - mem_alloc_executable
> - mem_realloc_executable
> - mem_flush_executable
> - mem_free_executable
Note that JIT already fails under Fedora Core 1 because of 'Exec-Shield'
, which is the Linux equivalent of the functionality described by
Jonathan.
Regards
Peter Gibbs
EmKel Systems
2.4.22-1.2115.nptlsmp #1 SMP Wed Oct 29 15:30:09 EST 2003
i686 i686 i386 GNU/Linux
gcc --version
gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
Please let me know if there is any further testing that would help.
Regards
Peter Gibbs
EmKel Systems
benchmark went from approx. 4.01/5.88 seconds to 3.97/5.31
seconds on my system.
The behaviour of the decode_and_advance functions in the various
encodings still needs proper testing; this will follow during the
weekend.
Regards
Peter Gibbs
EmKel Systems
eturn 1;
}
return 0;
For the hash_utf8 benchmark with the current code I get numbers like:
3.758691
5.535916
With the above iterator code (and the UTF8 decode_and_advance function
implemented) I get:
3.757812
4.844776
Does anybody think this is worth implementing?
Regards
Peter Gibbs
EmKel Systems
check to see if I've broken anything too badly.
Regards
Peter Gibbs
EmKel Systems
Peter Gibbs
EmKel Systems
"Michael Scott" <[EMAIL PROTECTED]> wrote:
> Since the enum will specify what you yourself call character classes
> can't we call the function is_charclass() instead?
The isascii etc macros have been defined in a header called ctype.h for
some time, and glibc actually has a macro 'isctype' whic
switch statement,
versus individual wrappers for each class.
I prefer the single function approach, so that is what I will start
implementing if there are no timeous objections.
Regards
Peter Gibbs
EmKel Systems
_unicode, /* from_unicode() */
Incorrect prototype for this function, now fixed - please try again.
Thanks
Peter Gibbs
e sequence 'DIGIT ONE' 'DIGIT TWO' 'TAMIL DIGIT THREE' result
in twelve or one hundred and twenty three?
3) What should 'DIGIT ONE' 'VULGAR FRACTION ONE QUARTER' produce?
Any thoughts regarding signs, decimal points, exponent indicators etc. are
also welcome
--
Peter Gibbs
EmKel Systems
her development.
All feedback welcome
--
Peter Gibbs
EmKel Systems
Leopold Toetsch wrote:
> Peter Gibbs <[EMAIL PROTECTED]> wrote:
> > +if (!chartype_array)
> >chartype_init();
> > +if (!encoding_array)
> >encoding_init();
>
> T think, both should be done at interpreter startup, called
or the less simple ones.
The current methods for both digit handling and transcoding are
context-free,
which I suspect may become a problem later; if so, some form of iterator
with
context information will be required.
--
Peter Gibbs
EmKel Systems
values
to digit values
3) Add a pointer to the above struct to the CHARTYPE structure
Any comments on the above before I go ahead?
--
Peter Gibbs
EmKel Systems
turn the concatenation of the elements.
Iterator code has been amended to iterate into the elements.
Work is ongoing to handle substr, etc.
Comments welcome.
--
Peter Gibbs
EmKel Systems
nt *length);
};
--
--
Peter Gibbs
EmKel Systems
I I
040 i s t h e s a m e a s U
060 T F 8 \n
[EMAIL PROTECTED] parrot]$ uname -a
Linux linux01.emkel.co.za 2.2.23 #2 Sun Apr 20 12:00:21 SAST 2003 i586
unknown
--
Peter Gibbs
EmKel Systems
ever seems to have cancelled my privileges :-)
--
Peter Gibbs
EmKel Systems
Index: include/parrot/unicode.h
===
RCS file: /cvs/public/parrot/include/parrot/unicode.h,v
retrieving revision 1.5
diff -u -r1.5 unicode.h
--- include/parrot
revious example follows, as it points
out some more inconsistent behaviour.
--
Peter Gibbs
EmKel Systems
set S0, "test"
set S1, S0
set S2, "another"
substr S0, S2, 1, 3
print S1
print "\n"
set S0, "test"
new P1, .PerlString
set P1, S0
set S2, &q
set S1, S0
set S2, "another"
substr S0, S2, 1, 3
print S1
print "\n"
end
--
Peter Gibbs
EmKel Systems
ybody else, but with a potential
performance cost.
--
Peter Gibbs
EmKel Systems
;t (and I can expect it to vanish eventually)?
This is simply a long-standing GC bug. Try the attached patch and see if
it helps.
--
Peter Gibbs
EmKel Systems
dod.patch
Description: Binary data
do is try to keep the overall noise
level as low as possible.
--
Peter Gibbs
EmKel Systems
wo can be fixed by the patch below.
The last one looks like a fundamental problem in MultiArray.
The line
b->cell_buffer = new_buffer_header(interpreter);
in function new_marray is creating a new buffer header, overwriting
the new_bufferlike_header created earlier.
--
Peter Gibbs
EmKel Sy
7;assign P0, P1' which would, somehow,
cause the existing PMC referenced by P0 to acquire the value
of the PMC referenced by P1 (via the vtable method set_pmc).
How to achieve this has never been resolved. The changes of
the other 'set P0, xxx' opcodes to 'assign' are basically for
consistency.
--
Peter Gibbs
EmKel Systems
value of a PMC was being updated,
rather than the PMC register being changed.
There are a lot of changes needed to existing code (e.g.
most of the tests) before the 'set' versions can be deleted.
--
Peter Gibbs
EmKel Systems
ell with the current CVS DOD code; the above
tests were done with appropriate fixes.
--
Peter Gibbs
EmKel Systems
Leopold Toetsch wrote:
> Peter Gibbs wrote:
> Did you look at indexed access, shift, unshift, splice ;-)
I have simply modified classes/array.pmc, which does not yet
implement shift or unshift; grey aims to provide alternative
implementations, rather than add new functionality. However,
ey = 30 seconds
Doing any more iterations than that will take far too long,
we already know that CVS will always win when access
happens a lot more often than creation.
--
Peter Gibbs
EmKel Systems
y is only freed when the header
is freed, and such embedded headers are not
known to the dod system, memory allocated to
these embedded headers would stick around
forever??
--
Peter Gibbs
EmKel Systems
dy to check.
--
Peter Gibbs
EmKel Systems
t the platform's size and byteorder.
If the concept gets accepted, then we can start extending.
--
Peter Gibbs
EmKel Systems
string Sy per type Iz
Currently supported types are:
0 = 8-bit
1 = 16-bit little-endian
2 = 16-bit big-endian
3 = 32-bit little-endian
4 = 32-bit big-endian
--
Peter Gibbs
EmKel Systems
convert.t
Description: Binary data
convert.h
Description: Binary data
doesn't work when I try to change S0 from the
test
> set. But when I try to put a
> set S0, "v"
>
> just before using the ord instruction, then I get the good behavior.
> Of course, I can't use the set, since the char in S0 can be anything in a
> real
that could have been collected, or some sort of statistic that
> indicates how often the paged collections kick in?
I'll take a look at this tomorrow.
Thanks for your interest
--
Peter Gibbs
EmKel Systems
structs
The 'total bytes allocated' for grey refers to the aligned page
allocator, and therefore now includes headers.
72k patch not attached.
--
Peter Gibbs
EmKel Systems
is not adjusted to
the desired alignment.
--
Peter Gibbs
EmKel Systems
scrap selfpoolptr, and instead
set the external flag where you currently clear selfpoolptr.
--
Peter Gibbs
EmKel Systems
d pass, and hence string_grow not be called, but then
unmake_COW could shrink the destination buffer before the memcopy
happens.
--
Peter Gibbs
EmKel Systems
ll fix the problem,
but I have been leaving those for Mike to look at.
In the meantime, a temporary quick-fix patch is included below.
--
Peter Gibbs
EmKel Systems
Index: string.c
===
RCS file: /cvs/public/parrot/string.c,v
retr
d doesn't output quux.
Patch below should fix the problem. This is not an optimal solution,
as the unmake_COW is probably not required if the string_grow is
going to happen anyway, but it seems to follow the general spirit of
the current code.
All tests pass with GC_DEBUG=0; three fail with GC_DEBUG=1,
due to bugs in the index op in core.ops (string_to_cstring returns
highly volatile pointers)
I have not done a full audit for cycle counter wrap problems yet,
so long-running programs may experience difficulties.
--
Peter Gibbs
EmKel Sy
zen ideas that
caused performance to deteriorate and were discarded.
Only changes that improved performance (or had a very
small detrimental effect but were required for subsequent
changes) survived.
--
Peter Gibbs
EmKel Systems
s, and strlen as being in encoding-defined characters.
Did something change when I wasn't looking, or is this a bug
just waiting for somebody to actually implement Unicode?
--
Peter Gibbs
EmKel Systems
overhead.
The next item on the list for grey was paged memory allocation - this
may be usable to some extent without the buffer linked lists; so I will
probably give that a spin anyway.
--
Peter Gibbs
EmKel Systems
main()
{
void * a;
void * b;
char c;
void * d;
struct {
void * a;
with the addition of strstart also.
--
Peter Gibbs
EmKel Systems
ocation here, rather than excess usage?
If so, grey will fix it in the next release with paged memory
allocation; and I'm sure you'll think of a solution also.
--
Peter Gibbs
EmKel Systems
ns somewhere.
I am still trying to track it down further - there is definitely
something very strange happening here somewhere.
I suspect a combination of slower and fatter may make it
hard to persuade Dan that we need cows?
--
Peter Gibbs
EmKel Systems
(and hence PARROT_PTR_ALIGNMENT = 1), but IIRC a push
or pop will always change the SP by 2 or 4, therefore the stack walk code
can do the same. In a quick test, using a hardcoded value of 2 in the
stack walk code, 5000 lives dropped down to 112 seconds.
--
Peter Gibbs
EmKel Systems
of the
loop. (patch attached, but not fully tested)
On my machine, that changes 5000 lives from 168 seconds to 133
(tested for one run each only)
I'm sure there is more that can be done, but that may help for now.
--
Peter Gibbs
EmKel Systems
dod.patch
Description: Binary data
an improvement on Hanoi of about 15% using your
COW patch, and your COW is better on both tests than mine.
--
Peter Gibbs
EmKel Systems
to do a diff) is an experimental version of string_repeat that
tries to reduce the number of calls to memcpy. I can't find my notes
at the moment as to what benefit it gave - perhaps you might like
to try it sometime. (Note that the string_make call will need to be
changed to the split chartype/encodin
sed on point 2. I will be sending
my patch to Mike so he can see if there is anything he can use.
--
Peter Gibbs
EmKel Systems
both fields to determine if transcoding is required. I do not
believe that the two fields are orthogonal, and therefore the
number of charsets would be less than #chartypes * #encodings.
b) some alterations to the single vtable thus created, in
particular the addition of a find_substring method.
--
to the Buffer header structure
arose in a thread started by Dan himself, with contributions from Mike
Lambert and myself:
http:[EMAIL PROTECTED]/msg11424.html
The specific message from Dan prohibiting it was:
http:[EMAIL PROTECTED]/msg11570.html
--
Peter Gibbs
EmKel Systems
to somewhere close to
that again.
--
Peter Gibbs
EmKel Systems
PerlInt - in future, the perl compiler
will have to create a PMC with the correct type initially, and this
morphing will be removed for typed variables.
--
Peter Gibbs
EmKel Systems
C in any way. The future 'assign Px, Py' will call a vtable function
(set_pmc); however, in the quoted example, the pure register level
behaviour is all that is intended.
--
Peter Gibbs
EmKel Systems
t) {
case CONTEXT_SCALAR: return BASETYPE_INTVAL;
}
}
void set_pmc(PMC* value)
{
switch (value->get_preferred_type(INTERP, value, CONTEXT_SCALAR)) {
case BASETYPE_INTVAL:
set_integer(INTERP, SELF, value);
break;
}
}
--
Peter Gibbs
EmKel Systems
Peter Gibbs wrote:
> vtable method get_scalar(pmc)
> vtable method get_value(pmc, context)
Having broken the rule of posting before drinking coffee in the morning,
this is obviously nonsense - neither of these will work, because we don't
know the return type of these fu
ontext and act
accordingly. If context was an enumeration, a simple switch statement
would suffice. In this case, it might be interesting to benchmark the
consequences of replacing some of the other get_X vtable functions.
e.g. get_integer(pmc) -> get_value(pmc, CONTEXT_INTEGER)
Comments, any
and perlstring that I also left out originally.
--
Peter Gibbs
EmKel Systems
ed block, first allocate 16K, discard the amount before the alignment
point, and dish out the rest as 15 (or 16 if you're really lucky) 1K aligned
pages. I seriously considered this when I changed my buffer memory to be
paged instead of a single allocation per memory pool; but I haven't act
> Finallythe unification of buffers and PMCs means that buffers can now
> point to things of their own accord, without requiring that they be
> surrounded by an accompanying PMC type.
How about the other way round? If the one-size-fits-all PMCs were to be
replaced by custom structures, then everything could be a PMC, and
buffer headers as a separate resource could just disappear!
--
Peter Gibbs
EmKel Systems
doesn't want to use them due to the problems that occur when we
> start using exceptions (and longjmp, etc).
If performance has to halve in order to implement such features, I hope
somebody plans to write Parrot::Lite!
--
Peter Gibbs
EmKel Systems
aster machine
and see what happens.
--
Peter Gibbs
EmKel Systems
# New Ticket Created by "Peter Gibbs"
# Please include the string: [netlabs #691]
# in the subject line of all future correspondence about this issue.
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=691 >
Index: RESPON
# New Ticket Created by "Peter Gibbs"
# Please include the string: [netlabs #629]
# in the subject line of all future correspondence about this issue.
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=629 >
Attached patch does some fairly radical things to the memory manag
# New Ticket Created by "Peter Gibbs"
# Please include the string: [netlabs #628]
# in the subject line of all future correspondence about this issue.
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=628 >
Following patch adds dependencies entry for hash.c to Makefile.
Stop
esolved, albeit not optimally, in the current version.
--
Peter Gibbs
EmKel Systems
Index: include/parrot/interpreter.h
===
RCS file: /home/perlcvs/parrot/include/parrot/interpreter.h,v
retrieving revision 1.45
diff -u -r1.45 interpreter.h
-
and 4
Starting quicksort with 3 and 3
Starting quicksort with 5 and 4
Starting quicksort with 6 and 5
dd
aa
bb
ee
cc
Am I missing something somewhere?
--
Peter Gibbs
EmKel Systems
I managed to send the wrong version of the patch on the previous post!
Herewith the correct (I hope) one.
Apologies to all.
--
Peter Gibbs
EmKel Systems
reclaim.patch
Description: Binary data
te any ideas you have (or, better still, just write the
thing - I really don't mind!)
--
Peter Gibbs
EmKel Systems
# New Ticket Created by "Peter Gibbs"
# Please include the string: [netlabs #619]
# in the subject line of all future correspondence about this issue.
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=619 >
The attached patch improves performance for programs that allocate
integer, the
flag stays set; this could also cause unpredictable behaviour.
For now, just assume that any attempt to turn one type of PMC into another
is likely to have undesirable consequences, and you should be safe.
--
Peter Gibbs
EmKel Systems
For now, just delete config_h.in from the STICKY_FILES line in
config/gen/makefiles/root.in and re-run Configure.pl
I'm sure Brent will sort it out properly later.
--
Peter Gibbs
EmKel Systems
while blocked could set a flag, and the unblocking would
trigger the blocked collection - this should reduce the impact of blocking.
--
Peter Gibbs
EmKel Systems
string_pool() to increase the pool size by a factor of
> >(0.5 - pct_freed_last_time) if it reclaimed less than 50% of memory
> >reduced this to 21 collections, much fewer of which reclaimed abysmally
> >small amounts of memory.
And Dan Sugalski replied:
> Interesting. Could
mstances, which is accepted as an empty string
by some, but not all, string handling code. In this case, attempting to
store the string into an array is invoking string_copy, which assumes the
input to be valid. IIRC Dan stated some time ago that checks for null were
not to be included, but I don't know what the current status is.
--
Peter Gibbs
EmKel Systems
resource
types - what do you think?
--
Peter Gibbs
EmKel Systems
h bit holds the real string length. That way you
start where you need to, but you can still find the COW marker off
the end of the original buffer.
[End quote]
--
Peter Gibbs
EmKel Systems
# New Ticket Created by "Peter Gibbs"
# Please include the string: [netlabs #607]
# in the subject line of all future correspondence about this issue.
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=607 >
Attached is another patch to implement copy-on-write strings.
Summa
ns, and
re-implement the original concept of telling a PMC to move its data to a new
location. That would require scanning PMCs during memory pool compaction -
at which point we are pretty close to unification of buffers and PMCs
anyway??
Comments?
--
Peter Gibbs
EmKel Systems
# New Ticket Created by "Peter Gibbs"
# Please include the string: [netlabs #602]
# in the subject line of all future correspondence about this issue.
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=602 >
Attached patch to core.ops implements neonate protection for the '
1 - 100 of 159 matches
Mail list logo