Commit Graph

26873 Commits

Author SHA1 Message Date
Ingo Weinhold
39be9709cf * Moved counting/getting the hit images into separate utility method
GetHitImages() of base class AbstractThreadProfileResult.
* gcc 4 build fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 20:01:19 +00:00
Rudolf Cornelissen
970abd0254 applied coding style change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 19:58:28 +00:00
Stephan Aßmus
fcb3a3c7c3 With the fix to the apic timer interrupts, the thread scheduling latency has
apparently vastly improved, so that audio hardware buffers can be configured
as small as on BeOS in the OSS node. This is especially nice for multi-media
apps since it reduces interactive response times.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 18:16:51 +00:00
Stefano Ceccherini
fb62af45a2 Use B_ANY_KERNEL_ADDRESS instead of B_ANY_KERNEL_BLOCK_ADDRESS, like suggested by Axel and Marcus
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 15:19:30 +00:00
Axel Dörfler
2c348abbf7 * Most of the other file systems now maintain the st_blocks value. It might not
always be correct, but should be at least close.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 14:29:34 +00:00
Axel Dörfler
87e560d420 * Remove useless symlink (if the BeOS stuff needs it, it should be generated
by the makefile [and that should be removed from here as well]).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 14:28:17 +00:00
Axel Dörfler
b2ec044cb8 * Added stat::st_blocks field as required by POSIX. This also closes ticket
#2261.
* Made at least BFS report it more or less correctly (the attributes are
  ignored, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 14:16:39 +00:00
Axel Dörfler
3ddf6441ea * Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 14:13:55 +00:00
Stephan Aßmus
dc55af6452 Applied patch by Urias McCullough:
* Added stdio_ext.h header with declaration for the only currently implemented
  stdio extensions fsetlocking() and flushlbf() and associated constants. This
  helps compiling some software like gettext and cvs.

NOTE: I have not tested this myself, but trust the review done by Andreas
and Scott.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 10:04:22 +00:00
Ingo Weinhold
051fad0f92 More refactoring:
* Moved the BasicThreadProfileResult class, its subclasses and related
  code into separate files.
* Made ThreadImage an abstract base class. Pulled the meaty part into
  new subclass BasicThreadImage.
* Templatized AbstractThreadProfileResult over the ThreadImage type.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 23:49:29 +00:00
Ingo Weinhold
394def6bf6 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 23:45:45 +00:00
Ingo Weinhold
1352fb0975 Added GNU LGPL v2.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 22:33:32 +00:00
Karsten Heimrich
ae1cc08385 * save the last output location
* save the last used output format
* save the last 5 choosen locations
* don't do any window init in silent mode



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 22:05:26 +00:00
Axel Dörfler
d99477440f * The "ints" KDL command now also prints function names, and the interrupt
function argument data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 18:06:38 +00:00
Karsten Heimrich
8e28c17f2f * gcc4/ build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 18:03:30 +00:00
Ingo Weinhold
72e19fd426 Pulled subclass BasicThreadProfileResult out of
AbstractThreadProfileResult. The latter only manages the images, now.
Moved the AddSamples() code into BasicThreadProfileResult subclasses that
handle it depending on whether the function hits are counted inclusively
or exclusively ("-f" option).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 15:36:39 +00:00
François Revol
a6c5d5750e - update TODO list
- added MSTheme importer, currently handles (best effort):
	- colors
	- screensaver (tries to map to BeOS ones)
	- background picture
	- window decor (maps to Zeta classic NT and Luna decors)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 15:26:02 +00:00
Ingo Weinhold
ed2fc87300 Some refactoring: Separated the profile result collection from the
thread management. There's now a ThreadProfileResult (abstract base
class) object associated with a Thread object. Currently there's only
one (currently misnamed) derived class AbstractThreadProfileResult, but
some more refactoring will make the purpose clearer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 15:14:31 +00:00
Ingo Weinhold
120cfc6238 Moved several classes into their own files.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 13:50:11 +00:00
Ingo Weinhold
715fbb94b4 arch_debug_get_stack_trace(): We do want the return address of the last
skipped iframe. "profile" didn't capture the top-most function, unless
run with "-s 1".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 13:42:49 +00:00
Stefano Ceccherini
d6a7cd2564 Checking the return value of methods is always a good idea. This fixes a KDL I'm getting on start with vmware when including the acpi module in the build. Now, finding why this happens in the first place would be nice.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 13:13:39 +00:00
Stefano Ceccherini
3bb8984f7c don't leak the BMessenger in case of error. CID 836
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 07:05:26 +00:00
Ingo Weinhold
f965a969b1 Extended the profiling API. When using the variable stack trace depth
buffer format, the buffer can now also contain other events than just
stack traces. ATM these are only references to the image events
(created/deleted). Therefore we no longer have to flush the profiling
buffer after such an event, since the debugger can exactly match the
samples. Since we couldn't flush when the profiling timer hit while the
thread was in the kernel, that wasn't working that well anyway.
"profile -f" fails to translate stack trace addresses only very rarely,
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 00:53:38 +00:00
Ingo Weinhold
366f546e67 Don't fail when the runtime loader debug area can't be found. When we
can load the image files, we can still do symbol lookups just fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 00:41:31 +00:00
Ingo Weinhold
99409ebb19 Generate a debug event for a loaded user image. When a debugged team
exec*()ed, the debugger never got notified that a runtime loader image
was created.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 00:39:38 +00:00
Ingo Weinhold
f711e9dc45 Use esi instead of ebp. The latter usually is the stack frame pointer --
using it for something else screws stack traces while being in such a
function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 00:37:35 +00:00
Axel Dörfler
28de90159d * As Adek336 found out, our definition of MHLEN was wrong, and that actually
caused lots of bugs (like #2758, and obviously also #1641). Thanks a lot!!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-28 21:32:59 +00:00
François Revol
2a544fe366 Sounds addon wasn't added to the list...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-28 16:57:29 +00:00
Ingo Weinhold
937f717ced Quote the command line arguments, so arguments with whitespace will
work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-28 13:45:36 +00:00
Michael Lotz
7e1490e0ad Introduce some extensions to the USB v3 module API that allow for device
enumeration (getting roothubs, enumerating child devices and detecting device
topology) and hub port management (resetting and disabling ports). These were
laying around for quite some time.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-28 13:42:59 +00:00
Ingo Weinhold
abe717da05 * When the initialization of a B_KEEP_LOADED module failed, it was kept
loaded anyway, causing bug #2776.
* Removed temporary debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-28 13:25:43 +00:00
Michael Lotz
eb6a1cbc4c Fix previous commit. We obviously want the global stack variable to be set, we
just don't need the shared area.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-28 13:21:18 +00:00
Michael Lotz
48ab20fa34 * Don't use the multiple modules workaround under Haiku. This code is only
needed on plain R5 and actually wouldn't work if the module would ever get
  unloaded (or reloaded afterwards).
* Added comment explaining that above the concerning code.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-28 13:19:18 +00:00
François Revol
ca75aaad96 Fix for R5:
- add missing controls for R5 version
- hack to work around a race that happens on BeOS at least, someone should fix it better. stippi ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 22:32:43 +00:00
Ingo Weinhold
80fdf43432 We use jobs.c, not nojobs.c. The generated header dependency was missing
and thus, with a multiple jobs build, jobs.c could be compiled before
the header was generated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 21:24:53 +00:00
Ingo Weinhold
bba1a2b132 * Check for 0 capacity in the read(), write(), and io() hooks. In this
case the cd_driver_info::io_scheduler field is not initialized and we
  shouldn't try to access it. No idea why, but this only crashed with
  the gcc4 build.
* Fixed warning with tracing enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 21:22:22 +00:00
Ingo Weinhold
9d53445aa2 Added some more licenses.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 19:28:36 +00:00
Ingo Weinhold
bd5bd2c61e Normalize() didn't update fPathLength correctly. This did probably screw
up module image paths in module_init_post_boot_device(). Not sure whether
it also could cause #2776.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 19:11:40 +00:00
Ingo Weinhold
2701272f24 Temporary debug output to track down #2776.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 19:07:30 +00:00
Ingo Weinhold
c6b1356e4b * Enforced 80 column limit.
* Added/improved debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 17:45:12 +00:00
Ingo Weinhold
7805eb0cc2 Changed the handling for hardware-caused terminal signals:
* No longer send a SIGKILL when a page fault occurred, there was no
  signal handler, and the debugger told us to continue as usual. Instead
  we send a SIGSEGV. Instead in handle_signal() when not in the main
  thread and there's no handler for the signal, we first send the main
  thread a SIGKILL before letting the thread die.
  So in cases where the main thread caused an unhandled page fault, the
  team will die from the SIGSEGV, now. This fixes bug #2773. 
* For the other hardware-caused signals we do now do the same as in case
  of page faults, i.e. we first check whether the thread has a handler
  for the signal in question. If so, we don't notify the debugger, but
  send the signal right away.
* B_GENERAL_PROTECTION_FAULT is translated to SIGILL now. Seems better
  than SIGKILL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 14:08:13 +00:00
François Revol
02e08b15ef Add or fix copyright headers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 01:04:05 +00:00
Ingo Weinhold
9618c0dc63 Panic when trying to access the small data region. It is not loaded from
disk.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 00:35:25 +00:00
Ingo Weinhold
1cd8c4cc08 Let the boot loader set the kernel image's name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 00:33:20 +00:00
Ingo Weinhold
0dc4d1e5ca Reverted r27685, r27676, r27665, and r27664, the changes related to
letting the boot loader provide full paths for the pre-loaded images.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 00:28:10 +00:00
Ingo Weinhold
6075e354ab * Call module_init_post_boot_device() right after the boot volume has
been mounted, before anyone could try to load any modules from it.
  Also pass it a flag whether the boot volume is where the boot loader
  pre-loaded the modules from.
* module_init_post_boot_device() changes the pre-loaded module image
  paths to normalized boot volume paths, now. Got rid of the code in
  register_preloaded_module_image() which tried something like this.
* Changed module image ref counting. A referenced module has single
  reference to its image, which is released when the module becomes
  unreferenced.
* get_module() for a reference module will not try to re-get and re-set
  the module's image anymore. That could lead to a similar module (from
  different paths) being loaded at the same time. A module from a new
  file can only be loaded when the old one has been put completely.
* Simplified B_KEEP_ALIVE module handling a bit. When the module is
  initialized, we add another reference, which we'll never free. Thus
  the module remains loaded without special handling. Removed
  module_image::keep_loaded. A B_KEEP_ALIVE module remains referenced
  and thus its image remains referenced, too.
* Removed module::file, a cached path to the module's image. An
  optimization that wouldn't work with multiple root directories for
  modules (/boot/beos/..., /boot/common/...) or when module files were
  moved. get_module() does now always search the image file, when the
  module is still unreferenced. This should be a bit slower than before,
  but I didn't notice any difference in VMware at least. If it turns out
  to be a problem we could introduce a more intelligent cache that stays
  up to date by using node monitoring.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-26 23:59:53 +00:00
Ingo Weinhold
e8d3eff968 * vfs_normalize_path() and _user_normalize_path() use a common helper
function (normalize_path()), now. There was some code duplication
  before.
* Added "bool traverseLink" parameter to vfs_normalize_path(). When
  true and the leaf component is a symlink, it will be resolved.
* KPath:
  - Added similar leaf link traversal parameter to SetTo() and
    SetPath().
  - Added Normalize().
  - Added DetachBuffer(), which returns the object's current buffer and
    unsets itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-26 23:30:28 +00:00
Ingo Weinhold
0914d6da5a Removed debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-26 23:08:29 +00:00
François Revol
a3d8a94533 Hack to fix building for R5. Should go away later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-26 15:30:32 +00:00
Ingo Weinhold
b22c760c73 Added header directory missing for <asm_defs.h>. Should fix the build on
BeOS compatible platforms.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-26 13:36:29 +00:00