Commit Graph

29363 Commits

Author SHA1 Message Date
Adrien Destugues
e5b2296d48 Localization of Screenshot app, done by mt. Thanks !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-18 13:20:38 +00:00
Adrien Destugues
d933a73a7f Hungarian translation for AboutSystem from hta.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-18 13:17:07 +00:00
Stephan Aßmus
423eae9f43 Patch by Humdinger: Make the formular attribute of Queries and Query templates
editable in Tracker. Thanks! Fixed #1612.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 18:26:14 +00:00
Axel Dörfler
c5e52ecb78 * cache_sync_transaction() now puts all blocks into the BlockWriter, and
therefore does not unlock anymore while iterating over the transactions.
  This gave other threads the opportunity to finish a transaction, causing
  bug #5412. Also, the BlockWriter will now always close transactions on its
  own, and you need to pass the transaction hash iterator to Add().
* Also, transactions that contain blocks that are currently written back will
  be ignored by the block writer, as well as cache_sync_transaction(). This
  fixes bug #5415.
* Improved error handling if BlockWriter fails to write back blocks. Most
  notably, they are no longer left busy_writing, and the functions calling
  it do proper error reporting (besides block_cache_discard() that does not
  return any erro code; I've added a TODO note there for now).
* The BlockWriter now starts with a larger array once it has to allocate one.
* One can now limit the number of blocks that go into a BlockWriter. This is
  used by the block writer thread, that shouldn't always write back everything
  every two seconds.
* Also, the fixed array is larger now (leaving enough space such that the
  block writer/notifier does not need to allocate anything).
* And finally, if allocating the array fails, the BlockWriter falls back to the
  synchronous write back used previously. IOW it will never write back less
  blocks than you ask for.
* Added static BlockWriter::WriteBlock() method replacing write_cached_block().
* Forgot to rename block_cache::busy_count to busy_reading_count.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 16:36:40 +00:00
Ingo Weinhold
d4af8f3e33 Added several TODOs for problems of the IOBuffer virtual vecs code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 16:00:05 +00:00
Ingo Weinhold
176f7588eb Added warning to vm_map_physical_memory_vecs().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 15:58:12 +00:00
Axel Dörfler
8941a2ba08 * Fixed compilation with PARANOID_HEAP_VALIDATION turned on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 15:40:02 +00:00
Adrien Destugues
33eead339b * Improve the test for TimeFormat (style and error checking)
* Fix the TimeFormat API, there was a double free. Make it work as expected : you send it a number of seconds and it will format it properly in days, hours, minutes, seconds with proper plural.
 * Cleanup other parts of the Format API from useless things. They may get reintroduced later if we feel the need to do so.
 * AboutSystem now use TimeFormat to display the uptime in properly localized way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 15:35:28 +00:00
Stefano Ceccherini
03bab65450 set_hardware_timer() would sometimes (on boot) pass a negative timeout to
arch_timer_set_hardware_timer(). This was harmless, at least with our
current x86 timers implementation, since they checked for minimum timeouts.
Very small cleanup (now that the file is compiled as C++).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 09:12:43 +00:00
Adrien Destugues
b2c385c072 -Added new TimeFormat API for formatting and localizing a time (uptime, copy duration, ...)
-Added a very simple test that shows the API is corrupting memory and ends up crashing
-Fixed build of other locale tests


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 00:02:50 +00:00
Adrien Destugues
cd5274c4c0 Update to the ukrainian translation, done by totish. Thanks !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 21:19:34 +00:00
Ingo Weinhold
1f611c018b The file cache code was completely ignoring the vm_page::modified flag. In
particular it wouldn't set the flag when writing something to a page, but
only move it to the modified queue. Since mapping the page would move it to
another queue, the information that the page was modified would be lost and
it would never be written to disk. Was well reproducible with a Haiku image
build and limited amount of memory.
Fixes the hopefully last remaining cause for #5374.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 17:22:56 +00:00
Ingo Weinhold
6949076049 * Added some more asserts for cached pages.
* full_scan_inactive_pages(): Fixed syntactical glitch (missing "else").
  Affected only the active paging mode and was relatively harmless. The worst
  case would be that an inactive page would be moved to the cached queue
  although its usage_count hadn't dropped to 0 yet, thus freeing it before
  pages that deserved it more.
* move_page_to_active_or_inactive_queue():
  - Was ignoring the page's modified flag, thus potentially moving a modified
    page to the cached queue. That could happen only in rare cases though,
    like when the page was still mmap()ped while being written and modified and
    unmapped before being done.
  - No longer move the page to the inactive queue, even if its usage count is 0.
    In idle mode the page daemon doesn't look at inactive pages, so the page's
    stats wouldn't be updated anymore.
  - Renamed to move_page_to_appropriate_queue().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 17:12:42 +00:00
Ingo Weinhold
665e7ac629 map_page(): Got rid of the activatePage parameter. We always move previously
inactive pages to the active queue. This has the advantage that the page
daemon will keep track of those pages even in idle mode (where it only
processes the active queue).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 16:54:01 +00:00
Axel Dörfler
66a1a16cbc * Made cache_end_transaction(), cache_detach_sub_transaction(), and
block_cache_discard() use the BlockWriter directly as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 14:00:44 +00:00
Axel Dörfler
599b988100 * Fixed coding style violation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 13:26:28 +00:00
Axel Dörfler
e190cae151 * Build fix (bfs_inode::InitCheck() is now const), and cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 12:49:52 +00:00
Axel Dörfler
319a2dee90 * Improved KDL command output (ie. take busy_writing into account, too).
* Added new KDL command "cached_block" that dumps a cached block.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 12:24:54 +00:00
Axel Dörfler
f7f996cc32 * BPlusTree is now using the TransactionListener mechanism to update its private
fHeader copy on failure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 12:23:43 +00:00
Axel Dörfler
fd91cf4d18 * Replaced the specialized inode in transaction mechanism with a generic one.
That costs 12 more bytes per inode on 32 bit platforms, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 11:30:15 +00:00
Axel Dörfler
2a8ae7fb92 * CachedNode::SetToWritable() already needs the updated header, so we need to
Unset() the header in Allocate() before calling it. This fixes bug #5410.
* CachedNode::Allocate() does not need to revert its changes; the transaction
  will take care of that. However, BPlusTree::fHeader is currently not correctly
  maintained if a transaction fails (working on that now).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 08:34:55 +00:00
Axel Dörfler
751e92fde1 * cache_sync_transaction() used an earlier signature of the BlockWriter
constructor, causing bug #5412.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-16 08:16:17 +00:00
Michael Lotz
64bf879506 Finish the implementation of heap_debug_malloc_with_guard_page() using mprotect
to make the guard page inaccessible. Thanks Ingo for the pointer!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 23:48:51 +00:00
Ingo Weinhold
22fb471ff0 * page_writer(): Missing continue in the temporary skipping case.
* vm_page_write_modified_page_range(): Need to DEBUG_PAGE_ACCESS_END() a bit
  later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 23:01:31 +00:00
Ingo Weinhold
4322b983cd Fixed the build with DEBUG_PAGE_ACCESS enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 22:50:28 +00:00
Ingo Weinhold
fa47a7c434 page_writer():
* Use the same criterion when to write back temporary pages as the page daemon.
* Move wired and temporary pages that shall not be written back to the active or
  inactive queue so they don't get stuck in the modified queue and potentially
  cause the page writer to run permanently without actually making progress
  (#5382).

page writing implementation:
* If writing back a temporary page failed, move it back to the inactive or
  active queue, so it doesn't get stuck in the modified queue. If active paging
  continues, it might find its way back to the modified queue in the next
  iteration, but that improves the situation a bit at least. Particularly with
  the port heap pages not really being swappable ATM.
* Never dequeue pages from the modified queue. We mark them busy, so the page
  writer will skip them anyway. This allows others to play with the page to some
  extend (at least allowing to move it between the queues). This fixes #5404.
* Removed PageWriteWrapper::ClearModifiedFlag(). We clear the modified flag in
  PageWriteWrapper::SetTo(), now, so that the page writer doesn't need to do
  that explicitly either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 22:40:37 +00:00
Ingo Weinhold
bf96cfdcbe Added TODO regarding the non-swappability of the initial port heap area.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 22:19:49 +00:00
Ingo Weinhold
3795172c67 VMVnodeCache::AcquireUnreferencedStoreRef(): We put the wrong vnode when ours
was already deleted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 22:18:39 +00:00
Michael Lotz
386c8bad1b Return an error when encountering an invalid allocation info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 21:42:55 +00:00
Michael Lotz
ac653a30df Add heap_debug_set_debugger_calls() which allows to disable debugger calls for
the heap debug panics. Instead syslog output is generated if turned off.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 21:35:07 +00:00
Michael Lotz
c1502cf1b8 Add heap_debug_get_allocation_info() to retrieve the size of the allocation as
well as the thread allocating it. Can for example be used to verify that an
object or buffer is as large as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 20:57:52 +00:00
Jérôme Duval
479e05cec9 fixed a warning
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 20:51:59 +00:00
Michael Lotz
081ff2db28 * Add heap_debug_set_memory_reuse() which allows to disable memory reuse,
keeping all returned heap memory in the 0xdeadbeef state (including the
  first sizeof(void *) bytes otherwise for the free list). While wasting a lot
  of memory it allows you to rely on 0xdeadbeef being always present as no
  future allocation will reuse the freed memory block.
* Also added heap_debug_malloc_with_guard_page() which is intended to allocate
  a memory block so it is aligned that the start of invalid memory past the
  allocation is in an unmapped guard page. However the kernel backend that would
  guarantee this is not yet implemented, so right now this works only by chance
  if no other area happens to be allocated exactly past the created one. With a
  very specifc suspicion you can put that one allocation you get to good use
  though. It causes a crash when accessing memory past the allocation size so
  you actually get a backtrace from where the access happened instead of only
  after freeing/wall checking.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 20:28:15 +00:00
Ingo Weinhold
ba3d62b66f X86VMTranslationMap::UnmapArea(): Don't change the page state before
it has been unmapped. This way modified pages could end up in the "cached"
queue without having been written back. That would be a good explanation for
#5374 (partially wrong file contents) -- as soon as such a page was freed,
the invalid on-disk contents would become visible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 19:36:17 +00:00
Ingo Weinhold
c1f3da7b5b UnmapPage() requires the caller to deal with the debug page access marking,
so the fallback implementations of UnmapPages() and UnmapArea() need to do
that. Not relevant for x86.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 19:10:44 +00:00
Ingo Weinhold
0f2666ecc2 _user_set_memory_protection(): Missing page access debug markers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 18:49:12 +00:00
Ingo Weinhold
b0f5b17072 Removed PageWriteWrapper::CheckRemoveFromShrunkenCache() and moved removing
the page to Done().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 18:47:45 +00:00
Axel Dörfler
a05e4ed330 * BPlusTree no longer caches the header in its own block, instead, it aggregates
a copy of its structure. CachedNode is only used to write to the header, now.
  This should cause the block_cache to no longer have any referenced blocks
  outside of any I/O.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 16:39:54 +00:00
Axel Dörfler
87e7b978aa * Fixed race conditions in the server's bitmap/picture handling: the objects
are now removed from the maps as soon as the client deletes them. This also
  makes the "client reference" mechanism superfluous I introduced earlier.
* ServerApp::SetCurrentCursor() must always call Desktop::SetCursor(), since it
  is also called whenever the current application changes. This fixes the cursor
  almost never changing.
* Renamed ServerPicture::Usurp()/StepDown() to PushPicture(), and PopPicture().
* Also, they now acquire a reference to the picture in question (ie. the picture
  you get from PopPicture() also owns a reference you need to free).
* ServerApp::CreatePicture() may fail, too. This case is now handled in the code
  that calls it.
* Previously, the ServerWindow tried to process up to 70 messages in one go.
  That obviously caused bug #4709. Now, we have the additional requirement to
  not hold the desktop lock for longer than 25 ms. I haven't tested it with
  Kaleidoscope yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 14:50:53 +00:00
Axel Dörfler
aeb689782c * Removed ServerCursorReference in favour of BReference.
* Simplified the Desktop::SetCursor() code a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 14:43:09 +00:00
Axel Dörfler
abf0b1523a * Removed unneeded comment/code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 14:39:48 +00:00
Axel Dörfler
a3ec278add * Made some internal lists use DoublyLinkedLists instead of struct list.
* Added a few KDL commands to improve your debugging experience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 13:28:33 +00:00
Axel Dörfler
965abdebd5 * BufferQueue::Free() no longer will return negative values. As is, the max
bytes restriction is only a soft limit. This fixes stalling TCP connections
  because everything received would be out of window once this happened.
* Added a TODO to look into TCP's window management - it doesn't seem to be
  right.
* Fixed build with tracing turned on.
* Made the fNumber member of tcp_sequence private.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 13:27:26 +00:00
Axel Dörfler
10cb62616f * Fixed destruction order of lock/reference that could lead to access already
deleted memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 13:23:48 +00:00
Axel Dörfler
54f3267e78 * Fixed maintaining the object depot's free magazine count (it's not really used
though).
* Added/improved some KDL commands to make the slab easier to work with from
  KDL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 13:22:58 +00:00
Axel Dörfler
2cb3c4eb06 * Improved panic output I recently ran into.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 13:20:01 +00:00
Axel Dörfler
4ea83177ff * Implemented a BlockWriter class that now performs writing back blocks.
* Renamed the "busy" stuff to "busy_reading", and added a "busy_writing"
  concept.
* This now allows reading a block (and other blocks), while blocks are written
  back. This should speed all operations needing to write back blocks, like
  unzipping or compiling.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-15 13:07:14 +00:00
Axel Dörfler
fb40740174 * Restructured the notification driven addition/removal of drivers to
driver_events (ie. there is now only a single list to walk).
* Also, the DriverWatcher is now maintained using the driver_events.
  This fixes bug #5005.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-14 22:57:47 +00:00
Axel Dörfler
15fd71bfff * Fixed artwork directory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-14 22:29:29 +00:00
Axel Dörfler
3d2b15cdf9 * Reorganized the new/generate menus a bit; the last level will now be
remembered, and a "new" will just continue in this level.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-14 22:29:01 +00:00