| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
* prof_file.c (profile_free_file_data): Destroy mutex before freeing containing
structure.
ticket: new
target_version: 1.4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17029 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats) [_WIN32
&& !DEBUG_THREADS_STATS]: Define empty versions for Windows.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16997 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
In most library directories, this just affects where the line breaks
are. In most other directories, it's just dropping a trailing blank
line. One or two files really do have updated dependencies.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16987 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
line breaks are recomputed, instead of after. This will result in lots of
whitespace changes in dependencies in directories that build library object
files, but the final output is nicer (fewer long lines), and running "make
depend" uses one fewer invocation of sed (balancing out the extra one I added
in another checkin earlier today).
* config/post.in (.depend): Don't do target name munging here.
(.depfix2.sed): Pass extra value $(STLIBOBJS).
* util/depfix.sed: Don't change foo.o to $(OUTPRE)foo.$(OBJEXT) here.
* util/depgen.sed: Add new argument for STLIBOBJS. Do the OUTPRE/OBJEXT
substitution here, and if STLIBOBJS is non-empty, add foo.so and foo.po while
we're at it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16986 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
file.
ticket: 2796
version_reported: 1.4
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16976 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
rename krb5support_32.dll to k5sprt32.dll
ticket: 2804
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16934 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If profiles are open and iterators in use while the on-disk file is being
modified (see tests/threads/prof1.c), the re-reading of the file can cause data
to be freed up. The iterator code does no locking and assumes that the profile
node tree won't be touched.
During our Monday meeting we discussed changing the iterator code to "snapshot"
the current state of the file if it were modified, so that a more consistent
picture could be returned, essentially by bumping a reference count for the
life of the iterator object. The reference count I was thinking of turns out
to be used for a different purpose; we'd have to add another layer of
indirection, another ref count, and another mutex to accomplish this. There
might be a more reasonable way to go about it, but I don't want to tackle it
for 1.4 when we're already shipping beta releases.
This patch just adds locking to the current iterator code so that the file data
can't be replaced while the iterator is being processed. The inconsistent-view
issue remains.
* prof_tree.c (profile_node_iterator): When the iterator has a current file,
lock it, and unlock it before changing it or returning.
ticket: new
status: resolved
target_version: 1.4
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16932 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16914 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Finish the hooks (left disabled by default) for logging somewhere the recorded
timing behavior relating to the use of locks in the krb5 code.
Currently, "reporting" means writing to /dev/tty or stderr, and the data is the
number of times a mutex is locked, file and line where it was created,
min/avg/max/stddev wait times to acquire the lock and hold times, and stats are
only written out for locks that were locked a certain minimum number of times
and with a minimum average wait time.
The criteria are all controlled in threads.c, and k5-thread.h just has the
hooks for gathering data. So turning on/off the data gathering requires a full
rebuild, but tweaking the reporting is mostly just a relinking pass. (May also
require adding a dependence on the math library to the support library; for a
static build that may impact a lot of makefiles.)
* include/k5-thread.h [DEBUG_THREADS_STATS]: Include string.h and inttypes.h.
(get_current_time) [DEBUG_THREADS_STATS]: Define as inline.
(k5_mutex_init_stats) [DEBUG_THREADS_STATS]: Save away current time as creation
time.
(k5_mutex_stats_tmp): New typedef, k5_debug_time_t if recording stats, dummy
int otherwise.
(k5_mutex_stats_start): New macro, get current time if recording, zero
otherwise.
(krb5int_mutex_lock_update_stats, krb5int_mutex_unlock_update_stats,
krb5int_mutex_report_stats) [DEBUG_THREADS_STATS]: Declare.
(krb5int_mutex_report_stats) [! DEBUG_THREADS_STATS]: New macro, does nothing.
(k5_mutex_lock_update_stats, k5_mutex_unlock_update_stats): New macros, map to
krb5int_ functions if recording, dummy statements otherwise.
(k5_mutex_destroy): Call krb5int_mutex_report_stats.
(k5_mutex_lock, k5_mutex_lock_1): Call k5_mutex_stats_start and
k5_mutex_lock_update_stats.
(k5_mutex_unlock_1): Call k5_mutex_unlock_update_stats.
* util/support/threads.c [DEBUG_THREADS_STATS]: Include stdio.h.
(stats_logfile) [DEBUG_THREADS_STATS]: New variable.
(krb5int_thread_support_init) [DEBUG_THREADS_STATS]: Set it to point to a file
on /dev/tty or stderr.
(krb5int_thread_support_fini) [DEBUG_THREADS_STATS]: Flush it.
(k5_mutex_lock_update_stats, krb5int_mutex_unlock_update_stats, get_stddev,
krb5int_mutex_report_stats) [DEBUG_THREADS_STATS]: New functions.
* util/support/libkrb5support.exports: Add krb5int_mutex_*_stats.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16913 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
here.
(protoname): Handle IPPROTO_IGMP.
(debug_dump_addrinfo_args): Update for current interfaces to socktypename and
familyname.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16893 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16875 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't duplicate macro definitions.
Header files and comments still need some cleanup.
* cache-addrinfo.h, init-addrinfo.c: New files, split out from fake-addrinfo.c.
* fake-addrinfo.c: Include cache-addrinfo.h.
(FAI_CACHE, struct face, struct fac): Moved to cache-addrinfo.h.
(krb5int_fac, krb5int_init_fac, krb5int_fini_fac): Moved to init-addrinfo.c.
(addrinfo, struct addrinfo): Don't define.
(AI_* and NI_* and EAI_* macros): Don't define.
* threads.c: Include cache-addrinfo.h.
(krb5int_init_fac, krb5int_fini_fac): Don't declare.
* Makefile.in (SRCS, STLIBOBJS, LIBOBJS): Updated.
ticket: 2761
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16867 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
* et_h.pl: Regenerated.
ticket: 2770
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16865 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
profile_is_writable so that callers can check to see if profile_release() will fail before calling it
ticket: 2751
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16860 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
writable. You can now write to a different file with profile_flush_to_file() or buffer with profile_flush_to_buffer()
ticket: 2750
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16858 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the cache on Mac OS X, and likely to be enabled eventually on other
platforms, this is going to wind up being a non-trivial amount of code on most
platforms, and updating the cache code to work on other configurations is
likely to take a few rounds. Rather than recompile the world and add a bunch
of code to each object file doing name lookups, moving the code into the
support library that already defines the static data (list head, mutex) should
make things simpler.
(TODO: Fix calling conventions for Windows?)
* include/fake-addrinfo.h: Move most of code content into
util/support/fake-addrinfo.c.
(krb5int_getaddrinfo, krb5int_freeaddrinfo, krb5int_getnameinfo,
krb5int_gai_strerror): Declare.
(getaddrinfo, freeaddrinfo, getnameinfo, gai_strerror): Define as macros
mapping to the krb5int_ function names.
* util/support/fake-addrinfo.c: Import most of the contents of
include/fake-addrinfo.h, so we only compile it once.
(krb5int_getaddrinfo, krb5int_freeaddrinfo, krb5int_getnameinfo,
krb5int_gai_strerror): New functions, always defined and exported.
* util/support/libkrb5support.exports: Export the new functions, not the old
_fac symbols.
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16854 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
* mkrel: Rework quoting for RELTAIL check. Don't check RELTAIL if
doing a "-current" snapshot.
ticket: new
target_version: 1.4
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16850 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes suggested by lxs to reduce stat frequency to once per second.
In parallel loops creating and destroying krb5 contexts on Mac OS X, this
seems to improve performance by 10%, though it's hard to be sure because
the times are variable.
* prof_int.h (STAT_ONCE_PER_SECOND): Define.
(struct _prf_data_t) [STAT_ONCE_PER_SECOND]: New field LAST_STAT.
* prof_file.c (scan_shared_trees_locked, scan_shared_trees_unlocked): Redefine
to do nothing for now.
(profile_update_file_data) [STAT_ONCE_PER_SECOND]: If the current time is the
same time as the last stat of the file, just return; otherwise, save away the
current time.
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16847 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* prof_file.c (profile_flush_file_data_to_buffer): New function.
* profi_init.c (profile_flush_to_buffer, profile_free_buffer): New functions.
* prof_parse.c (output_quoted_string): Use a callback instead of stdio calls.
(dump_profile): Renamed from dump_profile_to_file. Use a callback instead of
stdio calls.
(dump_profile_to_file_cb): New function.
(profile_write_tree_file): Updated to new internal interface.
(struct prof_buf): New type.
(add_data_to_buffer, dump_profile_to_buffer_cb, profile_write_tree_to_buffer):
New functions.
* prof_int.h (profile_write_tree_to_buffer, profile_flush_file_data_to_buffer):
Declare.
* profile.hin (profile_flush_to_buffer, profile_free_buffer): Declare.
* libprofile.exports: Export profile_flush_to_buffer and profile_free_buffer.
* profile.swg (profile_flush_to_buffer): Declare.
* profile_tcl.c: Regenerated.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16838 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16835 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
flag.
(scan_shared_trees_locked, scan_shared_trees_unlocked): Convert to macros, so
line numbers reported by assert will be useful.
* prof_test1 (test2): Run new test of modifications with other existing open
profile handles.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16834 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16830 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file than was originally read.
* prof_file.c (write_data_to_file): New function, split out from
profile_flush_file_data. Add argument can_create indicating whether the old
file should already exist or not.
(profile_flush_file_data): Call it.
(profile_flush_file_data_to_file): New function.
* prof_int.h (profile_flush_file_data_to_file): Declare it.
(profile_flush_file_to_file): New macro.
* prof_init.c (profile_flush_to_file): New function.
* profile.hin (profile_flush_to_file): Declare.
* profile.swg (profile_flush_to_file): Declare.
* profile_tcl.c: Regenerated.
* prof_test1: Use profile_flush_to_file instead of profile_flush, and reload
from the new filename.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16825 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
case.
* prof_int.h (struct _prf_data_t): Change filespec to a trailing char array.
Add a length field for the filespec.
(profile_make_prf_data): Declare.
(profile_lock_global, profile_unlock_global): Prototypes need argument lists.
* prof_file.c: Include stddef.h.
(scan_shared_trees_locked, scan_shared_trees_unlocked): New functions.
(r_access, rw_access): Now take const_profile_filespec_t arg.
(profile_make_prf_data): New function.
(profile_open_file): Scan trees at beginning and end. Use
profile_make_prf_data to allocate and initialize storage.
(profile_dereference_data, profile_free_file_data): Scan trees.
(profile_ser_size, profile_ser_externalize): Filespec is never null.
* prof_set.c (rw_setup): Use profile_make_prf_data to allocate and initialize
storage.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16822 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
Added macros to avoid adding error tables on platforms that don't use them (ie: OSX)
ticket: 2741
version_fixed: 1.4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16818 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16817 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
* prof_init.c (profile_init): Don't add error table here.
* prof_file.c (profile_library_initializer): Add it here.
(profile_library_finalizer): Remove it here.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16815 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
* et_c.pl, et_h.pl: Regenerated.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16813 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
* et_c.pl, et_h.pl: Regenerated.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16811 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
(profile_dereference_data): Call it.
* prof_set.c (rw_setup): Likewise.
* prof_int.h (profile_dereference_data_locked): Declare it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16792 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
* configure.in: Use KRB5_RUN_FLAGS.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16791 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
ticket: 1345
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16790 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(profile_add_node): Move variable CMP into inner block where it's used. Clear
deleted flag.
(profile_find_node): Skip deleted nodes.
(profile_remove_node): Just set the deleted flag, don't modify the tree.
* Makefile.in (profile_tcl.c): Target should be in srcdir.
(profile_tcl.o): Depend on profile.h.
(DO_TCL): New variable.
(check-unix-tcl-, check-unix-tcl-ok): New targets.
(check-unix): Depend on one of them, based on DO_TCL.
* configure.in: Set and substitute DO_TCL.
* prof_test1: New file.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16784 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16783 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
(Tcl_SetResult, my_tcl_setresult): Compile hack only if building for Tcl.
(%typemap SWIGTYPE *OUTPUT): Initialization is not specific to the scripting
language. Add Python code.
(%typemap errcode_t, errcode_t*): Add placeholders for Python support.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16782 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
pty-related functions.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16777 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16757 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
input file, destroy the mutex only if we're not sharing file data.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16698 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tag, to strip trailing whitespace (per current locale, not just ASCII space
characters), and prohibit any internal space characters in tag names.
(This is not the patch supplied in the bug report; that patch changed the tag
handling to allow spaces in tag names, which we haven't previously allowed. On
the other hand, we haven't specifically disallowed internal tabs or other
whitespace, either, and this patch does so.)
ticket: 2614
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16697 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
requiring swig in order to generate the test program.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16692 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in: Look for Tcl.
* Makefile.in (profile_tcl, profile_tcl.c, profile_tcl.o): New targets, not
built by default.
(PROG_LIBPATH, PROG_RPATH, LOCALINCLUDES): Add Tcl options.
(DEFINES): Define.
(clean-unix): Delete profile_tcl.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16691 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
of Debian Linux has an English dictionary with Latin-1 characters and a "rev"
that seems to default to some sort of Unicode.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16690 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* prof_file.c (profile_open_file): Initialize data mutex.
(profile_update_file_data, profile_flush_file_data): Lock it while manipulating
file data.
(profile_lock_global, profile_unlock_global): New functions.
* prof_set.c (rw_setup): Acquire global lock while checking flags and adjusting
ref count.
(profile_update_relation, profile_rename_section, profile_add_relation): Lock
data mutex while manipulating profile data.
* prof_tree.c (profile_node_iterator): Do more magic number tests.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16689 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16677 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
not after
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16665 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
other functions did before, but discards blank lines.
(test1, test2, test12, test13, test20): Call getnwords.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16660 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
should be pointer to tsd_block.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16648 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
key creation in POSIX case
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16635 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
utmpx.h, since some setutent() implementations aren't sysV-derived,
e.g., NetBSD.
ticket: 2432
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16633 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently it gets locked while a name lookup is in progress, which is not very
efficient. That should be changed, after the code is fixed up so that the
cache works on other platforms.
* include/fake-addrinfo.h: Include k5-thread.h.
(struct fac): Add a mutex.
(plant_face, find_face): Check that mutex is already locked.
(krb5int_lock_fac, krb5int_unlock_fac): Declare.
(fai_add_hosts_by_name): Use them to lock and unlock the mutex.
* util/support/fake-addrinfo.c (krb5int_fac): Initialize the mutex.
(krb5int_init_fac, krb5int_fini_fac): New functions; finish initializing or
destroy the mutex.
(krb5int_lock_fac, krb5int_unlock_fac): New functions; lock the mutex after
calling krb5int_call_thread_support_init, or unlock it.
* util/support/threads.c (krb5int_call_thread_support_init): New function.
(krb5int_init_fac, krb5int_fini_fac): Declare.
(krb5int_thread_support_init, krb5int_thread_support_fini): Call them.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16622 dc483132-0cff-0310-8789-dd5450dbe970
|