25919 Commits

Author SHA1 Message Date
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
hrev27191
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
hrev27190
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
hrev27189
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
hrev27188
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
hrev27187
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
hrev27186
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
hrev27185
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
hrev27184
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
hrev27183
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
hrev27182
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
hrev27181
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
hrev27180
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
hrev27179
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
hrev27178
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
hrev27177
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
hrev27176
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
hrev27175
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
hrev27174
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
hrev27173
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
hrev27172
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
hrev27171
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
hrev27170
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
hrev27169
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
hrev27168
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
hrev27167
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
hrev27166
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
hrev27165
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
hrev27164
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
hrev27163
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
hrev27162
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
hrev27161
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
hrev27160
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
hrev27159
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
hrev27158
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
hrev27157
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
hrev27156
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
hrev27155
2008-08-22 15:38:57 +00:00
Stephan Aßmus
26e9cdb72c I shouldn't push my luck too much, so I'm commiting these WIP changes:
* Removed unmaintained makefile.
* Renamed TPreferences to SettingsMessage, which better describes the beast.
* Renamed setter functions in SettingsMessage for more convenient use.
* Added getter functions which take a default value argument that is returned
  when there is no value for the given key.
* Cleanup in Settings.[h|cpp], made things simpler and more convenient. Removed
  redundant saving of the settings/message, which SettingsMessage already takes
  care of. Added a global instance of the application settings.
* Some cleanup in FileReadWrite and Playlist.
* Reimplemented the SettingsWindow with the new layout API, the old code is
  still in place for compiling for BeOS.
* Added two more check boxen for the overlay and bilinear scaling option I
  intend to add eventually.
* Refactored the rest of the code in SettingsWindow to use the new global
  settings instance and also support a Revert feature. All the new controls are
  only available in Haiku though.
* Enabled the Settings... menu entry in the Settings window for access to
  the SettingsWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27154 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27154
2008-08-22 15:28:59 +00:00
Bruno G. Albuquerque
a0e3096f6a - Fixed Backgrounds Tracker add-on. I have no idea how some people seem to not
be able toreproduce it before.
- Don't try to access methods in a NULL object. :)
- This fixex bug #1128.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27153 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27153
2008-08-22 15:05:44 +00:00
Ingo Weinhold
16cfc87748 * Added option "-s" to the "thread" command, which prints the info in
short form (like "threads").
* "thread" allows to specify more than one thread now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27152 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27152
2008-08-22 14:29:00 +00:00
Salvatore Benedetto
43a5ec83ef * Added some more TRACE, eventually they will be removed
* replace sizeof(dirent) with sizeof(struct dirent) as the pointer passed was called dirent!
that would cause d_reclen to be set to the wrong value, making panic. Thanks Stefano!

I finally managed to mount and list its content.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27151 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27151
2008-08-22 13:30:46 +00:00
Salvatore Benedetto
56b5c63783 * Replaced some more PRINT with TRACE
* applying our coding guidelines here and there but not everywhere :-)
* no functional changes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27150 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27150
2008-08-22 13:26:58 +00:00
Michael Pfeiffer
e85eb9ba1c Show partitions that have a file system in list of bootable partitions only.
This fixes part 2 of ticket #2477.
Next is to implement the ioctl B_GET_BIOS_DRIVE_ID, any taker?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27149 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27149
2008-08-22 13:17:32 +00:00
Stefano Ceccherini
e3dc743451 Building the floppy (and consequently, the cd) boot image was broken since some revisions, due to now missing block_io module
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27148 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27148
2008-08-22 12:53:38 +00:00
Bruno G. Albuquerque
e645c32e77 - Further updated supertypes.
- Could not find a suitable icon for multipart files. Ideas?
- Added missing descriptions and fixed the image descriptions.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27147 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27147
2008-08-22 12:33:07 +00:00
Axel Dörfler
d262deae17 * The MIME type menu in the find panel now shows the MIME type icons, if any.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27146 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27146
2008-08-22 12:30:00 +00:00
Axel Dörfler
95199ce40b * Moved mp3 attributes over to the super type.
* Improved super type descriptions.* Moved mp3 attributes over to the super type.
* Improved super type descriptions.* Moved mp3 attributes over to the super type.
* Improved super type descriptions.* Moved mp3 attributes over to the super type.
* Improved super type descriptions.* Moved mp3 attributes over to the super type.
* Improved super type descriptions.* Moved mp3 attributes over to the super type.
* Improved super type descriptions.* Moved mp3 attributes over to the super type.
* Improved super type descriptions.* Moved mp3 attributes over to the super type.
* Improved super type descriptions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27145 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27145
2008-08-22 12:20:52 +00:00
Axel Dörfler
d125d984a6 * IconMenuItem now falls back to the icon of the super type, if a MIME type
didn't have one.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27144 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27144
2008-08-22 12:06:50 +00:00
Axel Dörfler
206c62f036 * Got rid of the "count" parameter and maintenance altogether - makes the code
much simpler.
* Simplified code to compute "start", ie. the index of the first MIME type menu
  item.
* Promote MIME types to the top-level if their super type don't add any
  attributes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27143 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27143
2008-08-22 12:01:27 +00:00
Axel Dörfler
090da60b27 * Renamed CreateMimeMenu() to AddMimeMenu(), as it now also adds the menu to
its parent. The item count of the parent is now actually adjusted, so that
  additional entries are found.
* AddMimeMenu() now returns the menu of an already existing MIME type. Hence,
  we don't add the supertype menu twice anymore for each type, or don't add
  the second type at all when called again.
* Cleaned up naming, consistent use of "* " vs. " *".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27142 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27142
2008-08-22 11:46:50 +00:00