Angus Salkeld
ba95aafbf7
LOG: check for SCHED_IDLE
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 13:36:07 +11:00
Angus Salkeld
596bcf3dde
LOG: fix filter input check
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 13:36:07 +11:00
Angus Salkeld
ae86140250
LOG: only range check "t" when filtering else tags are not applied.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-21 14:51:22 +11:00
Angus Salkeld
bca6380eba
Log: move the lock to below the sem_wait
...
(coverity ordering warning)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-18 14:02:29 +11:00
Andrew Beekhof
68b33d7243
Log: Support right-aligned text in format strings
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-18 09:51:19 +11:00
Yunkai Zhang
8a673559e7
Fixed segment fault bug when use logging API at i386 platform
...
This bug cause by qb_vsprintf_serialize function. It parse "%llx" format
as _long_ other than _long long_.
At x86_64 platform, both sizeof(long) and sizeof(long long) is 8, this
issue would not be triggered, so we could only catch it at i386.
Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-18 09:33:24 +11:00
Angus Salkeld
dc3a061e98
MAP: pass user_data to the callback correctly
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-16 13:31:31 +10:00
Angus Salkeld
d6e352fda5
MAP: add a more generic notification system
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-15 21:14:49 +10:00
Angus Salkeld
4780308fea
MAP: add prefix iteration for the trie
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-13 20:54:39 +10:00
Angus Salkeld
6c260080ed
hashtable: fix the iterator
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-13 17:09:20 +10:00
Angus Salkeld
34e5a469aa
skiplist: fix order of deref
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-13 17:09:20 +10:00
Angus Salkeld
94df31cb44
skiplist: use ++ and -- operators
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-13 17:09:20 +10:00
Angus Salkeld
61268e3cb9
MAP: improve the storage in the trie
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-13 17:09:20 +10:00
Angus Salkeld
57212c0e94
MAP: add a trie implementation
...
http://en.wikipedia.org/wiki/Trie
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-12 23:01:15 +10:00
Angus Salkeld
5944229b60
LOG: allow large priorities
...
They will be printed as trace, it's mainly to make
filtering more flexible
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-09 16:20:54 +10:00
Angus Salkeld
0a1c464514
LOG: add qb_log_filter_ctl2() so we can filter a range of priorities
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-09 14:09:02 +10:00
The Quarterback Library Release Team
c8309edf72
Bump the library version.
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2011-09-09 12:54:03 +10:00
Angus Salkeld
f5fcf2a30b
LOG: add a way of getting the target state
...
This is so we can do the following:
for (t = 0; t < QB_LOG_TARGET_MAX; t++) {
if (qb_log_ctl(t, QB_LOG_CONF_STATE_GET, 0) == QB_LOG_STATE_ENABLED) {
// bla bla
}
}
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-08 16:40:02 +10:00
Angus Salkeld
be8248bd50
LOG: support comma seperated lists of file and function filters
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-08 13:24:18 +10:00
Angus Salkeld
86f004d1ec
map: add iterator that does't use a callback
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-07 12:05:15 +10:00
Angus Salkeld
4b594b522d
MAP: change the keys from void* to char*
...
I think this is the most common usage and greatly
simplifies the api.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-07 09:47:49 +10:00
Angus Salkeld
0a50fe57e7
LOG: add facility conversion functions
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-07 09:47:49 +10:00
Angus Salkeld
9df0c32398
LOG: fix the default syslog filter
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-01 13:51:06 +10:00
Angus Salkeld
2b7edd508d
defs: better define va_copy
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-26 09:39:26 +10:00
Angus Salkeld
8c98054bfa
Fix "./check dist"
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-26 09:37:25 +10:00
Angus Salkeld
564d3281ef
hashtable: Fix a lint warning
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-25 22:22:09 +10:00
Angus Salkeld
e1be00130c
LOG: fix ansi build
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 14:11:43 +10:00
Angus Salkeld
94767b18b8
Initial map using either a skiplist or a hashtable
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 14:11:43 +10:00
Angus Salkeld
8f954cd115
Add a stop watch
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 13:28:15 +10:00
Angus Salkeld
1591075873
LOG: serialize the va_list, don't snprintf
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 10:29:48 +10:00
Angus Salkeld
523922b202
LOG: change active list into array access
...
just keep track of the max used targets
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-19 12:44:37 +10:00
Angus Salkeld
ea8dfea7a0
LOG: allow the thread priority to be set.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-07 22:37:42 +10:00
Angus Salkeld
453dd31431
Fix splint warning on ubuntu 11.04
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-19 14:08:57 +10:00
Angus Salkeld
c41113aaec
LOG: move priority check up to prevent unnecessary format.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-14 12:38:02 +10:00
Angus Salkeld
bb1140fbd9
Add a qb_strerror_r wrapper.
...
This is to make the calling code more portable
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-14 10:41:46 +10:00
Angus Salkeld
0cb84fcda2
configure: improve arch & os detection output.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-26 23:29:19 +10:00
Angus Salkeld
b8fbeb3d4b
LOG: fix alignment compiler warning on sparc
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-26 23:23:42 +10:00
Angus Salkeld
478e00b2c0
Revert "LOG: use uint8_t for pointer manipulation"
...
This reverts commit a47ae0b659 .
2011-06-26 19:08:15 +10:00
Jim Meyering
876dc70ce2
don't let an invalid time stamp provoke a NULL dereference
...
* lib/log_blackbox.c (qb_log_blackbox_print_from_file): Handle
localtime failure by printing the long-int representation rather
than a strftime-formatted one.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-26 18:58:56 +10:00
Angus Salkeld
98493d9ae8
Change Lindent options to break the procedure type.
...
so change:
int foo(void)
to
int
foo(void)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-22 14:19:14 +10:00
Angus Salkeld
001b4a078c
LOOP: make the return more consistent in qb_loop_timer_expire_time_get()
...
If there is any error return 0
(meaning the timer is or has expired)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-22 13:13:34 +10:00
Angus Salkeld
a47ae0b659
LOG: use uint8_t for pointer manipulation
...
char changes size on different arches.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-21 09:02:35 +10:00
Angus Salkeld
42e79dfd2f
IPC: use the correct pointer type.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-20 16:36:34 +10:00
Angus Salkeld
77b6e15a85
Consistently prepend "qb-" to files in /dev/shm
...
Dietmar: can you confirm this works for you?
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-20 16:36:26 +10:00
The Quarterback Library Release Team
a69482ade6
Update the library version to 0.5.0
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2011-06-07 21:11:58 +10:00
Angus Salkeld
4a3536e72c
Re-fix mmap() woes on sparc.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-07 19:53:26 +10:00
Angus Salkeld
34e9820230
Revert "Fix ringbuffer creation on sparc"
...
This reverts commit 683296f180 .
2011-06-03 22:43:09 +10:00
Angus Salkeld
683296f180
Fix ringbuffer creation on sparc
...
On the first call to qb_rb_open() we try using a number of
page sizes. This because the system might have CONFIG_HUGETLB_PAGE_SIZE
defined in their kernel. So even though sysconf() returns 2K or 4K
some arch's mmap() require alignment on these boundaries.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:42:14 +10:00
Angus Salkeld
5b5a6c65d4
Make building a bit quieter by default.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:40:50 +10:00
Angus Salkeld
9666c392cb
Fix some spelling.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:40:39 +10:00