OSDN Git Service

android-x86/system-extras.git
11 years agoMerge "Add vldr vstr type benchmarking."
Christopher Ferris [Wed, 3 Jul 2013 01:12:23 +0000 (01:12 +0000)]
Merge "Add vldr vstr type benchmarking."

11 years agoAdd vldr vstr type benchmarking.
Christopher Ferris [Tue, 2 Jul 2013 23:38:45 +0000 (16:38 -0700)]
Add vldr vstr type benchmarking.

Merge from internal master.

(cherry-picked from commit 65d2c7894a93f66ea41d55f843285e7e7bdbf488)

Change-Id: I854b5f310fa44efcaf93af14b84ffe5673cc46c0

11 years agoMerge "Add a benchmark of strcpy."
Christopher Ferris [Wed, 26 Jun 2013 23:42:26 +0000 (23:42 +0000)]
Merge "Add a benchmark of strcpy."

11 years agoAdd a benchmark of strcpy.
Christopher Ferris [Wed, 26 Jun 2013 20:42:18 +0000 (13:42 -0700)]
Add a benchmark of strcpy.

List of all changes:
- Add a strcpy benchmark.
- Create a macro that is used to create all of the code for the main
  loop of the benchmark.
- Fix the strcmp benchmark to use two buffers. The single buffer was
  an experiment that should not have been committed. It also crashes
  when a large alignment is used because it hard-coded an extra 2048
  allocation regardless of the alignment chosen.
- Modify the libc benchmarks to take the function to bench as a
  parameter. This will allow us to benchmark new potential libc
  optimizations by adding a single line to the function table list.

Merge from internal master.

(cherry-picked from commit 014cf9dc226a775e27b2e6ace2461c510d9c6c19)

Change-Id: I8848e309fa1b323fe98f4525eb0f27a889fd0a7f

11 years agoMerge changes I707570ad,I900b673d,I62310b2c,I6b030d9d,I8f5a55de,I51a12fb8,I857143a5...
Colin Cross [Mon, 24 Jun 2013 22:57:08 +0000 (22:57 +0000)]
Merge changes I707570ad,I900b673d,I62310b2c,I6b030d9d,I8f5a55de,I51a12fb8,I857143a5,I95025d52,I6367555d,I7d80e2b4,If4a4a2bb,I884eedea,Ibd0b26e4,Ia145018d,I2706e6fb,Ib1467329

* changes:
  procrank: add support for only showing cached, noncached, or KSM pages
  libpagemap: add pm_process_usage_flags
  librank: add flag to show only KSM pages
  libpagemap: fix new kernel flag names to start with PM_PAGE_
  librank: show swapped pages per library
  procrank: show swapped pages per process
  libpagemap: count swapped pages
  librank: add command line argument for cached or non-cached pages
  libpagemap: add pm_map_usage_flags
  librank: add command line argument to show all mappings
  libpagemap: add page flags for new kernels
  librank: add permissions command line argument
  libpagemap: add definition for mask of permission flags
  librank: convert argument parsing to getopt_long
  libpagemap: fix vss calculation
  libpagemap: fix reusing previous name for mappings with no name

11 years agoprocrank: add support for only showing cached, noncached, or KSM pages
Colin Cross [Sat, 22 Jun 2013 00:02:05 +0000 (17:02 -0700)]
procrank: add support for only showing cached, noncached, or KSM pages

Add the -c, -C, and -k arguments to only show pages that are
cached (backed by storage), non-cached (backed by ram or swap),
or have been collapsed by KSM respectively.

Change-Id: I707570ad406106b0aca230d18f9945901d193aca

11 years agolibpagemap: add pm_process_usage_flags
Colin Cross [Sat, 22 Jun 2013 00:01:06 +0000 (17:01 -0700)]
libpagemap: add pm_process_usage_flags

Add pm_process_usage flags to get memory usage by a process, only
counting pages with specified flags set.

Change-Id: I900b673ddbb5ae92312773a8670dd59769617268

11 years agolibrank: add flag to show only KSM pages
Colin Cross [Fri, 21 Jun 2013 23:53:03 +0000 (16:53 -0700)]
librank: add flag to show only KSM pages

Passing -k will cause librank to only show KSM pages.  The RSS
column will approximate the memory used before KSM, and PSS will
show the memory used after KSM.

Change-Id: I62310b2cda97316b835cf7ebe51b5155872c37dc

11 years agolibpagemap: fix new kernel flag names to start with PM_PAGE_
Colin Cross [Fri, 21 Jun 2013 23:52:08 +0000 (16:52 -0700)]
libpagemap: fix new kernel flag names to start with PM_PAGE_

Change-Id: I6b030d9d0356d63b3ddb853de304407bc70b38c4

11 years agolibrank: show swapped pages per library
Colin Cross [Fri, 21 Jun 2013 19:55:56 +0000 (12:55 -0700)]
librank: show swapped pages per library

Add a column showing swapped pages per library, but only show it
if swapped pages exist in at least one library.

Change-Id: I8f5a55dee7ed8d1f02ed7c947f6a22f7a5771eb8

11 years agoprocrank: show swapped pages per process
Colin Cross [Fri, 21 Jun 2013 19:54:13 +0000 (12:54 -0700)]
procrank: show swapped pages per process

Add a column showing swapped pages per process, but only show it
if swapped pages exist in at least one process.

Change-Id: I51a12fb8999c2a73418277fd575e7109478667d5

11 years agolibpagemap: count swapped pages
Colin Cross [Fri, 21 Jun 2013 19:53:51 +0000 (12:53 -0700)]
libpagemap: count swapped pages

Add a new memusage field for swapped pages.

Change-Id: I857143a5fdd294315dd89e834b1217a219f10479

11 years agolibrank: add command line argument for cached or non-cached pages
Colin Cross [Thu, 23 May 2013 19:57:36 +0000 (12:57 -0700)]
librank: add command line argument for cached or non-cached pages

Add -c and -C command line arguments to only count pages that are
cached (backed by storage) or non-cached (backed by ram or swap)
respectively.  Non-cached pages include all anonymous pages, as
well as file backed pages that are mapped private and then modified.

Change-Id: I95025d52f1c876b9c41fcbddaef5e95e32ebf307

11 years agolibpagemap: add pm_map_usage_flags
Colin Cross [Thu, 23 May 2013 19:53:14 +0000 (12:53 -0700)]
libpagemap: add pm_map_usage_flags

Add pm_map_usage_flags, which is the same as pm_map_usage but only
counts pages with the specified flags set.  This can be used to
only count "swapbacked" pages, which are pages that cannot be
flushed back to disk without using swap.

Change-Id: I6367555d9385502c797935849bb4221a8354e251

11 years agolibrank: add command line argument to show all mappings
Colin Cross [Thu, 23 May 2013 19:38:54 +0000 (12:38 -0700)]
librank: add command line argument to show all mappings

Add -a command line argument to show all mappings, including
anonymous, stack, and heap mappings.

Change-Id: I7d80e2b4f5d880d434f57e1e7a37678917cd7407

11 years agolibpagemap: add page flags for new kernels
Colin Cross [Wed, 22 May 2013 02:48:18 +0000 (19:48 -0700)]
libpagemap: add page flags for new kernels

Change-Id: If4a4a2bbe9b1a68c5dce1151cf8b7c60cae1a3fa

11 years agolibrank: add permissions command line argument
Colin Cross [Wed, 22 May 2013 22:03:52 +0000 (15:03 -0700)]
librank: add permissions command line argument

Add a command line argument to only list pages with the given
permissions.

Change-Id: I884eedea607b250ac721e7fdac555992c435441f

11 years agolibpagemap: add definition for mask of permission flags
Colin Cross [Wed, 22 May 2013 22:02:09 +0000 (15:02 -0700)]
libpagemap: add definition for mask of permission flags

Change-Id: Ibd0b26e4f5245592152d2c8ef00e7da1ad5f3fdf

11 years agolibrank: convert argument parsing to getopt_long
Colin Cross [Wed, 22 May 2013 21:49:19 +0000 (14:49 -0700)]
librank: convert argument parsing to getopt_long

Change-Id: Ia145018d9096a550febe465c9f5b5f00d36c444d

11 years agolibpagemap: fix vss calculation
Colin Cross [Wed, 22 May 2013 23:33:03 +0000 (16:33 -0700)]
libpagemap: fix vss calculation

pm_map_usage was not incrementing vss for pages that were in the
process's map but not occupying a physical page.  Move the
vss increment above the check for present mappings.

Change-Id: I2706e6fbcbfe7d70f10950333a486d690bc84d6c

11 years agolibpagemap: fix reusing previous name for mappings with no name
Colin Cross [Thu, 16 May 2013 01:31:05 +0000 (18:31 -0700)]
libpagemap: fix reusing previous name for mappings with no name

Mappings that are not from a file do not have a name.  The sscanf
will read all of the fields up to the name, and then leave name
untouched.  This causes the previous name to be reused.  Reset
name to an empty string before each call to sscanf.

Change-Id: Ib146732983eb074d0d4773be094efa0b672f5ed2

11 years agoMerge "Add guards around neon code."
Elliott Hughes [Tue, 14 May 2013 21:36:46 +0000 (21:36 +0000)]
Merge "Add guards around neon code."

11 years agoAdd guards around neon code.
Christopher Ferris [Tue, 14 May 2013 20:15:11 +0000 (13:15 -0700)]
Add guards around neon code.

Missed the neon code in the copy bandwidths. Added guards and the
functionality to indicate that these are neon based benchmarks.

(cherry-pick of a67e53c2345eac337d24e4decaf4733c5314aff8.)

Change-Id: If0fae051c47979eb243681a3c994222cefaae826

11 years agoMerge "Fix a few incorrect return codes."
Christopher Ferris [Fri, 3 May 2013 20:34:46 +0000 (20:34 +0000)]
Merge "Fix a few incorrect return codes."

11 years agoFix a few incorrect return codes.
Christopher Ferris [Fri, 3 May 2013 19:51:45 +0000 (12:51 -0700)]
Fix a few incorrect return codes.

Merge from internal master.

(cherry-picked from f90ab5f4ab00ddfbcf313be9001837aaefd64ba2)

Change-Id: I87379bac089107a95301015d849433c9e304a988

11 years agoMerge "Add read bandwidth and small refactor."
Christopher Ferris [Fri, 3 May 2013 19:49:53 +0000 (19:49 +0000)]
Merge "Add read bandwidth and small refactor."

11 years agoAdd read bandwidth and small refactor.
Christopher Ferris [Thu, 2 May 2013 22:12:11 +0000 (15:12 -0700)]
Add read bandwidth and small refactor.

- Addition of read bandwidth test.
- Move the allocation of all buffers used for testing into the
  setSize() function.
- Add a canRun function to indicate whether a test is able to
  run on this platform. Currently, this only disables neon bandwidth
  tests on platforms that don't support neon.
- Refactor the thread testing functions to use one common routine.

Merge from internal master.

(cherry-picked from 1a3794a84074d7f22b8ddaba840aedd758a14cdd)

Change-Id: Ie0f29ec7e484a376471d121333b1982be8f41393

11 years agoMerge "Fix hard-coded fencepost value."
Christopher Ferris [Thu, 2 May 2013 22:41:15 +0000 (22:41 +0000)]
Merge "Fix hard-coded fencepost value."

11 years agoFix hard-coded fencepost value.
Christopher Ferris [Thu, 2 May 2013 21:08:31 +0000 (14:08 -0700)]
Fix hard-coded fencepost value.

Merge from internal master.

(cherry-picked from commit 1685d00d0a6b905a820a76c9686b6b4b077dfe4a)

Change-Id: Ie9d64844c28ea720091acfefc21f888827fecb4b

11 years agoMerge "procmem: fix procmem crash issue"
Colin Cross [Wed, 1 May 2013 03:43:32 +0000 (03:43 +0000)]
Merge "procmem: fix procmem crash issue"

11 years agoMerge "Add defines around neon code."
Christopher Ferris [Wed, 24 Apr 2013 23:53:10 +0000 (23:53 +0000)]
Merge "Add defines around neon code."

11 years agoMerge "Update the libc_test."
Christopher Ferris [Wed, 24 Apr 2013 23:52:42 +0000 (23:52 +0000)]
Merge "Update the libc_test."

11 years agoAdd defines around neon code.
Christopher Ferris [Wed, 24 Apr 2013 23:44:14 +0000 (16:44 -0700)]
Add defines around neon code.

Merge from internal master.

(cherry-picked from commit e5282ae49814c9ed0b9bdec920a20e6978349327)

Change-Id: I00bf68545987ef360fe489b14df8e11fdd7b687b

11 years agoUpdate the libc_test.
Christopher Ferris [Wed, 24 Apr 2013 19:57:05 +0000 (12:57 -0700)]
Update the libc_test.

- Refactored the fencepost testing code, include adding a fencepost
  before the buffer (when not using the value returned by malloc).
- Add a verbose option to display more information as the test runs.
- Change the test to stop on the first fail rather than keep going.

Merge change from internal master.

(cherry-picked from commit f0b2c68c83e6ced8f988f014bc235393ca231958)

Change-Id: I846c7a01be64a0bcea49084fe2f75df4af00e699

11 years agoMerge "Adding a few bandwidth tests."
Christopher Ferris [Wed, 24 Apr 2013 21:19:04 +0000 (21:19 +0000)]
Merge "Adding a few bandwidth tests."

11 years agoAdding a few bandwidth tests.
Christopher Ferris [Fri, 12 Apr 2013 00:50:18 +0000 (17:50 -0700)]
Adding a few bandwidth tests.

New tests being added:
- copy_bandwidth: Gathers the copy bandwidth using four different
  hand-coded assembler routines and using memcpy.
- write_bandwidth: Gathers the write bandwidth using four different
  hand-coded assembler routines and using memset.
- per_core_bandwidth: Launches a thread of any one of the write/copy
  bandwidth tests locked to every available core on the machine.
- multithread_bandwidth: Launches a user specified number of threads running
  any one of the write/copy bandwidth tests.

Each of the tests can be modified as to the size of the data to manipulate
and the number of loops to run.

Deleted tests:
- memcpy (a better memcpy benchmark can be found in system/extras/micro_bench)
- memset (a better memset benchmark can be found in system/extras/micro_bench)
- memcmp (no real replacement, but I plan to add this to micro_bench)
- strlen (no real replacement, but I plan to add this to micro_bench)
- cpufreq (this doesn't work any more)

All verification tests have been mostly shifted to system/extras/libc_test.

Merge from internal master.

(cherry-picked from commit 1348ce27ee9bb8e50a3294879c1523fa4b4d8f8b)

Change-Id: I96e9f26357e4bac1d7bb8736176d80cc41d0b36b

11 years agoMerge "Add a test for memset."
Christopher Ferris [Tue, 9 Apr 2013 18:34:10 +0000 (18:34 +0000)]
Merge "Add a test for memset."

11 years agoAdd a test for memset.
Christopher Ferris [Tue, 9 Apr 2013 18:26:07 +0000 (11:26 -0700)]
Add a test for memset.

Change-Id: Id6bebd267c609b3a42412ec8d4ffa88597afd54f

11 years agoMerge "Add framework for libc testing."
Christopher Ferris [Tue, 9 Apr 2013 00:42:34 +0000 (00:42 +0000)]
Merge "Add framework for libc testing."

11 years agoAdd framework for libc testing.
Christopher Ferris [Thu, 4 Apr 2013 02:16:44 +0000 (19:16 -0700)]
Add framework for libc testing.

In order to test the strcmp and memcpy libc changes, I created this
framework and these extensive tests.

Change-Id: I8400f786f467f20afe0330c23bd7c50704f8376d

11 years agoMerge "Add strcmp benchmarking."
Christopher Ferris [Thu, 4 Apr 2013 00:24:57 +0000 (00:24 +0000)]
Merge "Add strcmp benchmarking."

11 years agoAdd strcmp benchmarking.
Christopher Ferris [Tue, 2 Apr 2013 20:28:16 +0000 (13:28 -0700)]
Add strcmp benchmarking.

NOTE: After this change memcpy results will be significantly lower
      for larger sized copies.

Changes:
- Addition of strcmp benchmarking.
- Fix memcpy to initialize memory before copy. If this is not done, the
  results of memcpy are artificially higher.
- Add a min and max when printing averages.
- Add two new options --dst_or_mask and --src_or_mask to allow more
  flexibility when testing different alignments.

Change-Id: Ia2859d5569ab5ffa35e5ac0f6d5d1f248fef6533

11 years agoprocmem: fix procmem crash issue
Hong-Mei Li [Mon, 1 Apr 2013 03:28:47 +0000 (11:28 +0800)]
procmem: fix procmem crash issue

For the case pm_map_pagemap return error(e.g, maps[i]->start==maps[i]->end==0),
the main loop continue without set mis[i] fields, and then mis[i]==0. So that
the corresponding mi item is 0 for this case.
Skip dumping this item to avoid crash.

Change-Id: I7e1bea1abdccfd7594b9d904938b3462dc182a76
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
11 years agoMerge "ext4_utils: use android_filesystem_capability.h"
Nick Kralevich [Fri, 1 Mar 2013 21:42:50 +0000 (21:42 +0000)]
Merge "ext4_utils: use android_filesystem_capability.h"

11 years agoext4_utils: use android_filesystem_capability.h
Nick Kralevich [Fri, 1 Mar 2013 21:24:44 +0000 (13:24 -0800)]
ext4_utils: use android_filesystem_capability.h

Change-Id: I47cb6ec2f1fcba0d076081b76335638b9c2d1789

11 years agoMerge "Update micro_bench."
Ben Cheng [Wed, 27 Feb 2013 01:42:04 +0000 (01:42 +0000)]
Merge "Update micro_bench."

11 years agoMerge "ext4_utils: fix build error without FILE_CONTEXTS"
Colin Cross [Mon, 25 Feb 2013 07:20:30 +0000 (07:20 +0000)]
Merge "ext4_utils: fix build error without FILE_CONTEXTS"

11 years agoext4_utils: fix build error without FILE_CONTEXTS
Sungmin Choi [Mon, 25 Feb 2013 06:37:51 +0000 (15:37 +0900)]
ext4_utils: fix build error without FILE_CONTEXTS

After commit 4df62f342dbbe2f5cca831ce789dc0426d32ec03,
occurs segmentation fault if mkuserimg.sh runs without FILE_CONTEXTS options.
It's due to strlen() for null value. To fix it, return 0 for null.

Change-Id: Icf99706e51b9053a24e23b9d081a258962877c30

11 years agoMerge "Fix win_sdk build."
Nick Kralevich [Sat, 23 Feb 2013 03:40:52 +0000 (03:40 +0000)]
Merge "Fix win_sdk build."

11 years agoFix win_sdk build.
Nick Kralevich [Sat, 23 Feb 2013 03:39:21 +0000 (19:39 -0800)]
Fix win_sdk build.

Change-Id: I1d1e722a533e0db99492e7fdf308f102dc4c3661

11 years agoMerge "ext4_utils: add filesystem capabilities support."
Nick Kralevich [Sat, 23 Feb 2013 02:03:53 +0000 (02:03 +0000)]
Merge "ext4_utils: add filesystem capabilities support."

11 years agoext4_utils: add filesystem capabilities support.
Nick Kralevich [Thu, 7 Feb 2013 22:21:34 +0000 (14:21 -0800)]
ext4_utils: add filesystem capabilities support.

Add support for specifying filesystem capabilities when
creating a new filesystem.

The combination of SELinux extended attributes plus
filesystem capability extended attributes is too big
to fit inside one inode entry. Because of this, I added
support to ext4_utils to create an xattr block and link
the inode to that block. We continue to try to fit
everything inside the inode if possible, but fall over to
creating a block if the extended attribute is too big.

Change-Id: I40ebb63975b15ecd8c565486e171b4d50cd4dfaa

11 years agoMerge "ext4_utils: clean up some warnings."
Nick Kralevich [Wed, 20 Feb 2013 20:12:53 +0000 (20:12 +0000)]
Merge "ext4_utils: clean up some warnings."

11 years agoext4_utils: clean up some warnings.
Nick Kralevich [Wed, 20 Feb 2013 03:05:47 +0000 (19:05 -0800)]
ext4_utils: clean up some warnings.

Change-Id: Ia9761e5168cfe6baabc0105ea76d5575fc378f48

11 years agoUpdate micro_bench.
Christopher Ferris [Fri, 15 Feb 2013 20:27:58 +0000 (12:27 -0800)]
Update micro_bench.

Moving the code to cpp to access the cpuset CPU* macros (these
macros are defined in sched.h inside of __USE_GNU which is not
defined for the thumb C compiler). The C++ code is also slightly
easier to read.
Add code to set the priority of the process to the highest value.
Add code to lock the process to a single cpu.
Add the ability to compute average and standard deviation over
a number of iterations.
Change the timing code to use nanosecond resolution timing.
Add options to allow modification of the alignment of the src/dst
pointers for memcpy and the dst pointer for memset.
Add an option to change the size of the data being copied in each
iteration.

Change-Id: Ib7c50ed4463f94e638eb81690fe8fe0d0bc3ea80

11 years agoMerge "Remove test_aligned.c. Nothing useful is being tested here."
Elliott Hughes [Thu, 14 Feb 2013 23:57:54 +0000 (23:57 +0000)]
Merge "Remove test_aligned.c. Nothing useful is being tested here."

11 years agoRemove test_aligned.c. Nothing useful is being tested here.
Raghu Gandham [Thu, 14 Feb 2013 23:10:29 +0000 (15:10 -0800)]
Remove test_aligned.c. Nothing useful is being tested here.

Change-Id: I831b55bba93b7bf30febcd90c12d77c3d929fa51

11 years agoam 693a9667: Merge "ext4_utils: mark uninitialized inode tables in block groups"
Colin Cross [Tue, 5 Feb 2013 00:22:23 +0000 (16:22 -0800)]
am 693a9667: Merge "ext4_utils: mark uninitialized inode tables in block groups"

# Via Colin Cross (1) and Gerrit Code Review (1)
* commit '693a966790d116812f44ee03250f031a53c294e1':
  ext4_utils: mark uninitialized inode tables in block groups

11 years agoMerge "ext4_utils: mark uninitialized inode tables in block groups"
Colin Cross [Mon, 4 Feb 2013 23:40:13 +0000 (23:40 +0000)]
Merge "ext4_utils: mark uninitialized inode tables in block groups"

11 years agoext4_utils: mark uninitialized inode tables in block groups
Colin Cross [Mon, 4 Feb 2013 08:44:55 +0000 (00:44 -0800)]
ext4_utils: mark uninitialized inode tables in block groups

Block groups that have no used inodes have their inode table left
uninitialized, unless -t is specified, in which case they are
explicitly zeroed.  When they are uninitialized, writing a sparse
ext4 image over existing data can cause e2fsck to confuse the
uninitialized data for lost inodes.

Set the EXT4_BG_INODE_UNINIT flags on block groups that have no
used inodes.  This flag requires the block group checksum feature
to be enabled, so also enable the checksum feature in the superblock
and compute the checksum for the block group.

Since zeroing the inode tables is now useless, remove the code for
it and deprecate the -t command line option.

Change-Id: I4927c1d866d051547cf0dadc8c8703ded0163925

11 years agoam 682a27cb: Merge "Fix root inode security labeling issue."
Colin Cross [Thu, 31 Jan 2013 02:03:01 +0000 (18:03 -0800)]
am 682a27cb: Merge "Fix root inode security labeling issue."

# By Robert Craig
# Via Gerrit Code Review (1) and Robert Craig (1)
* commit '682a27cbce4935a6598c42a248855eb5878c1115':
  Fix root inode security labeling issue.

11 years agoMerge "Fix root inode security labeling issue."
Colin Cross [Thu, 31 Jan 2013 01:55:51 +0000 (01:55 +0000)]
Merge "Fix root inode security labeling issue."

11 years agoFix root inode security labeling issue.
Robert Craig [Wed, 30 Jan 2013 17:54:46 +0000 (12:54 -0500)]
Fix root inode security labeling issue.

Introducing the verbose flag accidentally wrapped the
security label function call for the root inode. The
system.img will not be correctly labeled without this change.

Change-Id: If73b63d4ee815bbf428dc3d72b9df000a2075a45
Signed-off-by: Robert Craig <rpcraig@tycho.ncsc.mil>
11 years agoam f52abf4c: Merge "Add verbose option to make_ext4 command"
Colin Cross [Thu, 24 Jan 2013 02:42:52 +0000 (18:42 -0800)]
am f52abf4c: Merge "Add verbose option to make_ext4 command"

# By William Roberts
# Via Colin Cross (1) and Gerrit Code Review (1)
* commit 'f52abf4ca2ce307e7d4056e02c9e22075ab65459':
  Add verbose option to make_ext4 command

11 years agoam 72acd484: Merge "ext4_utils: reduce exported apis"
Colin Cross [Thu, 24 Jan 2013 02:42:51 +0000 (18:42 -0800)]
am 72acd484: Merge "ext4_utils: reduce exported apis"

# Via Colin Cross (1) and Gerrit Code Review (1)
* commit '72acd48419ab568647552fb0d7d6ed376f75d4da':
  ext4_utils: reduce exported apis

11 years agoMerge "Add verbose option to make_ext4 command"
Colin Cross [Thu, 24 Jan 2013 01:48:51 +0000 (01:48 +0000)]
Merge "Add verbose option to make_ext4 command"

11 years agoMerge "ext4_utils: reduce exported apis"
Colin Cross [Thu, 24 Jan 2013 01:48:03 +0000 (01:48 +0000)]
Merge "ext4_utils: reduce exported apis"

11 years agoam b1a25925: Merge "ext4_utils: export make_ext4fs_sparse_fd"
Colin Cross [Thu, 24 Jan 2013 01:40:03 +0000 (17:40 -0800)]
am b1a25925: Merge "ext4_utils: export make_ext4fs_sparse_fd"

# Via Colin Cross (1) and Gerrit Code Review (1)
* commit 'b1a25925b1f027a3e11d05bbe396da51cb39f5c4':
  ext4_utils: export make_ext4fs_sparse_fd

11 years agoAdd verbose option to make_ext4 command
William Roberts [Thu, 17 Jan 2013 21:24:27 +0000 (13:24 -0800)]
Add verbose option to make_ext4 command

Enabeling the -v switch will cuase the
make_ext4 command to output the selinux
labeling context for all files.

Change-Id: Ifae8a11eb2c3f4644873d9784affffafb27775bf

11 years agoext4_utils: reduce exported apis
Colin Cross [Wed, 23 Jan 2013 23:38:57 +0000 (15:38 -0800)]
ext4_utils: reduce exported apis

Remove unnecessary functions from make_ext4fs.h so they are not
exposed to users of libext4_utils.

Requires fixing up some internal places that depended on the
definitions in the external make_ext4fs.h header.

Change-Id: Ied24e0efb648d4fd2ccdd1a5a1b685e9bde9cfd7

11 years agoMerge "ext4_utils: export make_ext4fs_sparse_fd"
Colin Cross [Thu, 24 Jan 2013 00:54:54 +0000 (00:54 +0000)]
Merge "ext4_utils: export make_ext4fs_sparse_fd"

11 years agoext4_utils: export make_ext4fs_sparse_fd
Colin Cross [Wed, 23 Jan 2013 23:25:29 +0000 (15:25 -0800)]
ext4_utils: export make_ext4fs_sparse_fd

Export a function to create a sparse image, writing the output to
an fd.  Useful for utilities that need to format a partition.

Change-Id: I3737c65c69b7df0a0bd25885ee70aaadef8a4ad5

11 years agoam 00724b61: Merge "test_atomics is an ARM specific test"
Elliott Hughes [Tue, 22 Jan 2013 16:00:07 +0000 (08:00 -0800)]
am 00724b61: Merge "test_atomics is an ARM specific test"

* commit '00724b61779e04ff586dad4c9634572712b8ef70':
  test_atomics is an ARM specific test

11 years agoMerge "test_atomics is an ARM specific test"
Elliott Hughes [Tue, 22 Jan 2013 15:40:03 +0000 (15:40 +0000)]
Merge "test_atomics is an ARM specific test"

11 years agoam 8c5e84dd: Merge "ext4_utils: fix windows build by avoiding asprintf"
Colin Cross [Fri, 21 Dec 2012 22:44:24 +0000 (14:44 -0800)]
am 8c5e84dd: Merge "ext4_utils: fix windows build by avoiding asprintf"

* commit '8c5e84dd6b934d3efa8a16a1e4bddd5720172d05':
  ext4_utils: fix windows build by avoiding asprintf

11 years agoMerge "ext4_utils: fix windows build by avoiding asprintf"
Colin Cross [Fri, 21 Dec 2012 21:40:58 +0000 (13:40 -0800)]
Merge "ext4_utils: fix windows build by avoiding asprintf"

11 years agoext4_utils: fix windows build by avoiding asprintf
Colin Cross [Fri, 21 Dec 2012 19:17:58 +0000 (11:17 -0800)]
ext4_utils: fix windows build by avoiding asprintf

asprintf is not available on windows.  Since it is only being used outside
operations.

Change-Id: I79c3a3934f6de7a3cd3f17db5ae7731e9a68387c

11 years agoam c3b25b1b: Merge "ext4_utils: fix segfault on error opening output file"
Colin Cross [Fri, 21 Dec 2012 18:11:37 +0000 (10:11 -0800)]
am c3b25b1b: Merge "ext4_utils: fix segfault on error opening output file"

* commit 'c3b25b1b83e7042ce2e223b689efdee0d72f6ad1':
  ext4_utils: fix segfault on error opening output file

11 years agoam 1d1a9011: Merge "ext4_utils: canonicalize slashes in paths"
Colin Cross [Fri, 21 Dec 2012 18:11:36 +0000 (10:11 -0800)]
am 1d1a9011: Merge "ext4_utils: canonicalize slashes in paths"

* commit '1d1a9011f03b5bebbda14768dd3672f1371ff7fb':
  ext4_utils: canonicalize slashes in paths

11 years agoMerge "ext4_utils: fix segfault on error opening output file"
Colin Cross [Thu, 20 Dec 2012 22:41:23 +0000 (14:41 -0800)]
Merge "ext4_utils: fix segfault on error opening output file"

11 years agoMerge "ext4_utils: canonicalize slashes in paths"
Colin Cross [Thu, 20 Dec 2012 22:41:13 +0000 (14:41 -0800)]
Merge "ext4_utils: canonicalize slashes in paths"

11 years agoext4_utils: fix segfault on error opening output file
Colin Cross [Thu, 20 Dec 2012 20:24:52 +0000 (12:24 -0800)]
ext4_utils: fix segfault on error opening output file

error_errno uses longjmp, but the jump target has not been set up
in make_ext4fs_main.c.  Use perror instead.

Change-Id: Ic86eeb8af2315d1847d0a6d667e0b4e25eb9bdda

11 years agoext4_utils: canonicalize slashes in paths
Colin Cross [Thu, 20 Dec 2012 09:00:33 +0000 (01:00 -0800)]
ext4_utils: canonicalize slashes in paths

Simplify handling of slashes between directories in paths by
forcing them to have leading and trailing slashes as appropriate
when passed in to make_ext4fs, and then keeping all directory
paths with a trailing slash.

As a side effect, using "/" as the mountpoint is now supported.

Change-Id: I73fe709c26003a20b0bdf6504db16cc9e39edf9b

11 years agoresolved conflicts for merge of 917e120f to jb-mr1-dev-plus-aosp
Colin Cross [Wed, 19 Dec 2012 06:50:50 +0000 (22:50 -0800)]
resolved conflicts for merge of 917e120f to jb-mr1-dev-plus-aosp

Change-Id: I5f3176d4f4859e7cf70899173f28944fc3a678b4

11 years agoresolved conflicts for merge of f69ebaba to jb-mr1-dev-plus-aosp
Colin Cross [Wed, 19 Dec 2012 00:11:23 +0000 (16:11 -0800)]
resolved conflicts for merge of f69ebaba to jb-mr1-dev-plus-aosp

Change-Id: Ia1c7025ab3d14f2d47e07acf58e161624d94c07c

11 years agoam c04808a5: make_ext4fs: fix sepolicy lookup for lost+found
Colin Cross [Tue, 18 Dec 2012 23:27:26 +0000 (15:27 -0800)]
am c04808a5: make_ext4fs: fix sepolicy lookup for lost+found

* commit 'c04808a532b0421fded05eecf5d843c45b7eb407':
  make_ext4fs: fix sepolicy lookup for lost+found

11 years agoam 0f92e16a: make_ext4fs: insert lost+found directory into filled filesystems
Colin Cross [Tue, 18 Dec 2012 23:27:25 +0000 (15:27 -0800)]
am 0f92e16a: make_ext4fs: insert lost+found directory into filled filesystems

* commit '0f92e16a064c285f5c667df7090b07d28e5e098a':
  make_ext4fs: insert lost+found directory into filled filesystems

11 years agotest_atomics is an ARM specific test
Chris Dearman [Tue, 18 Dec 2012 00:57:13 +0000 (16:57 -0800)]
test_atomics is an ARM specific test

Bionic only defines the __atomic_xxx functions for ARM legacy support.

Change-Id: I813cf9d66ccfc026f89cfbc0e5cbed202e263594
Signed-off-by: Chris Dearman <chris@mips.com>
11 years agomake_ext4fs: fix sepolicy lookup for lost+found
Colin Cross [Tue, 27 Nov 2012 00:32:16 +0000 (16:32 -0800)]
make_ext4fs: fix sepolicy lookup for lost+found

selabel_lookup needs the full path including mountpoint.

Change-Id: Idc0641683a4e4528d94e54be1897315bf5fcdb0d

11 years agomake_ext4fs: insert lost+found directory into filled filesystems
Colin Cross [Wed, 21 Nov 2012 03:41:42 +0000 (19:41 -0800)]
make_ext4fs: insert lost+found directory into filled filesystems

Insert a lost+found directory if necessary when creating a filesystem
based on a directory structure.  This will make the resulting image
clean when tested with e2fsck, allowing e2fsck to be run on all images
as a validity test.

Change-Id: I81d0b6b4a802713270d3469e5a3bc555b680ec7e

11 years agoam da068042: Reconcile with jb-mr1-release - do not merge
The Android Open Source Project [Thu, 29 Nov 2012 22:28:20 +0000 (14:28 -0800)]
am da068042: Reconcile with jb-mr1-release - do not merge

* commit 'da068042443cf968773bd9c7f2ca8e2ae8e59a05':
  make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

11 years agoam 1275cfc5: am 430b67d3: make_ext4fs: fix dentry padding when dentry size is 4088...
Colin Cross [Thu, 29 Nov 2012 22:28:00 +0000 (14:28 -0800)]
am 1275cfc5: am 430b67d3: make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

* commit '1275cfc50b86618f925856e9727956c7d5a02584':
  make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

11 years agoam cb95c864: make_ext4fs: fix dentry padding when dentry size is 4088 or 4092
Colin Cross [Thu, 29 Nov 2012 20:45:34 +0000 (12:45 -0800)]
am cb95c864: make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

* commit 'cb95c864fe069eecb88807cbbb456baf9ee2c44d':
  make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

11 years agoReconcile with jb-mr1-release - do not merge
The Android Open Source Project [Thu, 29 Nov 2012 19:54:58 +0000 (11:54 -0800)]
Reconcile with jb-mr1-release - do not merge

Change-Id: I6144d785b6b161bf3f84f94b5ae8a612eaf8ffca

11 years agoam 430b67d3: make_ext4fs: fix dentry padding when dentry size is 4088 or 4092
Colin Cross [Thu, 29 Nov 2012 18:58:20 +0000 (10:58 -0800)]
am 430b67d3: make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

* commit '430b67d37c9f0a39bd06c128da96e37866d2ac36':
  make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

11 years agomake_ext4fs: fix dentry padding when dentry size is 4088 or 4092
Colin Cross [Tue, 20 Nov 2012 22:07:39 +0000 (14:07 -0800)]
make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

When the total dentry size is N * 4096 - 4 or N * 4096 - 8, there is
not enough room in the block to insert an extra padding dentry.
Instead, switch to always padding the previous dentry out to the end
of the block, which matches what the kernel does when creating new
directory entries.

Also fix dentry_size to return the size of all the dentries
without the padding, the len + 8 padding is incorrect, and the
DIV_ROUND_UP will round up to the correct number of blocks.

Change-Id: If11f90e4ee172c135a0eae2a50b8be213e2dd0dc

11 years agomake_ext4fs: fix dentry padding when dentry size is 4088 or 4092
Colin Cross [Tue, 20 Nov 2012 22:07:39 +0000 (14:07 -0800)]
make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

When the total dentry size is N * 4096 - 4 or N * 4096 - 8, there is
not enough room in the block to insert an extra padding dentry.
Instead, switch to always padding the previous dentry out to the end
of the block, which matches what the kernel does when creating new
directory entries.

Also fix dentry_size to return the size of all the dentries
without the padding, the len + 8 padding is incorrect, and the
DIV_ROUND_UP will round up to the correct number of blocks.

Change-Id: If11f90e4ee172c135a0eae2a50b8be213e2dd0dc

11 years agomake_ext4fs: fix dentry padding when dentry size is 4088 or 4092
Colin Cross [Tue, 20 Nov 2012 22:07:39 +0000 (14:07 -0800)]
make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

When the total dentry size is N * 4096 - 4 or N * 4096 - 8, there is
not enough room in the block to insert an extra padding dentry.
Instead, switch to always padding the previous dentry out to the end
of the block, which matches what the kernel does when creating new
directory entries.

Also fix dentry_size to return the size of all the dentries
without the padding, the len + 8 padding is incorrect, and the
DIV_ROUND_UP will round up to the correct number of blocks.

Change-Id: If11f90e4ee172c135a0eae2a50b8be213e2dd0dc

11 years agoMerge "make_ext4fs: fix sepolicy lookup for lost+found"
Colin Cross [Tue, 27 Nov 2012 00:40:47 +0000 (16:40 -0800)]
Merge "make_ext4fs: fix sepolicy lookup for lost+found"

11 years agomake_ext4fs: fix sepolicy lookup for lost+found
Colin Cross [Tue, 27 Nov 2012 00:32:16 +0000 (16:32 -0800)]
make_ext4fs: fix sepolicy lookup for lost+found

selabel_lookup needs the full path including mountpoint.

Change-Id: Idc0641683a4e4528d94e54be1897315bf5fcdb0d