Commit Graph

26831 Commits

Author SHA1 Message Date
Stefano Ceccherini
3beb2f72d7 style changes. Also added a TODO taken from a comment in bug #575
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 11:02:58 +00:00
Stefano Ceccherini
0e79ce1ebc Style changes. don't use new to allocate a 2-sized buffer, but use the stack
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 10:43:02 +00:00
Stefano Ceccherini
c9e6288649 Fixed every (hopefully) CID cases of delete where delete[] should have been used. CID 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 147, 148, 149, 150
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 09:52:45 +00:00
Axel Dörfler
08facac73e * Fix for a "error values are positive" assumption in the RTL-8139 driver.
This should enable internal MII PHY detection again, thanks to Siarzhuk for
  finding this!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 08:49:16 +00:00
Stefano Ceccherini
2d4df7f2fc CID 80. err was checked twice for the same value. Also add more error checks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 08:33:09 +00:00
Stefano Ceccherini
b0acb3febf Don't leak the BMediaFile. CID 5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 08:14:07 +00:00
Ingo Weinhold
0135e2e324 * Increased the maximum profiling caller stack depth significantly.
* Extended the profiling API by an option to record a variable number of
  samples per tick. The stack depth is used as a maximum.
* Added new option "-f" to the "profile" tool. When specified it
  increments the hit counts of all symbols in the full available caller
  stack. I.e. the resulting hit counts will approximate the total time
  spent in each function or any function directly or indirectly called
  by it. Thus "_start" and "main" will usually get 100% and leaf
  functions only what time has actually been spent in them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 01:08:27 +00:00
Ingo Weinhold
114c07e6e2 Overdue copyright update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 23:17:48 +00:00
Ingo Weinhold
ab30ce0e84 * Removed obsolete B_DEBUG_MAX_PROFILE_FUNCTIONS.
* Relaxed the stack depth and profiling interval limits a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 23:03:25 +00:00
Michael Lotz
56c05e04af Actually only allow bytes per row > 0 or B_ANY_BYTES_PER_ROW. Still we don't
actually handle other invalid bpr values like if the width doesn't really fit
into the provided bytes per row for example.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 19:42:35 +00:00
Michael Lotz
f8b51708a6 In case there is no error field in the reply message, make sure that we don't
continue with B_OK. This also fixes CID 1122 where in such a case an
uninitialized token would be returned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 18:15:50 +00:00
Michael Lotz
dde69daea3 Also close the input file in case of success. Fixes CID 935.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 18:08:00 +00:00
Michael Lotz
e2891a435a Don't leak the argv array that is passed to ArgvReceivedEx(). Its contents
are only used to open supplied files by name, it doesn't take ownership.
Fixes CID 934.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 18:03:39 +00:00
Michael Lotz
708f792ecc In r16700 the name and meaning of that loop condition variable was flipped
around, but the condition itself wasn't which resulted in the code never being
executed. Fixes CID 88.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 17:57:31 +00:00
Michael Lotz
e55f4dd23c Remove check for a supplied bytesPerRow < 0. Negative values are valid and
indicate that a default bytes per row for a certain color space and width
should be used (B_ANY_BYTES_PER_ROW). Fixes CID 55.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 17:49:33 +00:00
Axel Dörfler
4a47b14ea4 * Enlarged a single kernel_args chunk to 32 KB (was 16 KB).
* Reduced the kernel_args array size from 32 to 16 (7 are used on a normal
  build).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 15:36:46 +00:00
Ingo Weinhold
65a9d40a9d * Added hash_dump_table() function, dumping the whole table.
* Fixed hash_remove_current(): It didn't update "lastElement" and thus
  always also removed all elements in the same bucket preceding the one
  to be removed. Also got rid of the useless "for" loop.
  Fixes #2757.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 14:58:40 +00:00
Ingo Weinhold
0be39a3a0d Rather use the new _kern_read_kernel_image_symbols() syscall to use
kernel image symbol tables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 11:17:30 +00:00
Ingo Weinhold
8839d592bc Added syscall _kern_read_kernel_image_symbols() for reading a kernel
image's symbol and string tables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 11:13:38 +00:00
Axel Dörfler
8c8b846226 * Do not try to recreate the path of a preloaded module if a full path has been
passed in by the boot loader.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 09:13:30 +00:00
Axel Dörfler
18ee966f0a * The boot loader now replaces the first path component of all path names
passed to the kernel with "boot" instead of the volume name; the kernel
  mounts the boot volume always as "/boot".
* This should fix #2757.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 08:58:07 +00:00
Rudolf Cornelissen
80d6ff9e6f IDE busmanager did not honor the user's failsafe startup item disable IDE DMA. Now it does. This reveals another error in the busmanager: PIO mode doesn't work on my systems: can't find boot volume.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 06:36:45 +00:00
Rene Gollent
1ad71ed0a0 Fix a couple of broken FLOW traces.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 02:10:14 +00:00
Ingo Weinhold
7ada326834 Also store the string table size for an image. This helps to improve the
symbol name len check.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 23:38:46 +00:00
Ingo Weinhold
061eba4a0f Implemented various command line options and updated usage text.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 22:31:18 +00:00
Ingo Weinhold
32f1784d37 Doubled heap size to 128 KB. Should hopefully fix bug #2756.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:43:12 +00:00
Ingo Weinhold
5a150dfe6d * Added optional tracing for allocations.
* Lifted hard-coded 64 KB heap limit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:42:17 +00:00
Stephan Aßmus
6152a5bc58 Added a test for BTextView. It is quite basic yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:37:22 +00:00
Ingo Weinhold
cc3b6f3a05 malloc() now also logs an error when a request could not be served.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:25:58 +00:00
Ingo Weinhold
4ed420362a Log an error when there's not enough memory for the inode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:19:25 +00:00
Rene Gollent
90b7764dc3 Move WidthBuffer and TextGapBuffer into BPrivate and use them from there in BPoseView and BTextView. This (correctly) fixes the previous gcc4 build issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 20:47:16 +00:00
Axel Dörfler
5cb80a0cd8 * Also set the mbuf::m_pkthdr.len field before passing it to ether_output().
* This should help with bug #1874.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 20:40:06 +00:00
Rene Gollent
40ca6c57ee Declare BPoseView as a friend of BTextView. This allows it to use the private width buffer classes, and fixes the gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 18:03:17 +00:00
Ingo Weinhold
eebbbf4494 Reduced the minimum timeout enforced by apic_set_hardware_timer() from
1 ms to 1 us. The long minimum timeout seriously screwed profiling,
since by default it works with 1 ms ticks, stopping the timer when the
thread is unscheduled and restarting it with the remaining time when it
is scheduled again.

I could also imagine that this had a negative effect on latencies and
the precision of thread wakeup times.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 16:53:50 +00:00
Ingo Weinhold
7326b92ce0 user_debug_update_new_thread_flags() was setting some of the thread
flags on the wrong thread (the current one instead of the newly created
one). This would cause the thread not to be debugged as it should, e.g.
profiling wouldn't work correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 16:41:49 +00:00
Stephan Aßmus
8864334702 * First steps towards making BTextView behave well within the layout management.
* The class calculates a minimum width now, which is based on the line height,
  this may also fix the bug with the small text inputs in the Pe Find window.
* Added TODOs about implementing GetHeightForWidth(), which may be a good idea
  when a BTextView is used as non-editable informative text in an interface,
  and one wants to make sure that the entire text is shown.
* Replaced the call to _Refresh() in Draw(), which recalculates all the line
  breaks for no reason with _DrawLines() again. The TODO mentioned that text
  will be drawn without drawing the background first, but maybe this is a
  relict from times where Draw() was invoked directly? At least I cannot see
  any negative consequences, and this should be much more efficient.
  (Other than that, this patch should hopefully have no potential negative
  side effects...<crosses fingers>)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 15:36:44 +00:00
Stephan Aßmus
53aaed9f6b Forgot to delete fLayoutData in destructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 15:29:02 +00:00
Ingo Weinhold
d73be01714 Also load all kernel images and their symbols. They are not tracked, but
usually they won't change during the runtime of the profiled program
anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:06:50 +00:00
Ingo Weinhold
d8b24b47e3 Made SymbolLookup safe to be used for the kernel team. Only the image
file based functionality will be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:02:13 +00:00
Jérôme Duval
82368346f8 fActiveVolume should always be set, and only switch volumes if needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:01:56 +00:00
Ingo Weinhold
b34e395eaf The boot loader does now set the names of the images it loads to the
full paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:00:31 +00:00
Ingo Weinhold
6aa2c9ecf1 * Directory stores its parent directory (if any), now.
* Adjusted used files systems accordingly.
* BFS::Stream::GetName() was broken. It accessed the small data region
  which wasn't loaded, since BFS::Stream derived from bfs_inode, which
  is a variably-sized structure with the small data region at the end.
  Changed that to a ref-counted, shared member instead.
* Implemented RootFileSystem::GetName().
* Added Directory::GetPath() to get a full path of the directory or an
  entry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 12:55:41 +00:00
Axel Dörfler
b33ba0e92e * Followed Marcus' suggestion and made the array a static const one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 12:14:54 +00:00
Stephan Aßmus
e6378518c4 Fixed typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 09:15:35 +00:00
Stephan Aßmus
6168332c35 Sorry, should have been part of r27660. Moved BTextView::UndoBuffer derivatives
into BTextView class as well, hopefully fixing the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 08:43:06 +00:00
Stephan Aßmus
8ab8c63d26 Moved BTextView::UndoBuffer derivatives into the BTextView class as well,
hopefully fixing the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 08:42:02 +00:00
Ingo Weinhold
5c4cde5afa * Some renaming.
* Also print dropped ticks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 22:04:42 +00:00
Ingo Weinhold
ecfad924e0 Solution for the potential deadlock when needing to flush the profiling
buffer during a timer event that interrupted a kernel function: We do
now flush the buffer as soon as it is 70% full, *if* we didn't interrupt
a kernel function. When the buffer runs full and we still haven't hit a
user function, we drop the tick. The number of dropped ticks is recorded
and sent to the debugger with the next update message.
Reverted the previous partial solution (the temporary disabling of
profiling while in debugger support code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 22:04:03 +00:00
Ingo Weinhold
1ecc0a33db * Completed image tracking using the image event counter sent with
various debugger messages. We do now correctly match all sampled
  addresses.
* Update the saved info of a team's main thread after exec*(), so we
  can print a more useful name.
* Improved the output: The images are listed in a table, now. The
  function table also includes the image IDs for the functions.
* Cleaned up debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 20:44:19 +00:00
Ingo Weinhold
eba9a4c3ee * Introduced a per-team counter that is incremented whenever an image
is created or deleted (or exec*() has been invoked). The counter is
  sent with several debugger messages.
* Track the image event counter that is used when samples are added to
  the profiling buffer. If the current team counter differs, we flush
  the buffer first (sending an update message to the debugger), so that
  the debugger has a chance to match the addresses to the correct images.
* Disable profiling for a thread while it runs in the debugger support
  code. This fixes potential deadlocks which could occur when a
  profiling timer event occurred that would require the buffer to be
  flushed while the thread was just sending something to the debugger or
  waiting for a command. As it turns out, this is not sufficient either,
  since we should never try to flush the buffer when the timer event
  occurred in the kernel, since the thread might hold a lock that the
  debugger thread could try to acquire. Will implement a more general
  solution later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 20:37:10 +00:00