Commit Graph

25932 Commits

Author SHA1 Message Date
Karsten Heimrich
6163f3334b * some more cleanup
* pass the target directly to AddItemMenu
* use default paramter to enable the menu item
* fixed messenger leaks for file panel and resizer window messenger
* show the job config panel when the 'Print' menu item is invoked + shortcut 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 00:24:21 +00:00
Ingo Weinhold
9837b719af Some documentation on swap file support by Zhao Shuai.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 22:09:45 +00:00
Ingo Weinhold
ddeb7bfaf1 Changes by Zhao Shuai and myself:
* The VMAnonymousCache destructor was unreserving too much physical
  memory.
* Addressed TODO in _SwapBlockBuild(): When the swap block couldn't be
  allocated we wait and loop until it can.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 22:04:17 +00:00
Karsten Heimrich
56b0c7b90d * cleanup, no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 21:48:06 +00:00
Bruno G. Albuquerque
ec44f528d8 - Added handling for the table of contents (toc) attribute. Now it is ready to
retrieve CDDB information. This is coming as soon as I have real time (as
  opposed to some minutes during lunch) to work on it.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 17:43:10 +00:00
Bruno G. Albuquerque
dcf3842b09 - Changed the well-known "Downloads" dir to be named "downloads" for
consistency.

All well-known directories in the home dir ("mail", "people", "config") are all
lowercase. The only exception was the "Downloads" one.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 16:58:47 +00:00
Stefano Ceccherini
c63991d1f5 fixed warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 15:07:14 +00:00
Stefano Ceccherini
d02fd30b90 We were leaking memory every time a BPicture was drawn. Also check if the allocations succeeded. Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 13:57:29 +00:00
Bruno G. Albuquerque
e1d9b81384 - AttributeIterator::Update() now take into account differences between its
view of the small data section and the outside view.

Long version:

AttributeIterator is a higher level class designed to make it easy to iterate
through attributes in the small data section. The first attribute in the small
data section is the special "name" attribute that is used to reconstruct the
node path when you only have a node handy. As this attribute is not user
visible nor user modifiable (except by changing a node name of course), it is
considered a special attribute so the AttributeIterator class ignores it and
starts iterating from the second attribute on.

As opposed to this, internally the Inode class accesses the small data section
directly without using the AttributeIterator class so whenever it indexes items
in the small data section, it takes into account the special "name" attribute.

This creates a off-by-one relationship between those 2 representations and this
was a problem because whenever the small data section changed, all iterators
had to be updated (through a call to AttributeIterator::Update() having an
index parameter that represented the outside view and not the AttributeIterator
view, so iterators would not be adjusted correctly and the end result is that
every other attribute was not removed from the index. This would cause all
types of havoc with indexes, the simplest one being that entries in indexes
would point to non-existing nodes.

Ingo, pleased now? ;)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 12:25:15 +00:00
Stefano Ceccherini
b6ebf6d8ae patch by PieterPanman which fixes bug #2666. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 12:19:40 +00:00
Rene Gollent
df5d28d4d9 Style cleanup.
When asked to toggle playback, PlaybackManager never checked if it had a previous playback state to copy from. This caused a crash if playback was toggled via the keyboard when no file was loaded. Fixes ticket #2664 .


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 00:40:10 +00:00
Ingo Weinhold
b9f431f1df Extended debugger language: Dereferenced addresses are now supported as
left hand side of assignments. IOW it is possible to modify memory, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 00:24:06 +00:00
Ingo Weinhold
18f2a9c17d Added support for architecture specific debug variables, e.g. for
referencing iframe registers. Their prefix is "$". E.g. "$eax" refers to
the eax register of the current iframe. The features cooperates with the
"in_context" command, i.e. "in_context 92 $eip = 0" will set the eip
register of thread 92 to 0 (thus sealing its fate ;-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 23:01:43 +00:00
Ingo Weinhold
23fdebca54 * Added option "-b <count>" to "dis". It causes up to <count>
instructions to be printed before the given address. The feature is
  implemented by looking up the address of the previous symbol for the
  given address and disassembling forward (two passes).
* The instuction at given address is printed highlighted (blue).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 21:53:43 +00:00
Ingo Weinhold
1b20a9a58e arch_debug_get_interrupt_pc() does now also support the currently
debugged thread, if set. This makes "dis" without specified address work
when used with "in_context".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 21:46:10 +00:00
Jérôme Duval
2aa5367afb extended debug check for FS_CALL() to others FS_CALL() versions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 19:52:10 +00:00
Jérôme Duval
8cf7754bc7 added a check in FS_CALL() for null hooks in KDEBUG mode
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 19:26:51 +00:00
Ingo Weinhold
cd56082077 * Register command with add_debugger_command_etc() and show some nicer
usage text.
* Removed "length" parameter from disasm_arch_dump_insns() and the
  instruction count limit. If at all this should be an architecture
  implementation specific limitation.
* In the x86 case we use an input hook instead of a fixed buffer, now.
* Addressed TODO: If no address is given, the current iframe's PC is
  used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 18:16:31 +00:00
Ingo Weinhold
de5fcb8ab4 * The IOScheduler does not create as many operations as it can before
executing them. Doesn't really make any difference ATM.
* Handle B_BUSY returned by DMAResource::TranslateNext() correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 17:00:42 +00:00
Ingo Weinhold
025f7c3289 A DMABuffer doesn't have a fixed bounce buffer assigned anymore. We do
dynamically assign one when needed. Under the assumption that in most
cases a bounce buffer isn't needed, we can thus prepare a lot more
operations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 16:57:31 +00:00
Bruno G. Albuquerque
fb3edfeb27 - TAB is a valid character in a file name (although weird) and it also needs to
be escaped.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 13:14:25 +00:00
Jérôme Duval
65e6fe82ad better check the size of the chars table for keymaps. this avoids crashing in #2659.
dunno why the keymap is invalid though


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 12:28:27 +00:00
Ingo Weinhold
ded820241d Added optional debug facility (can be enabled by defining
TRACK_PAGE_USAGE_STATS): The page daemon tracks the distribution of page
usage counts. Can be printed using the "page_usage" command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 23:41:44 +00:00
Ingo Weinhold
aacb158ca2 * The LIMIT_AVAILABLE_MEMORY macro can be defined to limit the amount of
RAM Haiku uses (for debugging purposes).
* "page_stats" prints some more infos now.
* page_writer():
  - Moved the low_resource_state() invocation out of the inner loop.
    Reduces lock contention on the sLowResourceLock recursive lock.
  - Additional debug output: Every 1024 written pages the page writer
    prints a message.
* steal_pages(): Addressed the TODO: When there should be pages to
  steal, but we can't get them ATM, we now timeout on the free pages
  condition variable instead of snoozing unconditionally, so that we
  wake up earlier when someone frees pages in the meantime.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 23:38:59 +00:00
Bruno G. Albuquerque
e07a4b3be0 - Correct the index number when calling _RemoveSmallDat() with an index.
This may be masking out a different bug.
- This fixes part of bug #2614. It may even fix all of it but I have to 
  test.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 22:16:12 +00:00
Ingo Weinhold
ed43619500 * vm_page: Swapped members usage_count and wired_count. We lost 4 bytes
due to alignment padding before.
* Reorganized merging of caches a bit. Renamed MergeStore() to Merge()
  and moved some more functionality into it. The method also moves the
  pages from source to consumer, now. This is necessary, since
  VMAnonymousCache needs to consider both physical pages and swap pages
  at the same time. Before we first moved the physical pages and the
  swap pages later, which was broken for two reasons: (1) A swap page in
  the consumer cache shadows a physical page of the source cache, which
  we ignored. (2) A source cache's physical page that also had a swap
  page would lose the latter in the process when moved to the consumer
  cache, i.e. if the page was not marked modified, it could be stolen
  and its data would be lost.

These changes improve the situation when building Haiku with 256 MB RAM
in that jam doesn't crash anymore, but in my test the system became
totally unusable after about an hour or 7000 targets (GUI froze). For
some reason it didn't manage to free pages anymore although swapping
heavily.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 19:01:01 +00:00
Ingo Weinhold
fa2fa606af Added kernel tracing for the swap support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27178 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 14:54:28 +00:00
Stephan Aßmus
fe34b1990b * Fixed bug with cropped scaled bitmaps, the wrong offset was used. This fixes
a regression in MediaPlayers peak display where the last row of pixels was
  wrong.
* Fixed clipping rect bugs in the new bilinear scaling loops, the last row
  and/or columns don't always need special treatment, only if they map to the
  last row and/or column of the destination bitmap.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 14:30:57 +00:00
Stephan Aßmus
725b24098d * Fix display update when toggling the scaling mode when the video is paused
without disturbing the same thing during normal playback.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 14:23:22 +00:00
Salvatore Benedetto
0650565811 * Removed +1 in calculating utf string length as the null char was already included
* Improved debug output


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 13:00:51 +00:00
Salvatore Benedetto
c5855c9ef4 * Clean up, no functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 12:58:24 +00:00
Jérôme Duval
3f60937555 Patch from mattlacey: Apply screen saver selection when it's selected, not on closing. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 12:19:34 +00:00
Fredrik Modeen
6ecf7db5fd Code cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:16:40 +00:00
Fredrik Modeen
88b0546730 Code cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:16:31 +00:00
Fredrik Modeen
9ae4d7e586 Code cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:16:14 +00:00
Stephan Aßmus
c1111e046b * When playing with the MediaPlayer and toggling bilinear versus
nearest neighbor scaling, I noticed that the bilinear version
  actually used less CPU than the generic AGG code path with nn
  scaling. So I wrote an optimized nn scaling routine for nn
  based on the bilinear scaling code. So the indices into the
  source bitmap are cached. I don't know if this is the optimal
  nn scaling routine, but the CPU usage dropped significantly.
  Only B_OP_COPY is optimized as of yet.
* Optimized the bilinear scaling. When more filtered pixels than
  unfiltered pixels are anticipated, the loops are unrolled to
  special case the very last row/column and bottom right pixel.
  This eliminates the branches in the loops.
* Fixed a bug with partial scaled drawing of bitmaps when it
  used the bilinear scaling, the bitmapShift was in the wrong
  direction.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:09:15 +00:00
Ingo Weinhold
79b5db483c Enhanced scheduler tracing. The reschedule tracing entry does now record
more information of the unscheduled thread, namely its new state and, if
waiting, also the object it is going to wait on. When scheduler tracing
level 2 is enabled, additionally the address where the thread was
preempted is recorded. The latter could be interesting for analyzing
race condition bugs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 00:12:27 +00:00
Ingo Weinhold
982413718d Improved the "ls" command:
* It can now also lookup userland symbols.
* By respecting the currently debugged thread it smoothly cooperates
  with the "in_context" command. IOW it can lookup symbols in any team.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 00:05:16 +00:00
Ingo Weinhold
0739b87ee9 * Added arch_debug_get_interrupt_pc(), which is supposed to return the
PC of the innermost iframe.
* The "in_context" command does now set the currently debugged thread
  respectively.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 23:59:21 +00:00
Ingo Weinhold
ec16be9366 Added i386_get_current_iframe(), returning the innermost iframe, if any.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 23:55:43 +00:00
Ingo Weinhold
290e3dd228 Introduced the notion of a currently debugged thread in the kernel
debugger and added respective getter/setter methods
debug_{get,set}_debugged_thread(). By default the currently debugged
thread is the thread that dropped into the kernel debugger, but commands
like "in_context" can change it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 23:54:49 +00:00
Ingo Weinhold
07569b03c9 * Added kernel private thread_state_to_text() which just calls
state_to_text().
* state_to_text() can now deal with a NULL thread argument.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 23:51:22 +00:00
Jérôme Duval
97686ecc7a also sanitize events added by filters, to be checked with methods too.
this fixes bug #2611


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 22:30:11 +00:00
Alexandre Deckner
07c052f765 - Simplified the logic in Draw, and other small fixes, thanks Karsten!
- Disabled_off picture wasn't archived/unarchived in one_state_mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 21:06:12 +00:00
Alexandre Deckner
bb00ec82e5 - As promised, style cleanup. Hey, it's not even in the build atm, just
noticed :-D


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 19:21:36 +00:00
Salvatore Benedetto
9fd15595d6 * Replace wrong file_cache call with block_cache_get_etc() in Icb::_Read()
* Clean up

I've succefully copied data from a udf partition.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 19:19:35 +00:00
Salvatore Benedetto
2e39d2c54f * Clean up. Not functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 19:07:21 +00:00
Stephan Aßmus
613ecaf5f9 * Added the implementation behind the "Use overlays if available" and "Scale
videos smoothly in non-overlay mode" options.
* Disabled the other controls in the SettingsWindow which are not yet
  implemented.
* Enable and disable Revert button according to settings state.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 16:43:35 +00:00
Ingo Weinhold
757f253a2d Added "in_context" debugger command. It takes a thread ID and a command
line and executes the command line in the context of the specified
thread. E.g. "in_context <thread> db <addr>" allows to read memory from
a team that is not active ATM.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 15:42:27 +00:00
Ingo Weinhold
0deddbe36c Added function parse_next_debug_command_argument(), which parses the
first command line argument of a given command line string.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 15:38:57 +00:00