aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/flags
Commit message (Collapse)AuthorAge
* Restore a really single-threaded mode to DM.Gravatar mtklein2014-10-06
| | | | | | | | | | | | | | | Used to be: 0 -> run on main thread plus an autodetected number of extra threads (default) N -> run on main thread plus N extra threads Now it's: -1 -> run on main thread plus an autodetected number of extra threads (default) 0 -> run on main thread N -> run on main thread plus N extra threads BUG=skia: Review URL: https://codereview.chromium.org/636593002
* Update DM JSON format.Gravatar mtklein2014-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ex. dm --match patch -w bad --key arch x86 gpu nvidia model z620 --properties git_hash abcd build_number 20 -> { "build_number" : "20", "git_hash" : "abcd", "key" : { "arch" : "x86", "gpu" : "nvidia", "model" : "z620" }, "results" : [ { "key" : { "config" : "565", "name" : "ninepatch-stretch" }, "md5" : "f78cfafcbabaf815f3dfcf61fb59acc7", "options" : { "source_type" : "GM" } }, { "key" : { "config" : "8888", "name" : "ninepatch-stretch" }, "md5" : "3e8a42f35a1e76f00caa191e6310d789", "options" : { "source_type" : "GM" } }, ... This breaks -r, but that's okay. Going to follow up this CL with one that removes that entirely. BUG=skia: R=stephana@google.com, jcgregorio@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/551873003
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* SkThreadPool ~~> SkTaskGroupGravatar mtklein2014-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkTaskGroup is like SkThreadPool except the threads stay in one global pool. Each SkTaskGroup itself is tiny (4 bytes) and its wait() method applies only to tasks add()ed to that instance, not the whole thread pool. This means we don't need to bring up new thread pools when tests themselves want to use multithreading (e.g. pathops, quilt). We just create a new SkTaskGroup and wait for that to complete. This should be more efficient, and allow us to expand where we use threads to really latency sensitive places. E.g. we can probably now use these in nanobench for CPU .skp rendering. Now that all threads are sharing the same pool, I think we can remove most of the custom mechanism pathops tests use to control threading. They'll just ride on the global pool with all other tests now. This (temporarily?) removes the GPU multithreading feature from DM, which we don't use. On my desktop, DM runs a little faster (57s -> 55s) in Debug, and a lot faster in Release (36s -> 24s). The bots show speedups of similar proportions, cutting more than a minute off the N4/Release and Win7/Debug runtimes. BUG=skia: Committed: https://skia.googlesource.com/skia/+/9c7207b5dc71dc5a96a2eb107d401133333d5b6f R=caryclark@google.com, bsalomon@google.com, bungeman@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/531653002
* Revert of SkThreadPool ~~> SkTaskGroup (patchset #4 id:60001 of ↵Gravatar mtklein2014-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/531653002/) Reason for revert: Leaks, leaks, leaks. Original issue's description: > SkThreadPool ~~> SkTaskGroup > > SkTaskGroup is like SkThreadPool except the threads stay in > one global pool. Each SkTaskGroup itself is tiny (4 bytes) > and its wait() method applies only to tasks add()ed to that > instance, not the whole thread pool. > > This means we don't need to bring up new thread pools when > tests themselves want to use multithreading (e.g. pathops, > quilt). We just create a new SkTaskGroup and wait for that > to complete. This should be more efficient, and allow us > to expand where we use threads to really latency sensitive > places. E.g. we can probably now use these in nanobench > for CPU .skp rendering. > > Now that all threads are sharing the same pool, I think we > can remove most of the custom mechanism pathops tests use > to control threading. They'll just ride on the global pool > with all other tests now. > > This (temporarily?) removes the GPU multithreading feature > from DM, which we don't use. > > On my desktop, DM runs a little faster (57s -> 55s) in > Debug, and a lot faster in Release (36s -> 24s). The bots > show speedups of similar proportions, cutting more than a > minute off the N4/Release and Win7/Debug runtimes. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/9c7207b5dc71dc5a96a2eb107d401133333d5b6f R=caryclark@google.com, bsalomon@google.com, bungeman@google.com, reed@google.com, mtklein@chromium.org TBR=bsalomon@google.com, bungeman@google.com, caryclark@google.com, mtklein@chromium.org, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: mtklein@google.com Review URL: https://codereview.chromium.org/533393002
* SkThreadPool ~~> SkTaskGroupGravatar mtklein2014-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkTaskGroup is like SkThreadPool except the threads stay in one global pool. Each SkTaskGroup itself is tiny (4 bytes) and its wait() method applies only to tasks add()ed to that instance, not the whole thread pool. This means we don't need to bring up new thread pools when tests themselves want to use multithreading (e.g. pathops, quilt). We just create a new SkTaskGroup and wait for that to complete. This should be more efficient, and allow us to expand where we use threads to really latency sensitive places. E.g. we can probably now use these in nanobench for CPU .skp rendering. Now that all threads are sharing the same pool, I think we can remove most of the custom mechanism pathops tests use to control threading. They'll just ride on the global pool with all other tests now. This (temporarily?) removes the GPU multithreading feature from DM, which we don't use. On my desktop, DM runs a little faster (57s -> 55s) in Debug, and a lot faster in Release (36s -> 24s). The bots show speedups of similar proportions, cutting more than a minute off the N4/Release and Win7/Debug runtimes. BUG=skia: R=caryclark@google.com, bsalomon@google.com, bungeman@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/531653002
* Fix string assert and dead code which caused it.Gravatar bungeman2014-08-11
| | | | | | | | | | | | | | | Running tools with a '--' parameter caused SkString to assert here incorrectly. SkString::remove should allow the entire contents of a string to be removed. The code in the flags parser which caused this call is dead and should be removed. R=mtklein@google.com, reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/453333002
* Fix iOS build by centralizing --writePath.Gravatar mtklein2014-08-07
| | | | | | | | | | | CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot BUG=skia: R=mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/452633002
* Default --skps to ./skpsGravatar mtklein2014-08-07
| | | | | | | | | BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/452553002
* Add angle config to nanobench and make angle a default config for dm and ↵Gravatar bsalomon2014-08-06
| | | | | | | | | | | nanobench. NOTREECHECKS=true R=mtklein@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/441333003
* SKPs-as-benches in nanobenchGravatar mtklein2014-08-01
| | | | | | | | | | | | | This is meant to replace bench_pictures. CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Release-iOS-Trybot BUG=skia: R=bsalomon@google.com, jcgregorio@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/425393004
* Test abandoning GL context in dm/nanobench.Gravatar bsalomon2014-07-28
| | | | | | | | | | | | Rename GrContext::contextDestroyed to GrContext::abandonContext. Remove GrContext::resetContext. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/422903002
* share dm and command flagsGravatar caryclark2014-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Share command flags between dm and unit tests. Also, allow dm's core to be included by itself and iOSShell. Command line flags that are the same (or nearly the same) in DM and in skia_tests have been moved to common_flags. Authors, please check to see that the shared common flag is correct for the tool. For iOS, the 'tool_main' entry point has a wrapper to allow multiple tools to be statically linked in the iOSShell. Since SkCommandLineFlags::Parse can only be called once, these calls are disabled in the IOS build. Since the iOS app directory is dynamically assigned a name, use '@' to select it. (This is the same convention chosen by the Mobile Harness iOS file system utilities.) Move the heart of dm.gyp into dm.gypi so that it can be included by itself and iOSShell.gyp. Add tools/flags/SkCommonFlags.* to define and declare common command line flags. Add support for dm to iOSShell. BUG=skia: R=scroggo@google.com, mtklein@google.com, jvanverth@google.com, bsalomon@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/389653004
* ios fixesGravatar caryclark2014-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | skia_ios.mm Get the app's Documents directory and pass use it to set the resource path. This is a quick hack which will be replaced by a new application that is a tiny shim around a command line tool. SkImageEncoder.h SkForceLinking.cpp SkImageDecoder_CG.cpp Add support for FORCE_LINKING so iOS sees the PNG encoder and others. SkFloatBits.cpp SkPoint.cpp Handle denormalized numbers that are floored by the iOS ARM processor. SkImageDecoder_iOS.mm Remove empty encoder factory. SkTouchGesture.cpp Return early on empty state on touch rather than aborting (crashing) JpegTest.cpp Hal via stackoverflow.com says partial jpegs can be gray as well. skia_test.cpp Remove crash handler call for now to avoid link failure. OverwriteLine.h Remove fancy line overwrite for iOS. Resources.cpp Add interface to set resource directory based on runtime query. BUG=skia:2736 skia:2737 skia:2738 R=reed@google.com, halcanary@google.com, mtklein@google.com, tfarina@chromium.org Author: caryclark@google.com Review URL: https://codereview.chromium.org/373383003
* undefok -> boolGravatar mtklein2014-06-20
| | | | | | | | | | | | BUG=skia: not waiting for (dead?) win builder NOTRY=True R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/348063002
* Add a minimal --undefok to SkCommandLineFlags.Gravatar commit-bot@chromium.org2014-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | Similar in spirit to gflags' undefok, I'd like to be able to ignore specific unknown flags. This lets me run the same command line on, say, a branch that's got a new flag and on a clean branch tracking origin/master. This is handy for performance comparison, etc. It's not essential, and if you hate this I can find another way. As an example, I want to compare the runtime of SKP recording with my new code. I've added a flag --skr to bench_record to help this. So I want to compare origin/master: out/Release/bench_record my patch: out/Release/bench_record --skr This lets me run both as out/Release/bench_record --undefok skr --skr, which is handy for scripts and things. BUG=skia: R=scroggo@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/209393015 git-svn-id: http://skia.googlecode.com/svn/trunk@13945 2bbb7eff-a529-9590-31e7-b0007b416f81
* gm: add --ignoreTests flagGravatar epoger@google.com2013-09-19
| | | | | | | | | BUG=skia:1600 R=scroggo@google.com Review URL: https://codereview.chromium.org/23526065 git-svn-id: http://skia.googlecode.com/svn/trunk@11374 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add ShouldSkip variant that can read a --match flag directly.Gravatar commit-bot@chromium.org2013-08-30
| | | | | | | | | | | | | Just seemed like we were going through lots of hoops for this common case. BUG= R=scroggo@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/23708009 git-svn-id: http://skia.googlecode.com/svn/trunk@11034 2bbb7eff-a529-9590-31e7-b0007b416f81
* My clang now doesn't complain about !"foo".Gravatar mtklein@google.com2013-08-22
| | | | | | | | | BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/22875037 git-svn-id: http://skia.googlecode.com/svn/trunk@10874 2bbb7eff-a529-9590-31e7-b0007b416f81
* refactor duplication (shouldSkip and skip_name) into a utility functionGravatar sglez@google.com2013-07-24
| | | | | | | | | | R=caryclark@google.com, reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=10280 Review URL: https://codereview.chromium.org/19807005 git-svn-id: http://skia.googlecode.com/svn/trunk@10317 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r10280, which caused https://code.google.com/p/skia/issues/detail?id=1441Gravatar epoger@google.com2013-07-23
| | | | | | Review URL: https://codereview.chromium.org/19537005 git-svn-id: http://skia.googlecode.com/svn/trunk@10284 2bbb7eff-a529-9590-31e7-b0007b416f81
* refactor duplication (shouldSkip and skip_name) into a utility functionGravatar sglez@google.com2013-07-23
| | | | | | | | R=caryclark@google.com, reed@google.com Review URL: https://codereview.chromium.org/19807005 git-svn-id: http://skia.googlecode.com/svn/trunk@10280 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix the build.Gravatar scroggo@google.com2013-04-24
| | | | | | | | | | Allow NULL for defaultValue in SkCommandLineFlags. unreviewed. Review URL: https://codereview.chromium.org/14472017 git-svn-id: http://skia.googlecode.com/svn/trunk@8847 2bbb7eff-a529-9590-31e7-b0007b416f81
* Treat default command line argument properly.Gravatar scroggo@google.com2013-04-24
| | | | | | | | | | | | | | | | | | | In SkCommandLineFlags, if the client sets a default value of multiple arguments (e.g. "arg0 arg1 ..."), set the actual defaults to all of those arguments separately (i.e. an array with [0] == "arg0", [1] == "arg1", ...), rather than as one string (i.e. [0] == "arg0 arg1 ..."). Remove the hack that worked around this bug. Also move the increasingly complicated implementation of SkFlagInfo::CreateStringFlag into the cpp file. BUG=https://code.google.com/p/skia/issues/detail?id=1237 Review URL: https://codereview.chromium.org/14366034 git-svn-id: http://skia.googlecode.com/svn/trunk@8845 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix an SkCommandLineFlags bug.Gravatar scroggo@google.com2013-04-23
| | | | | | | | | | | | | | | | | Previously I was storing an SkTDArray of const char*, which fails if the strings go out of scope. Instead, store an SkTArray of SkString, and copy the strings, so we do not depend on the strings sticking around. Using an SkTArray because it is smart enough to call the destructors, so the copies can be destroyed on program exit. BUG=https://code.google.com/p/skia/issues/detail?id=1237 Review URL: https://codereview.chromium.org/14414008 git-svn-id: http://skia.googlecode.com/svn/trunk@8829 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkFlags now follows proper dashing convention.Gravatar scroggo@google.com2013-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | Two dashes are used for flags with multiple characters, and one dash is used for flags with single characters. In GM, changed '-wp' to '-p' (the command to choose a directory for writing SKPs) to fit with the convention. In render_pictures and bench_pictures, changed the flag for read and write path to have full names (which are consistent) and use the old single character names as their shortcuts. SkCommandLineFlags: Updated the documentation, and only allow -h or --help for help (again, to match the convention). Also enforce the single character limit for the short name, and require the full name to be at least two characters. Provide full names for skhello. BUG=https://code.google.com/p/skia/issues/detail?id=1174 Review URL: https://codereview.chromium.org/12521019 git-svn-id: http://skia.googlecode.com/svn/trunk@8582 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change the name of SkFlags to SkCommandLineFlags.Gravatar scroggo@google.com2013-03-21
This name is more specific to what it actually does. Also move the code into tools/flags, to (slightly) better organize the massive tools folder. Update the programs that use it to use the new names. No functionality changes. BUG=https://code.google.com/p/skia/issues/detail?id=1173 Review URL: https://codereview.chromium.org/12440067 git-svn-id: http://skia.googlecode.com/svn/trunk@8304 2bbb7eff-a529-9590-31e7-b0007b416f81