Jason Evans
26b5e3a18e
Implement lazy deallocation of small objects. For each arena, maintain a
...
vector of slots for lazily freed objects. For each deallocation, before
doing the hard work of locking the arena and deallocating, try several times
to randomly insert the object into the vector using atomic operations.
This approach is particularly effective at reducing contention for
multi-threaded applications that use the producer-consumer model, wherein
one producer thread allocates objects, then multiple consumer threads
deallocate those objects.
2007-11-27 03:13:15 +00:00
Jason Evans
bcd3523138
Avoid re-zeroing memory in calloc() when possible.
2007-11-27 03:12:15 +00:00
Jason Evans
1bbd1b8613
Fix stats printing of the amount of memory currently consumed by huge
...
allocations. [1]
Fix calculation of the number of arenas when 'n' is specified via
MALLOC_OPTIONS.
Clean up various style inconsistencies.
Obtained from: [1] NetBSD
2007-11-27 03:09:23 +00:00
Joseph Koshy
742fe6de5d
- Allow source descriptors with no data to be used as arguments to the
...
elf{32,64}_xlateto[fm]() translation functions. This change makes our
libelf compatible with other ELF(3) implementations. [1]
- Update manual page to reflect this change.
- Style fixes: wrap a long line.
Submitted by: jb [1]
2007-11-26 03:09:33 +00:00
David Xu
eb326f14a2
Move the added code in revision 1.26 into function pthread_key_create,
...
it should be there.
2007-11-26 02:35:17 +00:00
Joseph Koshy
c89d1cf588
- Add an overview of the pmc(3) API.
...
- Defer detailed descriptions of individual functions in the API to
function-specific manual pages.
2007-11-25 06:50:31 +00:00
Joseph Koshy
677d4530c2
Move the following functions into their own manual pages:
...
- pmc_attach(), pmc_detach().
- pmc_capabilities(), pmc_cpuinfo(), pmc_ncpu(), pmc_npmc(), pmc_pmcinfo(),
pmc_width().
- pmc_get_driver_stats().
- pmc_get_msr().
- pmc_read(), pmc_rw(), pmc_write().
- pmc_set().
- pmc_start(), pmc_stop().
2007-11-25 06:38:55 +00:00
Joseph Koshy
f28834c1a2
- Describe function pmc_init() in its own manual page.
...
- Describe functions pmc_configure_logfile(), pmc_flush_logfile() and
pmc_writelog() in their own manual page.
2007-11-25 03:18:42 +00:00
Mike Makonnen
e38d709cd6
Hmmm, must get reading glasses or else change the font on my terminal. That
...
comma looks like a period.
Noticed by: brueffer
2007-11-24 11:58:54 +00:00
Joseph Koshy
fcdeaa0525
Describe convenience functions `pmc_name_of_{capability,class,cputype,
...
disposition,event,mode,state}' in their own manual page.
2007-11-24 11:05:36 +00:00
Joseph Koshy
115cadfd60
Describe pmc_event_names_of_class() in its own manual page.
2007-11-23 12:30:55 +00:00
Joseph Koshy
1ddf079eed
Describe pmc_enable() and pmc_disable() in their own manual page.
2007-11-23 12:21:34 +00:00
Joseph Koshy
8fe4cbb6b7
Describe pmc_allocate() and pmc_release() in their own manual page.
2007-11-23 11:46:08 +00:00
Joseph Koshy
1eb6c69045
Sections of type SHT_GNU_versym use ELF type ELF_T_HALF. Update manual
...
page and code to match.
Submitted by: jb
MFC After: 1 day
2007-11-23 11:29:36 +00:00
John Birrell
37e19e1d85
Use an intermediate pointer to avoid a strict aliasing warning.
2007-11-23 05:52:13 +00:00
David Xu
da4410f25f
Simplify code, fix a thread cancellation bug in sem_wait and sem_timedwait.
2007-11-23 05:42:52 +00:00
David Xu
4877aaebc1
Reuse nwaiter member field to record number of waiters, in sem_post(),
...
this should reduce the chance having to do a syscall when there is no
waiter in the semaphore.
2007-11-21 06:01:02 +00:00
David Xu
73ba600faa
Remove warning level and aliasing restrictions.
2007-11-21 05:29:57 +00:00
David Xu
9e1ddd5fa0
Convert ceiling type to unsigned integer before comparing, fix compiler
...
warnings.
2007-11-21 05:25:27 +00:00
David Xu
922d56f9de
Add some function prototypes.
2007-11-21 05:23:54 +00:00
David Xu
6fdfcacb4a
Remove umtx_t definition, use type long directly, add wrapper function
...
_thr_umtx_wait_uint() for umtx operation UMTX_OP_WAIT_UINT, use the
function in semaphore operations, this fixed compiler warnings.
2007-11-21 05:21:58 +00:00
John Birrell
3e636fa0e5
Use an intermediate pointer to avoid a strict aliasing warning.
...
Note that ULong in this code is actually defined as an unsigned integer across
all arches so that the gdtoa() function always processes 32 bit data
despite the unfortunate naming of "ULong".
2007-11-21 01:10:42 +00:00
Mike Makonnen
84f2123154
Enclose entire header in #ifndef _LIBDISK_H_
2007-11-20 22:48:32 +00:00
Ken Smith
c0bb7d9461
While checking over the libraries for 7.0-REL Kris found the following
...
libraries had not had their versions bumped relative to 6.3-REL but
had indeed been changed. We need to bump their version so they can be
properly added to the compat6x port:
libasn1.so.8 libgssapi.so.8 libhdb.so.8 libkadm5clnt.so.8
libkadm5srv.so.8 libkafs5.so.8 libkrb5.so.8 libobjc.so.2
MFC After: 1 day
2007-11-20 04:20:32 +00:00
John Birrell
0aad0f2282
These are the things that the tinderbox has problems with because it
...
doesn't use the default CFLAGS which contain -fno-strict-aliasing.
Until the code is cleaned up, just add -fno-strict-aliasing to the
CFLAGS of these for the tinderboxes' sake, allowing the rest of the
tree to have -Werror enabled again.
2007-11-20 02:07:30 +00:00
John Birrell
102c7c9299
Use intermediate pointers to avoid strict alias type check failures
...
using gcc 4.2. This is required for tinderbox which doesn't have
-fno-strict-aliasing in it's custom CFLAGS.
2007-11-20 01:51:20 +00:00
Olivier Houchard
e93073b33d
Change the casts from (pthread_mutex_t *) to (void *) to keep gcc quiet.
...
Anybody with a cleaner solution feel free to change it.
2007-11-19 21:57:28 +00:00
John Baldwin
790c2471b9
Bump up the number of ttys supported by pty(4) to 512 by making use of
...
[pt]ty[lmnoLMNO][0-9a-v].
MFC after: 3 days
Reviewed by: rwatson
2007-11-19 20:49:42 +00:00
David Xu
4940ef4ad0
MFlibthr:
...
In _pthread_key_create() ensure that libkse is initialized.
2007-11-19 02:09:07 +00:00
Mike Makonnen
f378c687da
Capitalization
2007-11-18 18:44:35 +00:00
John Birrell
26fc37307b
Constify the first argument to expand_number() so that it can
...
be called with a const without the compiler grisling.
2007-11-18 02:20:02 +00:00
Olivier Houchard
f0aa484471
Build libthread_db for arm as well.
...
MFC after: 1 week
2007-11-17 21:29:02 +00:00
Olivier Houchard
ebbcec3ad2
Add arm support in libthread_db.
2007-11-17 21:27:53 +00:00
Maksim Yevmenkin
1f3e4b39fd
Fix bug in handling SDP continuation state.
...
Reported by: Eric Millbrandt emillbrandt at coldhaus dot com
MFC after: 3 days
2007-11-16 15:13:12 +00:00
Ruslan Ermilov
faad9cae56
Fix bad rule and bad dependency for nsparser.h that can
...
cause the build to fail because y.tab.c can have a more
recent modification time than y.tab.h, and the bad rule
relied on the opposite.
(The last write to y.tab.c by yacc(1) happens after the
last write to y.tab.h, according to truss(1).)
Reported by: kensmith
2007-11-15 22:39:15 +00:00
Rong-En Fan
a964324e72
- Include runetype.h for _RuneLocale_
2007-11-07 14:45:48 +00:00
Marius Strobl
9a2706abcc
In _pthread_key_create() ensure that libthr is initialized. This
...
fixes a NULL-dereference of curthread when libstdc+ initializes
the exception handling globals on archs we can't use GNU TLS due
to lack of support in binutils 2.15 (i.e. arm and sparc64), yet,
thus making threaded C++ programs compiled with GCC 4.2.1 work
again on these archs.
Reviewed by: davidxu
MFC after: 3 days
2007-11-06 21:50:43 +00:00
David Xu
56b45d9067
Avoid doing adaptive spinning for priority protected mutex, current
...
implementation always does lock in kernel.
2007-10-31 01:50:48 +00:00
David Xu
55f18e070f
Don't do adaptive spinning if it is running on UP kernel.
2007-10-31 01:44:50 +00:00
David Xu
e8ef3c283b
Restore revision 1.55, the kris's adaptive mutex type.
2007-10-31 01:37:13 +00:00
Giorgos Keramidas
98eb34a74c
Remove an extra (commented out) .Sh HISTORY section heading, to avoid
...
the risk of "shadowing" the following .El request, and delete an empty
line to fix mdoc warnings.
MFC after: 3 days
2007-10-30 16:05:40 +00:00
Giorgos Keramidas
6f1743c543
Remove an extra (commented out) .Sh HISTORY section heading, to avoid
...
the risk of "shadowing" the following .El request, strip eol spaces
and delete an empty line to fix mdoc warnings.
MFC after: 3 days
2007-10-30 15:58:39 +00:00
Giorgos Keramidas
81c0ade6b6
Change a .PP request to a valid .Pp mdoc request, and remove an extra
...
(but commented out) .Sh HISTORY section heading.
MFC after: 3 days
2007-10-30 15:56:12 +00:00
Giorgos Keramidas
22b9ec401b
Remove duplicate (but commented out) .Sh HISTORY section heading.
...
It almost "shadows" the ending .El request of a list, which seems
to have caused mdoc buglets in some gss_*.3 manpages.
MFC after: 3 days
2007-10-30 15:52:55 +00:00
Giorgos Keramidas
2b39bec3a7
Remove duplicate (but commented out) .Sh HISTORY section heading
...
and add a missing .El request.
MFC after: 3 days
2007-10-30 15:45:19 +00:00
Giorgos Keramidas
daa8e8bf02
Remove extraneous empty lines, to fix mdoc warnings.
...
MFC after: 3 days
2007-10-30 15:36:40 +00:00
Giorgos Keramidas
ef824a431f
mdoc fix: remove extraneous empty line.
...
MFC after: 3 days
2007-10-30 15:31:41 +00:00
Giorgos Keramidas
3f85a8b4c5
Bump manpage date, missed during the last change.
...
MFC after: 3 days
2007-10-30 15:28:43 +00:00
Giorgos Keramidas
6aaa40b521
The .Fx request doesn't recognize 2.2.0, so use ".Fx 2.2"
...
MFC after: 3 days
2007-10-30 15:27:45 +00:00
Giorgos Keramidas
aada4cf330
Remove extraneous .Ef request.
...
MFC after: 3 days
2007-10-30 15:26:20 +00:00